blob: 872b1187a2de54c80adf364f588a1e6db1712c08 [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",
Colin Crosseb652a42017-12-05 09:46:29 -0800110 ],
111
112 // Uncomment to enable output of certain warnings (deprecated, unchecked)
113 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800114}
115
Colin Cross3a7d8992017-12-05 17:33:58 -0800116// native library
117// =============================================================
118
119cc_library_shared {
120 name: "libandroid_servers",
121 defaults: ["libservices.core-libs"],
122 whole_static_libs: ["libservices.core"],
123}
atrost86895aa2019-08-19 16:51:15 +0100124
125platform_compat_config {
126 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100127 src: ":services",
128}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000129
130filegroup {
131 name: "art-profile",
132 srcs: ["art-profile"],
133}
Jiyong Park759a269a2019-11-17 15:17:53 +0900134
135// API stub
136// =============================================================
137
Andrei Onea6e69e442021-02-10 20:53:12 +0000138stubs_defaults {
139 name: "services-stubs-default",
Jiyong Park759a269a2019-11-17 15:17:53 +0900140 installable: false,
Makoto Onuki3d8cabd42020-02-03 10:32:52 -0800141 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900142 " --hide-annotation android.annotation.Hide" +
Anton Hanssonac119a32020-02-19 18:29:12 +0000143 " --hide InternalClasses" + // com.android.* classes are okay in this interface
144 // TODO: remove the --hide options below
Jiyong Park759a269a2019-11-17 15:17:53 +0900145 " --hide-package com.google.android.startop.iorap" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900146 " --hide DeprecationMismatch" +
147 " --hide HiddenTypedefConstant",
Jiyong Park759a269a2019-11-17 15:17:53 +0900148 visibility: ["//visibility:private"],
Andrei Onea6e69e442021-02-10 20:53:12 +0000149 filter_packages: ["com.android."]
150}
151
152droidstubs {
153 name: "services-stubs.sources",
154 srcs: [":services-all-sources"],
155 defaults: ["services-stubs-default"],
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900156 check_api: {
157 current: {
158 api_file: "api/current.txt",
159 removed_api_file: "api/removed.txt",
160 },
Anton Hansson0decfb12020-02-19 11:35:09 +0000161 last_released: {
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100162 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100163 removed_api_file: ":removed.api.system-server.latest",
Anton Hanssonce556232021-01-22 16:40:06 +0000164 baseline_file: ":android-incompatibilities.api.system-server.latest"
Anton Hansson0decfb12020-02-19 11:35:09 +0000165 },
166 api_lint: {
167 enabled: true,
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100168 new_since: ":android.api.system-server.latest",
Anton Hansson0decfb12020-02-19 11:35:09 +0000169 baseline_file: "api/lint-baseline.txt",
170 },
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900171 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000172 dists: [
173 {
174 targets: ["sdk", "win_sdk"],
175 dir: "apistubs/android/system-server/api",
176 dest: "android.txt",
177 tag: ".api.txt"
178 },
179 {
180 targets: ["sdk", "win_sdk"],
181 dir: "apistubs/android/system-server/api",
182 dest: "removed.txt",
183 tag: ".removed-api.txt",
184 },
185 ]
Jiyong Park759a269a2019-11-17 15:17:53 +0900186}
187
188java_library {
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000189 name: "android_system_server_stubs_current",
Anton Hanssona9205502020-07-15 13:36:34 +0100190 defaults: ["android_stubs_dists_default"],
Jiyong Park759a269a2019-11-17 15:17:53 +0900191 srcs: [":services-stubs.sources"],
192 installable: false,
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000193 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100194 sdk_version: "none",
195 system_modules: "none",
196 java_version: "1.8",
Anton Hanssona9205502020-07-15 13:36:34 +0100197 dist: {
198 dir: "apistubs/android/system-server",
199 },
Jiyong Park759a269a2019-11-17 15:17:53 +0900200}
Andrei Onea6e69e442021-02-10 20:53:12 +0000201
202droidstubs {
203 name: "services-non-updatable-stubs.sources",
204 srcs: [":services-non-updatable-sources"],
205 defaults: ["services-stubs-default"],
206 check_api: {
207 current: {
208 api_file: "api/non-updatable-current.txt",
209 removed_api_file: "api/non-updatable-removed.txt",
210 },
211 api_lint: {
212 enabled: true,
213 new_since: ":android-non-updatable.api.system-server.latest",
214 baseline_file: "api/non-updatable-lint-baseline.txt",
215 },
216 },
217 dists: [
218 {
219 targets: ["sdk", "win_sdk"],
220 dir: "apistubs/android/system-server/api",
221 dest: "android-non-updatable.txt",
222 tag: ".api.txt"
223 },
224 {
225 targets: ["sdk", "win_sdk"],
226 dir: "apistubs/android/system-server/api",
227 dest: "android-non-updatable-removed.tx",
228 tag: ".removed-api.txt",
229 },
230 ]
231}