blob: dfc8711735739617eb2cef39da2cadbcf3fef45f [file] [log] [blame]
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -06001java_defaults {
2 name: "services_defaults",
3 plugins: [
4 "error_prone_android_framework",
5 ],
6}
7
Jiyong Parke86e89a2019-11-17 13:11:19 +09008filegroup {
9 name: "services-main-sources",
10 srcs: ["java/**/*.java"],
11 path: "java",
12 visibility: ["//visibility:private"],
13}
14
15filegroup {
Andrei Onea6e69e442021-02-10 20:53:12 +000016 name: "services-non-updatable-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090017 srcs: [
18 ":services.core-sources",
19 ":services.accessibility-sources",
20 ":services.appprediction-sources",
21 ":services.appwidget-sources",
22 ":services.autofill-sources",
23 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090024 ":backuplib-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090025 ":services.companion-sources",
26 ":services.contentcapture-sources",
27 ":services.contentsuggestions-sources",
28 ":services.coverage-sources",
29 ":services.devicepolicy-sources",
30 ":services.midi-sources",
31 ":services.net-sources",
32 ":services.print-sources",
Yi Konga0bd2a92020-06-29 20:03:55 +080033 ":services.profcollect-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090034 ":services.restrictions-sources",
35 ":services.startop.iorap-sources",
36 ":services.systemcaptions-sources",
37 ":services.usage-sources",
38 ":services.usb-sources",
39 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080040 ":services.wifi-sources",
Andrei Onea6e69e442021-02-10 20:53:12 +000041 ],
42 visibility: ["//visibility:private"],
43}
44
45filegroup {
46 name: "services-all-sources",
47 srcs: [
48 ":services-non-updatable-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080049 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080050 ":service-statsd-sources",
Jiyong Parke86e89a2019-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 Parke86e89a2019-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",
82 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080083 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080084 "services.print",
Yi Konga0bd2a92020-06-29 20:03:55 +080085 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -080086 "services.restrictions",
Igor Murashkin4de1e162018-11-26 10:33:17 -080087 "services.startop",
Robert Berry835123d2019-03-18 16:33:42 -040088 "services.systemcaptions",
Colin Crosseb652a42017-12-05 09:46:29 -080089 "services.usage",
90 "services.usb",
91 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -080092 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -070093 "service-blobstore",
94 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -080095 "android.hidl.base-V1.0-java",
96 ],
97
98 libs: [
99 "android.hidl.manager-V1.0-java",
Paul Duffin01fd6ff2020-06-02 11:41:13 +0100100 "framework-tethering.stubs.module_lib",
Colin Crosseb652a42017-12-05 09:46:29 -0800101 ],
102
103 // Uncomment to enable output of certain warnings (deprecated, unchecked)
104 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800105}
106
Colin Cross3a7d8992017-12-05 17:33:58 -0800107// native library
108// =============================================================
109
110cc_library_shared {
111 name: "libandroid_servers",
112 defaults: ["libservices.core-libs"],
113 whole_static_libs: ["libservices.core"],
114}
atrost86895aa2019-08-19 16:51:15 +0100115
116platform_compat_config {
117 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100118 src: ":services",
119}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000120
121filegroup {
122 name: "art-profile",
123 srcs: ["art-profile"],
124}
Jiyong Park759a269a2019-11-17 15:17:53 +0900125
126// API stub
127// =============================================================
128
Andrei Onea6e69e442021-02-10 20:53:12 +0000129stubs_defaults {
130 name: "services-stubs-default",
Jiyong Park759a269a2019-11-17 15:17:53 +0900131 installable: false,
Makoto Onuki3d8cabd42020-02-03 10:32:52 -0800132 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900133 " --hide-annotation android.annotation.Hide" +
Anton Hanssonac119a32020-02-19 18:29:12 +0000134 " --hide InternalClasses" + // com.android.* classes are okay in this interface
135 // TODO: remove the --hide options below
Jiyong Park759a269a2019-11-17 15:17:53 +0900136 " --hide-package com.google.android.startop.iorap" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900137 " --hide DeprecationMismatch" +
138 " --hide HiddenTypedefConstant",
Jiyong Park759a269a2019-11-17 15:17:53 +0900139 visibility: ["//visibility:private"],
Andrei Onea6e69e442021-02-10 20:53:12 +0000140 filter_packages: ["com.android."]
141}
142
143droidstubs {
144 name: "services-stubs.sources",
145 srcs: [":services-all-sources"],
146 defaults: ["services-stubs-default"],
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900147 check_api: {
148 current: {
149 api_file: "api/current.txt",
150 removed_api_file: "api/removed.txt",
151 },
Anton Hansson0decfb12020-02-19 11:35:09 +0000152 last_released: {
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100153 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100154 removed_api_file: ":removed.api.system-server.latest",
Anton Hanssonce556232021-01-22 16:40:06 +0000155 baseline_file: ":android-incompatibilities.api.system-server.latest"
Anton Hansson0decfb12020-02-19 11:35:09 +0000156 },
157 api_lint: {
158 enabled: true,
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100159 new_since: ":android.api.system-server.latest",
Anton Hansson0decfb12020-02-19 11:35:09 +0000160 baseline_file: "api/lint-baseline.txt",
161 },
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900162 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000163 dists: [
164 {
165 targets: ["sdk", "win_sdk"],
166 dir: "apistubs/android/system-server/api",
167 dest: "android.txt",
168 tag: ".api.txt"
169 },
170 {
171 targets: ["sdk", "win_sdk"],
172 dir: "apistubs/android/system-server/api",
173 dest: "removed.txt",
174 tag: ".removed-api.txt",
175 },
176 ]
Jiyong Park759a269a2019-11-17 15:17:53 +0900177}
178
179java_library {
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000180 name: "android_system_server_stubs_current",
Anton Hanssona9205502020-07-15 13:36:34 +0100181 defaults: ["android_stubs_dists_default"],
Jiyong Park759a269a2019-11-17 15:17:53 +0900182 srcs: [":services-stubs.sources"],
183 installable: false,
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000184 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100185 sdk_version: "none",
186 system_modules: "none",
187 java_version: "1.8",
Anton Hanssona9205502020-07-15 13:36:34 +0100188 dist: {
189 dir: "apistubs/android/system-server",
190 },
Jiyong Park759a269a2019-11-17 15:17:53 +0900191}
Andrei Onea6e69e442021-02-10 20:53:12 +0000192
193droidstubs {
194 name: "services-non-updatable-stubs.sources",
195 srcs: [":services-non-updatable-sources"],
196 defaults: ["services-stubs-default"],
197 check_api: {
198 current: {
199 api_file: "api/non-updatable-current.txt",
200 removed_api_file: "api/non-updatable-removed.txt",
201 },
202 api_lint: {
203 enabled: true,
204 new_since: ":android-non-updatable.api.system-server.latest",
205 baseline_file: "api/non-updatable-lint-baseline.txt",
206 },
207 },
208 dists: [
209 {
210 targets: ["sdk", "win_sdk"],
211 dir: "apistubs/android/system-server/api",
212 dest: "android-non-updatable.txt",
213 tag: ".api.txt"
214 },
215 {
216 targets: ["sdk", "win_sdk"],
217 dir: "apistubs/android/system-server/api",
218 dest: "android-non-updatable-removed.tx",
219 tag: ".removed-api.txt",
220 },
221 ]
222}