blob: 0aebb156e7422f3f5c563ffea2fcb4c05094fe5e [file] [log] [blame]
Bob Badour8a6a2bc2021-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
Jiyong Parkbae2e902019-11-17 13:11:19 +090010filegroup {
11 name: "services-main-sources",
Colin Cross33b78ef2021-03-26 10:31:25 -070012 srcs: [
13 "java/**/*.java",
14 "java/**/package.html",
15 ],
Jiyong Parkbae2e902019-11-17 13:11:19 +090016 path: "java",
17 visibility: ["//visibility:private"],
18}
19
20filegroup {
Andrei Onea43114702021-02-10 20:53:12 +000021 name: "services-non-updatable-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090022 srcs: [
23 ":services.core-sources",
Hongwei Wangcdcb68d2020-11-23 12:48:05 -080024 ":services.core-sources-am-wm",
Colin Cross33b78ef2021-03-26 10:31:25 -070025 "core/java/com/android/server/am/package.html",
Jiyong Parkbae2e902019-11-17 13:11:19 +090026 ":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",
Hyunyoung Song21e60a92020-11-20 20:27:54 -080043 ":services.searchui-sources",
Shashwat Razdand33e8c32021-01-29 13:02:19 -080044 ":services.smartspace-sources",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +000045 ":services.speech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090046 ":services.startop.iorap-sources",
47 ":services.systemcaptions-sources",
Adam He2653f232020-11-30 18:23:20 -080048 ":services.translation-sources",
Alex Agranovich50c987f2021-02-18 09:19:33 +000049 ":services.texttospeech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090050 ":services.usage-sources",
51 ":services.usb-sources",
52 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080053 ":services.wifi-sources",
Andrei Onea43114702021-02-10 20:53:12 +000054 ],
55 visibility: ["//visibility:private"],
56}
57
58filegroup {
59 name: "services-all-sources",
60 srcs: [
61 ":services-non-updatable-sources",
62 ":service-media-s-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080063 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080064 ":service-statsd-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090065 ],
66 visibility: ["//visibility:private"],
67}
68
Colin Crosseb652a42017-12-05 09:46:29 -080069// merge all required services into one jar
70// ============================================================
71java_library {
72 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070073 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080074
75 dex_preopt: {
76 app_image: true,
77 profile: "art-profile",
78 },
79
Jiyong Parkbae2e902019-11-17 13:11:19 +090080 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080081
82 // The convention is to name each service module 'services.$(module_name)'
83 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080084 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080085 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080086 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080087 "services.appwidget",
88 "services.autofill",
89 "services.backup",
90 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -080091 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -080092 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -080093 "services.coverage",
94 "services.devicepolicy",
95 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020096 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -080097 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080098 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080099 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +0800100 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -0800101 "services.restrictions",
Hyunyoung Song21e60a92020-11-20 20:27:54 -0800102 "services.searchui",
Shashwat Razdand33e8c32021-01-29 13:02:19 -0800103 "services.smartspace",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +0000104 "services.speech",
Igor Murashkin4de1e162018-11-26 10:33:17 -0800105 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -0400106 "services.systemcaptions",
Adam He2653f232020-11-30 18:23:20 -0800107 "services.translation",
Alex Agranovich50c987f2021-02-18 09:19:33 +0000108 "services.texttospeech",
Colin Crosseb652a42017-12-05 09:46:29 -0800109 "services.usage",
110 "services.usb",
111 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800112 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700113 "service-blobstore",
114 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800115 "android.hidl.base-V1.0-java",
116 ],
117
118 libs: [
119 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100120 "framework-tethering.stubs.module_lib",
Chris Wailes09724a72021-02-08 10:00:13 -0800121 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800122 ],
123
124 // Uncomment to enable output of certain warnings (deprecated, unchecked)
125 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800126}
127
Colin Cross3a7d8992017-12-05 17:33:58 -0800128// native library
129// =============================================================
130
131cc_library_shared {
132 name: "libandroid_servers",
133 defaults: ["libservices.core-libs"],
134 whole_static_libs: ["libservices.core"],
135}
atrost86895aa2019-08-19 16:51:15 +0100136
137platform_compat_config {
138 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100139 src: ":services",
140}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000141
142filegroup {
143 name: "art-profile",
144 srcs: ["art-profile"],
145}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900146
147// API stub
148// =============================================================
149
Andrei Onea43114702021-02-10 20:53:12 +0000150stubs_defaults {
151 name: "services-stubs-default",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900152 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800153 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900154 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000155 " --hide InternalClasses" + // com.android.* classes are okay in this interface
156 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900157 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900158 " --hide DeprecationMismatch" +
159 " --hide HiddenTypedefConstant",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900160 visibility: ["//visibility:private"],
Felipe Lemed3895b62021-03-24 16:55:27 -0700161 filter_packages: ["com.android."],
Andrei Onea43114702021-02-10 20:53:12 +0000162}
163
164droidstubs {
165 name: "services-stubs.sources",
166 srcs: [":services-all-sources"],
167 defaults: ["services-stubs-default"],
Jiyong Park13c923d2019-12-20 16:29:45 +0900168 check_api: {
169 current: {
170 api_file: "api/current.txt",
171 removed_api_file: "api/removed.txt",
172 },
Anton Hanssondaa9d882020-02-19 11:35:09 +0000173 last_released: {
Anton Hansson48ee95e2020-05-02 17:49:26 +0100174 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100175 removed_api_file: ":removed.api.system-server.latest",
Felipe Lemed3895b62021-03-24 16:55:27 -0700176 baseline_file: ":android-incompatibilities.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000177 },
178 api_lint: {
179 enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100180 new_since: ":android.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000181 baseline_file: "api/lint-baseline.txt",
182 },
Jiyong Park13c923d2019-12-20 16:29:45 +0900183 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000184 dists: [
185 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700186 targets: [
187 "sdk",
188 "win_sdk",
189 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000190 dir: "apistubs/android/system-server/api",
191 dest: "android.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700192 tag: ".api.txt",
Anton Hansson85785fe2021-01-20 20:23:34 +0000193 },
194 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700195 targets: [
196 "sdk",
197 "win_sdk",
198 ],
Anton Hansson85785fe2021-01-20 20:23:34 +0000199 dir: "apistubs/android/system-server/api",
200 dest: "removed.txt",
201 tag: ".removed-api.txt",
202 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700203 ],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900204}
205
206java_library {
Anton Hanssona49fb992020-03-19 15:23:32 +0000207 name: "android_system_server_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000208 defaults: ["android_stubs_dists_default"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900209 srcs: [":services-stubs.sources"],
210 installable: false,
Anton Hanssona49fb992020-03-19 15:23:32 +0000211 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100212 sdk_version: "none",
213 system_modules: "none",
214 java_version: "1.8",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000215 dist: {
216 dir: "apistubs/android/system-server",
217 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900218}
Andrei Onea43114702021-02-10 20:53:12 +0000219
220droidstubs {
221 name: "services-non-updatable-stubs.sources",
222 srcs: [":services-non-updatable-sources"],
223 defaults: ["services-stubs-default"],
224 check_api: {
225 current: {
226 api_file: "api/non-updatable-current.txt",
227 removed_api_file: "api/non-updatable-removed.txt",
228 },
229 api_lint: {
230 enabled: true,
231 new_since: ":android-non-updatable.api.system-server.latest",
232 baseline_file: "api/non-updatable-lint-baseline.txt",
233 },
234 },
235 dists: [
236 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700237 targets: [
238 "sdk",
239 "win_sdk",
240 ],
Andrei Onea43114702021-02-10 20:53:12 +0000241 dir: "apistubs/android/system-server/api",
242 dest: "android-non-updatable.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700243 tag: ".api.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000244 },
245 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700246 targets: [
247 "sdk",
248 "win_sdk",
249 ],
Andrei Onea43114702021-02-10 20:53:12 +0000250 dir: "apistubs/android/system-server/api",
251 dest: "android-non-updatable-removed.txt",
252 tag: ".removed-api.txt",
253 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700254 ],
255}