blob: 8369444d16150ad254fd9ecba767bdd72c69250b [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 {
Jiyong Park5ba39df2020-01-19 19:08:37 +090025 name: "services-all-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",
Hai Zhang76f0def2020-01-16 01:42:58 -080050 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080051 ":service-statsd-sources",
Jiyong Parke86e89a2019-11-17 13:11:19 +090052 ],
53 visibility: ["//visibility:private"],
54}
55
Colin Crosseb652a42017-12-05 09:46:29 -080056// merge all required services into one jar
57// ============================================================
58java_library {
59 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070060 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080061
62 dex_preopt: {
63 app_image: true,
64 profile: "art-profile",
65 },
66
Jiyong Parke86e89a2019-11-17 13:11:19 +090067 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080068
69 // The convention is to name each service module 'services.$(module_name)'
70 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080071 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080072 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080073 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080074 "services.appwidget",
75 "services.autofill",
76 "services.backup",
77 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -080078 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -080079 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -080080 "services.coverage",
81 "services.devicepolicy",
82 "services.midi",
83 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080084 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080085 "services.print",
Yi Konga0bd2a92020-06-29 20:03:55 +080086 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -080087 "services.restrictions",
Igor Murashkin4de1e162018-11-26 10:33:17 -080088 "services.startop",
Robert Berry835123d2019-03-18 16:33:42 -040089 "services.systemcaptions",
Colin Crosseb652a42017-12-05 09:46:29 -080090 "services.usage",
91 "services.usb",
92 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -080093 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -070094 "service-blobstore",
95 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -080096 "android.hidl.base-V1.0-java",
97 ],
98
99 libs: [
100 "android.hidl.manager-V1.0-java",
Paul Duffin01fd6ff2020-06-02 11:41:13 +0100101 "framework-tethering.stubs.module_lib",
Colin Crosseb652a42017-12-05 09:46:29 -0800102 ],
103
104 // Uncomment to enable output of certain warnings (deprecated, unchecked)
105 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800106}
107
Colin Cross3a7d8992017-12-05 17:33:58 -0800108// native library
109// =============================================================
110
111cc_library_shared {
112 name: "libandroid_servers",
113 defaults: ["libservices.core-libs"],
114 whole_static_libs: ["libservices.core"],
115}
atrost86895aa2019-08-19 16:51:15 +0100116
117platform_compat_config {
118 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100119 src: ":services",
120}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000121
122filegroup {
123 name: "art-profile",
124 srcs: ["art-profile"],
125}
Jiyong Park759a269a2019-11-17 15:17:53 +0900126
127// API stub
128// =============================================================
129
130droidstubs {
131 name: "services-stubs.sources",
Jiyong Park5ba39df2020-01-19 19:08:37 +0900132 srcs: [":services-all-sources"],
Jiyong Park759a269a2019-11-17 15:17:53 +0900133 installable: false,
Makoto Onuki3d8cabd42020-02-03 10:32:52 -0800134 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900135 " --hide-annotation android.annotation.Hide" +
Anton Hanssonac119a32020-02-19 18:29:12 +0000136 " --hide InternalClasses" + // com.android.* classes are okay in this interface
137 // TODO: remove the --hide options below
Jiyong Park759a269a2019-11-17 15:17:53 +0900138 " --hide-package com.google.android.startop.iorap" +
Jiyong Park759a269a2019-11-17 15:17:53 +0900139 " --hide DeprecationMismatch" +
140 " --hide HiddenTypedefConstant",
Jiyong Park759a269a2019-11-17 15:17:53 +0900141 visibility: ["//visibility:private"],
Anton Hanssonf68ef062020-03-27 15:09:26 +0000142 filter_packages: ["com.android."],
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900143 check_api: {
144 current: {
145 api_file: "api/current.txt",
146 removed_api_file: "api/removed.txt",
147 },
Anton Hansson0decfb12020-02-19 11:35:09 +0000148 last_released: {
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100149 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100150 removed_api_file: ":removed.api.system-server.latest",
Anton Hanssonce556232021-01-22 16:40:06 +0000151 baseline_file: ":android-incompatibilities.api.system-server.latest"
Anton Hansson0decfb12020-02-19 11:35:09 +0000152 },
153 api_lint: {
154 enabled: true,
Anton Hanssonf68ddea2020-05-02 17:49:26 +0100155 new_since: ":android.api.system-server.latest",
Anton Hansson0decfb12020-02-19 11:35:09 +0000156 baseline_file: "api/lint-baseline.txt",
157 },
Jiyong Park1a3b9b92019-12-20 16:29:45 +0900158 },
Anton Hansson85785fe2021-01-20 20:23:34 +0000159 dists: [
160 {
161 targets: ["sdk", "win_sdk"],
162 dir: "apistubs/android/system-server/api",
163 dest: "android.txt",
164 tag: ".api.txt"
165 },
166 {
167 targets: ["sdk", "win_sdk"],
168 dir: "apistubs/android/system-server/api",
169 dest: "removed.txt",
170 tag: ".removed-api.txt",
171 },
172 ]
Jiyong Park759a269a2019-11-17 15:17:53 +0900173}
174
175java_library {
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000176 name: "android_system_server_stubs_current",
Anton Hanssona9205502020-07-15 13:36:34 +0100177 defaults: ["android_stubs_dists_default"],
Jiyong Park759a269a2019-11-17 15:17:53 +0900178 srcs: [":services-stubs.sources"],
179 installable: false,
Anton Hanssonbde7d4f2020-03-19 15:23:32 +0000180 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100181 sdk_version: "none",
182 system_modules: "none",
183 java_version: "1.8",
Anton Hanssona9205502020-07-15 13:36:34 +0100184 dist: {
185 dir: "apistubs/android/system-server",
186 },
Jiyong Park759a269a2019-11-17 15:17:53 +0900187}