blob: 57a7bc52c057fb3aa90caef9fb59e613d8d8c129 [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",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000149 visibility: ["//frameworks/base:__subpackages__"],
Chris Wailes061b25e2021-02-08 10:00:13 -0800150 filter_packages: ["com.android."],
Andrei Onea6e69e442021-02-10 20:53:12 +0000151}
152
153droidstubs {
Andrei Oneafaa271a2021-03-17 13:32:51 +0000154 name: "services-non-updatable-stubs",
Andrei Onea6e69e442021-02-10 20:53:12 +0000155 srcs: [":services-non-updatable-sources"],
156 defaults: ["services-stubs-default"],
157 check_api: {
158 current: {
159 api_file: "api/non-updatable-current.txt",
160 removed_api_file: "api/non-updatable-removed.txt",
161 },
162 api_lint: {
163 enabled: true,
164 new_since: ":android-non-updatable.api.system-server.latest",
165 baseline_file: "api/non-updatable-lint-baseline.txt",
166 },
167 },
168 dists: [
169 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800170 targets: [
171 "sdk",
172 "win_sdk",
173 ],
Andrei Onea6e69e442021-02-10 20:53:12 +0000174 dir: "apistubs/android/system-server/api",
175 dest: "android-non-updatable.txt",
Chris Wailes061b25e2021-02-08 10:00:13 -0800176 tag: ".api.txt",
Andrei Onea6e69e442021-02-10 20:53:12 +0000177 },
178 {
Chris Wailes061b25e2021-02-08 10:00:13 -0800179 targets: [
180 "sdk",
181 "win_sdk",
182 ],
Andrei Onea6e69e442021-02-10 20:53:12 +0000183 dir: "apistubs/android/system-server/api",
184 dest: "android-non-updatable-removed.tx",
185 tag: ".removed-api.txt",
186 },
Chris Wailes061b25e2021-02-08 10:00:13 -0800187 ],
188}