blob: 8c9c4875b835497ab80c6669e6def5b569c131e8 [file] [log] [blame]
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -06001java_defaults {
2 name: "services_defaults",
3 plugins: [
4 "error_prone_android_framework",
5 ],
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -06006 errorprone: {
7 javacflags: [
Jeff Sharkey7cdc3bf2020-10-06 14:55:37 -06008 "-Xep:AndroidFrameworkBinderIdentity:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -06009 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -060010 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -060011 ],
12 },
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -060013}
14
Jiyong Parkbae2e902019-11-17 13:11:19 +090015filegroup {
16 name: "services-main-sources",
17 srcs: ["java/**/*.java"],
18 path: "java",
19 visibility: ["//visibility:private"],
20}
21
22filegroup {
Jiyong Park5ba39df2020-01-19 19:08:37 +090023 name: "services-all-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090024 srcs: [
25 ":services.core-sources",
26 ":services.accessibility-sources",
27 ":services.appprediction-sources",
28 ":services.appwidget-sources",
29 ":services.autofill-sources",
30 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090031 ":backuplib-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090032 ":services.companion-sources",
33 ":services.contentcapture-sources",
34 ":services.contentsuggestions-sources",
35 ":services.coverage-sources",
36 ":services.devicepolicy-sources",
37 ":services.midi-sources",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020038 ":services.musicsearch-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090039 ":services.net-sources",
40 ":services.print-sources",
Yi Kong86f85932020-06-29 20:03:55 +080041 ":services.profcollect-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090042 ":services.restrictions-sources",
43 ":services.startop.iorap-sources",
44 ":services.systemcaptions-sources",
45 ":services.usage-sources",
46 ":services.usb-sources",
47 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080048 ":services.wifi-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080049 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080050 ":service-statsd-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090051 ],
52 visibility: ["//visibility:private"],
53}
54
Colin Crosseb652a42017-12-05 09:46:29 -080055// merge all required services into one jar
56// ============================================================
57java_library {
58 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070059 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080060
61 dex_preopt: {
62 app_image: true,
63 profile: "art-profile",
64 },
65
Jiyong Parkbae2e902019-11-17 13:11:19 +090066 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080067
68 // The convention is to name each service module 'services.$(module_name)'
69 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080070 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080071 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080072 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080073 "services.appwidget",
74 "services.autofill",
75 "services.backup",
76 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -080077 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -080078 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -080079 "services.coverage",
80 "services.devicepolicy",
81 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020082 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -080083 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080084 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080085 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +080086 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -080087 "services.restrictions",
Igor Murashkin4de1e162018-11-26 10:33:17 -080088 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -040089 "services.systemcaptions",
Colin Crosseb652a42017-12-05 09:46:29 -080090 "services.usage",
91 "services.usb",
92 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -080093 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -070094 "service-blobstore",
Aaron Huange6f27dd2020-06-27 07:18:23 +080095 "service-connectivity",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -070096 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -080097 "android.hidl.base-V1.0-java",
98 ],
99
100 libs: [
101 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100102 "framework-tethering.stubs.module_lib",
Colin Crosseb652a42017-12-05 09:46:29 -0800103 ],
104
105 // Uncomment to enable output of certain warnings (deprecated, unchecked)
106 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800107}
108
Colin Cross3a7d8992017-12-05 17:33:58 -0800109// native library
110// =============================================================
111
112cc_library_shared {
113 name: "libandroid_servers",
114 defaults: ["libservices.core-libs"],
115 whole_static_libs: ["libservices.core"],
116}
atrost86895aa2019-08-19 16:51:15 +0100117
118platform_compat_config {
119 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100120 src: ":services",
121}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000122
123filegroup {
124 name: "art-profile",
125 srcs: ["art-profile"],
126}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900127
128// API stub
129// =============================================================
130
131droidstubs {
132 name: "services-stubs.sources",
Jiyong Park5ba39df2020-01-19 19:08:37 +0900133 srcs: [":services-all-sources"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900134 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800135 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900136 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000137 " --hide InternalClasses" + // com.android.* classes are okay in this interface
138 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900139 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900140 " --hide DeprecationMismatch" +
141 " --hide HiddenTypedefConstant",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900142 visibility: ["//visibility:private"],
Anton Hansson442fcf42020-03-27 15:09:26 +0000143 filter_packages: ["com.android."],
Jiyong Park13c923d2019-12-20 16:29:45 +0900144 check_api: {
145 current: {
146 api_file: "api/current.txt",
147 removed_api_file: "api/removed.txt",
148 },
Anton Hanssondaa9d882020-02-19 11:35:09 +0000149 last_released: {
Anton Hansson48ee95e2020-05-02 17:49:26 +0100150 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100151 removed_api_file: ":removed.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000152 baseline_file: ":system-server-api-incompatibilities-with-last-released"
153 },
154 api_lint: {
155 enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100156 new_since: ":android.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000157 baseline_file: "api/lint-baseline.txt",
158 },
Jiyong Park13c923d2019-12-20 16:29:45 +0900159 },
Anton Hanssond9a3fee2020-03-23 18:08:55 +0000160 dist: {
161 targets: ["sdk", "win_sdk"],
162 dir: "apistubs/android/system-server/api",
163 dest: "android.txt",
164 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900165}
166
167java_library {
Anton Hanssona49fb992020-03-19 15:23:32 +0000168 name: "android_system_server_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000169 defaults: ["android_stubs_dists_default"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900170 srcs: [":services-stubs.sources"],
171 installable: false,
Anton Hanssona49fb992020-03-19 15:23:32 +0000172 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100173 sdk_version: "none",
174 system_modules: "none",
175 java_version: "1.8",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000176 dist: {
177 dir: "apistubs/android/system-server",
178 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900179}