blob: a6892361919187b7e8fd1bbf8113ebd16b19c1cc [file] [log] [blame]
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -06001java_defaults {
2 name: "services_defaults",
3 plugins: [
4 "error_prone_android_framework",
5 ],
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -06006 errorprone: {
7 javacflags: [
Jeff Sharkey7cdc3bf2020-10-06 14:55:37 -06008 "-Xep:AndroidFrameworkBinderIdentity:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -06009 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -060010 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -060011 ],
12 },
Jeff Sharkey4d1d7b52020-05-04 15:31:07 -060013}
14
Jiyong Parkbae2e902019-11-17 13:11:19 +090015filegroup {
16 name: "services-main-sources",
17 srcs: ["java/**/*.java"],
18 path: "java",
19 visibility: ["//visibility:private"],
20}
21
22filegroup {
Jiyong Park5ba39df2020-01-19 19:08:37 +090023 name: "services-all-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090024 srcs: [
25 ":services.core-sources",
26 ":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",
38 ":services.net-sources",
39 ":services.print-sources",
Yi Kong86f85932020-06-29 20:03:55 +080040 ":services.profcollect-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090041 ":services.restrictions-sources",
42 ":services.startop.iorap-sources",
43 ":services.systemcaptions-sources",
44 ":services.usage-sources",
45 ":services.usb-sources",
46 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080047 ":services.wifi-sources",
Hai Zhang76f0def2020-01-16 01:42:58 -080048 ":service-permission-sources",
Muhammad Qureshi8ea733e2020-02-07 09:30:28 -080049 ":service-statsd-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090050 ],
51 visibility: ["//visibility:private"],
52}
53
Colin Crosseb652a42017-12-05 09:46:29 -080054// merge all required services into one jar
55// ============================================================
56java_library {
57 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070058 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080059
60 dex_preopt: {
61 app_image: true,
62 profile: "art-profile",
63 },
64
Jiyong Parkbae2e902019-11-17 13:11:19 +090065 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080066
67 // The convention is to name each service module 'services.$(module_name)'
68 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080069 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080070 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080071 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080072 "services.appwidget",
73 "services.autofill",
74 "services.backup",
75 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -080076 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -080077 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -080078 "services.coverage",
79 "services.devicepolicy",
80 "services.midi",
81 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -080082 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -080083 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +080084 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -080085 "services.restrictions",
Igor Murashkin4de1e162018-11-26 10:33:17 -080086 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -040087 "services.systemcaptions",
Colin Crosseb652a42017-12-05 09:46:29 -080088 "services.usage",
89 "services.usb",
90 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -080091 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -070092 "service-blobstore",
93 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -080094 "android.hidl.base-V1.0-java",
95 ],
96
97 libs: [
98 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +010099 "framework-tethering.stubs.module_lib",
Colin Crosseb652a42017-12-05 09:46:29 -0800100 ],
101
102 // Uncomment to enable output of certain warnings (deprecated, unchecked)
103 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800104}
105
Colin Cross3a7d8992017-12-05 17:33:58 -0800106// native library
107// =============================================================
108
109cc_library_shared {
110 name: "libandroid_servers",
111 defaults: ["libservices.core-libs"],
112 whole_static_libs: ["libservices.core"],
113}
atrost86895aa2019-08-19 16:51:15 +0100114
115platform_compat_config {
116 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100117 src: ":services",
118}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000119
120filegroup {
121 name: "art-profile",
122 srcs: ["art-profile"],
123}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900124
125// API stub
126// =============================================================
127
128droidstubs {
129 name: "services-stubs.sources",
Jiyong Park5ba39df2020-01-19 19:08:37 +0900130 srcs: [":services-all-sources"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900131 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800132 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900133 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000134 " --hide InternalClasses" + // com.android.* classes are okay in this interface
135 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900136 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900137 " --hide DeprecationMismatch" +
138 " --hide HiddenTypedefConstant",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900139 visibility: ["//visibility:private"],
Anton Hansson442fcf42020-03-27 15:09:26 +0000140 filter_packages: ["com.android."],
Jiyong Park13c923d2019-12-20 16:29:45 +0900141 check_api: {
142 current: {
143 api_file: "api/current.txt",
144 removed_api_file: "api/removed.txt",
145 },
Anton Hanssondaa9d882020-02-19 11:35:09 +0000146 last_released: {
Anton Hansson48ee95e2020-05-02 17:49:26 +0100147 api_file: ":android.api.system-server.latest",
Anton Hansson960c6752020-05-02 18:00:30 +0100148 removed_api_file: ":removed.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000149 baseline_file: ":system-server-api-incompatibilities-with-last-released"
150 },
151 api_lint: {
152 enabled: true,
Anton Hansson48ee95e2020-05-02 17:49:26 +0100153 new_since: ":android.api.system-server.latest",
Anton Hanssondaa9d882020-02-19 11:35:09 +0000154 baseline_file: "api/lint-baseline.txt",
155 },
Jiyong Park13c923d2019-12-20 16:29:45 +0900156 },
Anton Hanssond9a3fee2020-03-23 18:08:55 +0000157 dist: {
158 targets: ["sdk", "win_sdk"],
159 dir: "apistubs/android/system-server/api",
160 dest: "android.txt",
161 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900162}
163
164java_library {
Anton Hanssona49fb992020-03-19 15:23:32 +0000165 name: "android_system_server_stubs_current",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000166 defaults: ["android_stubs_dists_default"],
Jiyong Parkabc72e42019-11-17 15:17:53 +0900167 srcs: [":services-stubs.sources"],
168 installable: false,
Anton Hanssona49fb992020-03-19 15:23:32 +0000169 static_libs: ["android_module_lib_stubs_current"],
Anton Hansson4304e602020-07-21 12:55:48 +0100170 sdk_version: "none",
171 system_modules: "none",
172 java_version: "1.8",
Anton Hansson53cf0ba2020-08-18 12:35:31 +0000173 dist: {
174 dir: "apistubs/android/system-server",
175 },
Jiyong Parkabc72e42019-11-17 15:17:53 +0900176}