blob: 0a01c955a6127b46f3840662407aa8659c1e1925 [file] [log] [blame]
Bob Badour051ef782021-02-12 17:07:05 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_base_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_base_license"],
8}
9
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -060010java_defaults {
11 name: "services_defaults",
12 plugins: [
13 "error_prone_android_framework",
14 ],
15}
16
Jiyong Parke86e89a2019-11-17 13:11:19 +090017filegroup {
18 name: "services-main-sources",
19 srcs: ["java/**/*.java"],
20 path: "java",
21 visibility: ["//visibility:private"],
22}
23
24filegroup {
Andrei Onea6e69e442021-02-10 20:53:12 +000025 name: "services-non-updatable-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090026 srcs: [
27 ":services.core-sources",
28 ":services.accessibility-sources",
29 ":services.appprediction-sources",
30 ":services.appwidget-sources",
31 ":services.autofill-sources",
32 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090033 ":backuplib-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090034 ":services.companion-sources",
35 ":services.contentcapture-sources",
36 ":services.contentsuggestions-sources",
37 ":services.coverage-sources",
38 ":services.devicepolicy-sources",
39 ":services.midi-sources",
40 ":services.net-sources",
41 ":services.print-sources",
Yi Konga0bd2a92020-06-29 20:03:55 +080042 ":services.profcollect-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090043 ":services.restrictions-sources",
44 ":services.startop.iorap-sources",
45 ":services.systemcaptions-sources",
46 ":services.usage-sources",
47 ":services.usb-sources",
48 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080049 ":services.wifi-sources",
Andrei Onea6e69e442021-02-10 20:53:12 +000050 ],
51 visibility: ["//visibility:private"],
52}
53
54filegroup {
55 name: "services-all-sources",
56 srcs: [
57 ":services-non-updatable-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080058 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080059 ":service-statsd-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090060 ],
61 visibility: ["//visibility:private"],
62}
63
Colin Crosseb652a42017-12-05 09:46:29 -080064// merge all required services into one jar
65// ============================================================
66java_library {
67 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070068 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080069
70 dex_preopt: {
71 app_image: true,
72 profile: "art-profile",
73 },
74
Jiyong Parke86e89a2019-11-17 13:11:19 +090075 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080076
77 // The convention is to name each service module 'services.$(module_name)'
78 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080079 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080080 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080081 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080082 "services.appwidget",
83 "services.autofill",
84 "services.backup",
85 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -080086 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -080087 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -080088 "services.coverage",
89 "services.devicepolicy",
90 "services.midi",
91 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080092 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080093 "services.print",
Yi Konga0bd2a92020-06-29 20:03:55 +080094 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -080095 "services.restrictions",
Igor Murashkin4de1e162018-11-26 10:33:17 -080096 "services.startop",
Robert Berry835123d2019-03-18 16:33:42 -040097 "services.systemcaptions",
Colin Crosseb652a42017-12-05 09:46:29 -080098 "services.usage",
99 "services.usb",
100 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800101 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700102 "service-blobstore",
103 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800104 "android.hidl.base-V1.0-java",
105 ],
106
107 libs: [
108 "android.hidl.manager-V1.0-java",
Paul Duffin01fd6ff2020-06-02 11:41:13 +0100109 "framework-tethering.stubs.module_lib",
Chris Wailes061b25e2021-02-08 10:00:13 -0800110 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800111 ],
112
113 // Uncomment to enable output of certain warnings (deprecated, unchecked)
114 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800115}
116
Colin Cross3a7d8992017-12-05 17:33:58 -0800117// native library
118// =============================================================
119
120cc_library_shared {
121 name: "libandroid_servers",
122 defaults: ["libservices.core-libs"],
123 whole_static_libs: ["libservices.core"],
124}
atrost86895aa2019-08-19 16:51:15 +0100125
126platform_compat_config {
127 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100128 src: ":services",
129}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000130
131filegroup {
132 name: "art-profile",
133 srcs: ["art-profile"],
134}
Jiyong Park759a269a2019-11-17 15:17:53 +0900135
136// API stub
137// =============================================================
138
Andrei Onea6e69e442021-02-10 20:53:12 +0000139stubs_defaults {
140 name: "services-stubs-default",
Jiyong Park759a269a2019-11-17 15:17:53 +0900141 installable: false,
Makoto Onuki3d8cabd42020-02-03 10:32:52 -0800142 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900143 " --hide-annotation android.annotation.Hide" +
Anton Hanssonac119a32020-02-19 18:29:12 +0000144 " --hide InternalClasses" + // com.android.* classes are okay in this interface
145 // TODO: remove the --hide options below
Jiyong Park759a269a2019-11-17 15:17:53 +0900146 " --hide-package com.google.android.startop.iorap" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900147 " --hide DeprecationMismatch" +
148 " --hide HiddenTypedefConstant",
Jiyong Park759a269a2019-11-17 15:17:53 +0900149 visibility: ["//visibility:private"],
Chris Wailes061b25e2021-02-08 10:00:13 -0800150 filter_packages: ["com.android."],
Andrei Onea6e69e442021-02-10 20:53:12 +0000151}
152
153droidstubs {
154 name: "services-stubs.sources",
155 srcs: [":services-all-sources"],
156 defaults: ["services-stubs-default"],
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900157 check_api: {
158 current: {
159 api_file: "api/current.txt",
160 removed_api_file: "api/removed.txt",
161 },
Anton Hansson0decfb12020-02-19 11:35:09 +0000162 last_released: {
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100163 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100164 removed_api_file: ":removed.api.system-server.latest",
Chris Wailes061b25e2021-02-08 10:00:13 -0800165 baseline_file: ":android-incompatibilities.api.system-server.latest",
Anton Hansson0decfb12020-02-19 11:35:09 +0000166 },
167 api_lint: {
168 enabled: true,
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100169 new_since: ":android.api.system-server.latest",
Anton Hansson0decfb12020-02-19 11:35:09 +0000170 baseline_file: "api/lint-baseline.txt",
171 },
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900172 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000173 dists: [
174 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800175 targets: [
176 "sdk",
177 "win_sdk",
178 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000179 dir: "apistubs/android/system-server/api",
180 dest: "android.txt",
Chris Wailes061b25e2021-02-08 10:00:13 -0800181 tag: ".api.txt",
Anton Hansson85785fe2021-01-20 20:23:34 +0000182 },
183 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800184 targets: [
185 "sdk",
186 "win_sdk",
187 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000188 dir: "apistubs/android/system-server/api",
189 dest: "removed.txt",
190 tag: ".removed-api.txt",
191 },
Chris Wailes061b25e2021-02-08 10:00:13 -0800192 ],
Jiyong Park759a269a2019-11-17 15:17:53 +0900193}
194
195java_library {
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000196 name: "android_system_server_stubs_current",
Anton Hanssona9205502020-07-15 13:36:34 +0100197 defaults: ["android_stubs_dists_default"],
Jiyong Park759a269a2019-11-17 15:17:53 +0900198 srcs: [":services-stubs.sources"],
199 installable: false,
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000200 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100201 sdk_version: "none",
202 system_modules: "none",
203 java_version: "1.8",
Anton Hanssona9205502020-07-15 13:36:34 +0100204 dist: {
205 dir: "apistubs/android/system-server",
206 },
Jiyong Park759a269a2019-11-17 15:17:53 +0900207}
Andrei Onea6e69e442021-02-10 20:53:12 +0000208
209droidstubs {
210 name: "services-non-updatable-stubs.sources",
211 srcs: [":services-non-updatable-sources"],
212 defaults: ["services-stubs-default"],
213 check_api: {
214 current: {
215 api_file: "api/non-updatable-current.txt",
216 removed_api_file: "api/non-updatable-removed.txt",
217 },
218 api_lint: {
219 enabled: true,
220 new_since: ":android-non-updatable.api.system-server.latest",
221 baseline_file: "api/non-updatable-lint-baseline.txt",
222 },
223 },
224 dists: [
225 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800226 targets: [
227 "sdk",
228 "win_sdk",
229 ],
Andrei Onea6e69e442021-02-10 20:53:12 +0000230 dir: "apistubs/android/system-server/api",
231 dest: "android-non-updatable.txt",
Chris Wailes061b25e2021-02-08 10:00:13 -0800232 tag: ".api.txt",
Andrei Onea6e69e442021-02-10 20:53:12 +0000233 },
234 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800235 targets: [
236 "sdk",
237 "win_sdk",
238 ],
Andrei Onea6e69e442021-02-10 20:53:12 +0000239 dir: "apistubs/android/system-server/api",
240 dest: "android-non-updatable-removed.tx",
241 tag: ".removed-api.txt",
242 },
Chris Wailes061b25e2021-02-08 10:00:13 -0800243 ],
244}