blob: cc0fd98c70604ca7359943a57141581d53d2fcd7 [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
Anton Hanssone3d44e82021-04-12 18:14:30 +010010// Defaults for platform code that runs inside system_server
11java_defaults {
12 name: "platform_service_defaults",
13 plugins: ["error_prone_android_framework"],
14 errorprone: {
15 javacflags: [
16 // "-Xep:AndroidFrameworkBinderIdentity:ERROR",
17 "-Xep:AndroidFrameworkCompatChange:ERROR",
18 // "-Xep:AndroidFrameworkUid:ERROR",
19 // NOTE: only enable to generate local patchfiles
20 // "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
21 // "-XepPatchLocation:/tmp/refaster/",
22 ],
23 },
24}
25
Jiyong Parkbae2e902019-11-17 13:11:19 +090026filegroup {
27 name: "services-main-sources",
Colin Cross33b78ef2021-03-26 10:31:25 -070028 srcs: [
29 "java/**/*.java",
30 "java/**/package.html",
31 ],
Jiyong Parkbae2e902019-11-17 13:11:19 +090032 path: "java",
33 visibility: ["//visibility:private"],
34}
35
36filegroup {
Andrei Onea43114702021-02-10 20:53:12 +000037 name: "services-non-updatable-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090038 srcs: [
39 ":services.core-sources",
Hongwei Wangcdcb68d2020-11-23 12:48:05 -080040 ":services.core-sources-am-wm",
Colin Cross33b78ef2021-03-26 10:31:25 -070041 "core/java/com/android/server/am/package.html",
Jiyong Parkbae2e902019-11-17 13:11:19 +090042 ":services.accessibility-sources",
43 ":services.appprediction-sources",
44 ":services.appwidget-sources",
45 ":services.autofill-sources",
46 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090047 ":backuplib-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090048 ":services.companion-sources",
49 ":services.contentcapture-sources",
50 ":services.contentsuggestions-sources",
51 ":services.coverage-sources",
52 ":services.devicepolicy-sources",
53 ":services.midi-sources",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020054 ":services.musicsearch-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090055 ":services.net-sources",
56 ":services.print-sources",
Yi Kong86f85932020-06-29 20:03:55 +080057 ":services.profcollect-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090058 ":services.restrictions-sources",
Hyunyoung Song21e60a92020-11-20 20:27:54 -080059 ":services.searchui-sources",
Shashwat Razdand33e8c32021-01-29 13:02:19 -080060 ":services.smartspace-sources",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +000061 ":services.speech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090062 ":services.startop.iorap-sources",
63 ":services.systemcaptions-sources",
Adam He2653f232020-11-30 18:23:20 -080064 ":services.translation-sources",
Alex Agranovich50c987f2021-02-18 09:19:33 +000065 ":services.texttospeech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090066 ":services.usage-sources",
67 ":services.usb-sources",
Roshan Pius27e1a872021-03-31 12:07:17 -070068 ":services.uwb-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090069 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080070 ":services.wifi-sources",
Andrei Onea43114702021-02-10 20:53:12 +000071 ],
72 visibility: ["//visibility:private"],
73}
74
Felipe Lemefec71a72021-04-01 23:32:53 -070075java_library {
76 name: "Slogf",
77 srcs: ["core/java/com/android/server/utils/Slogf.java"],
78}
79
Colin Crosseb652a42017-12-05 09:46:29 -080080// merge all required services into one jar
81// ============================================================
82java_library {
83 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070084 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080085
86 dex_preopt: {
87 app_image: true,
88 profile: "art-profile",
89 },
90
Jiyong Parkbae2e902019-11-17 13:11:19 +090091 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080092
93 // The convention is to name each service module 'services.$(module_name)'
94 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080095 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080096 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080097 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -080098 "services.appwidget",
99 "services.autofill",
100 "services.backup",
101 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -0800102 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -0800103 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -0800104 "services.coverage",
105 "services.devicepolicy",
106 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +0200107 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -0800108 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -0800109 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -0800110 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +0800111 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -0800112 "services.restrictions",
Hyunyoung Song21e60a92020-11-20 20:27:54 -0800113 "services.searchui",
Shashwat Razdand33e8c32021-01-29 13:02:19 -0800114 "services.smartspace",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +0000115 "services.speech",
Igor Murashkin4de1e162018-11-26 10:33:17 -0800116 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -0400117 "services.systemcaptions",
Adam He2653f232020-11-30 18:23:20 -0800118 "services.translation",
Alex Agranovich50c987f2021-02-18 09:19:33 +0000119 "services.texttospeech",
Colin Crosseb652a42017-12-05 09:46:29 -0800120 "services.usage",
121 "services.usb",
Roshan Pius27e1a872021-03-31 12:07:17 -0700122 "services.uwb",
Colin Crosseb652a42017-12-05 09:46:29 -0800123 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800124 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700125 "service-blobstore",
126 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800127 "android.hidl.base-V1.0-java",
128 ],
129
130 libs: [
131 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100132 "framework-tethering.stubs.module_lib",
Chris Wailes09724a72021-02-08 10:00:13 -0800133 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800134 ],
135
136 // Uncomment to enable output of certain warnings (deprecated, unchecked)
137 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800138}
139
Colin Cross3a7d8992017-12-05 17:33:58 -0800140// native library
141// =============================================================
142
143cc_library_shared {
144 name: "libandroid_servers",
145 defaults: ["libservices.core-libs"],
146 whole_static_libs: ["libservices.core"],
147}
atrost86895aa2019-08-19 16:51:15 +0100148
149platform_compat_config {
150 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100151 src: ":services",
152}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000153
154filegroup {
155 name: "art-profile",
156 srcs: ["art-profile"],
157}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900158
159// API stub
160// =============================================================
161
Andrei Onea43114702021-02-10 20:53:12 +0000162stubs_defaults {
163 name: "services-stubs-default",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900164 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800165 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900166 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000167 " --hide InternalClasses" + // com.android.* classes are okay in this interface
168 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900169 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900170 " --hide DeprecationMismatch" +
171 " --hide HiddenTypedefConstant",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000172 visibility: ["//frameworks/base:__subpackages__"],
Felipe Lemed3895b62021-03-24 16:55:27 -0700173 filter_packages: ["com.android."],
Andrei Onea43114702021-02-10 20:53:12 +0000174}
175
176droidstubs {
Andrei Oneafaa271a2021-03-17 13:32:51 +0000177 name: "services-non-updatable-stubs",
Andrei Onea43114702021-02-10 20:53:12 +0000178 srcs: [":services-non-updatable-sources"],
179 defaults: ["services-stubs-default"],
180 check_api: {
181 current: {
Andrei Onea8168dc22021-04-30 12:52:36 +0000182 api_file: "api/current.txt",
183 removed_api_file: "api/removed.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000184 },
185 api_lint: {
186 enabled: true,
187 new_since: ":android-non-updatable.api.system-server.latest",
Andrei Onea8168dc22021-04-30 12:52:36 +0000188 baseline_file: "api/lint-baseline.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000189 },
190 },
191 dists: [
192 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700193 targets: [
194 "sdk",
195 "win_sdk",
196 ],
Andrei Onea43114702021-02-10 20:53:12 +0000197 dir: "apistubs/android/system-server/api",
198 dest: "android-non-updatable.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700199 tag: ".api.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000200 },
201 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700202 targets: [
203 "sdk",
204 "win_sdk",
205 ],
Andrei Onea43114702021-02-10 20:53:12 +0000206 dir: "apistubs/android/system-server/api",
207 dest: "android-non-updatable-removed.txt",
208 tag: ".removed-api.txt",
209 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700210 ],
211}