blob: 82d9b3e51c2d9a8acc1cf9a7d1422ae6beae0948 [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 },
Azhara Assanovaa131ad92021-06-11 09:53:48 +000024 lint: {
25 extra_check_modules: ["AndroidFrameworkLintChecker"],
26 },
Anton Hanssone3d44e82021-04-12 18:14:30 +010027}
28
Jiyong Parkbae2e902019-11-17 13:11:19 +090029filegroup {
30 name: "services-main-sources",
Colin Cross33b78ef2021-03-26 10:31:25 -070031 srcs: [
32 "java/**/*.java",
33 "java/**/package.html",
34 ],
Jiyong Parkbae2e902019-11-17 13:11:19 +090035 path: "java",
36 visibility: ["//visibility:private"],
37}
38
39filegroup {
Andrei Onea43114702021-02-10 20:53:12 +000040 name: "services-non-updatable-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090041 srcs: [
42 ":services.core-sources",
Hongwei Wangcdcb68d2020-11-23 12:48:05 -080043 ":services.core-sources-am-wm",
Colin Cross33b78ef2021-03-26 10:31:25 -070044 "core/java/com/android/server/am/package.html",
Jiyong Parkbae2e902019-11-17 13:11:19 +090045 ":services.accessibility-sources",
46 ":services.appprediction-sources",
47 ":services.appwidget-sources",
48 ":services.autofill-sources",
49 ":services.backup-sources",
Jiyong Parkabc72e42019-11-17 15:17:53 +090050 ":backuplib-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090051 ":services.companion-sources",
52 ":services.contentcapture-sources",
53 ":services.contentsuggestions-sources",
54 ":services.coverage-sources",
55 ":services.devicepolicy-sources",
56 ":services.midi-sources",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +020057 ":services.musicsearch-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090058 ":services.net-sources",
59 ":services.print-sources",
Yi Kong86f85932020-06-29 20:03:55 +080060 ":services.profcollect-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090061 ":services.restrictions-sources",
Hyunyoung Song21e60a92020-11-20 20:27:54 -080062 ":services.searchui-sources",
Shashwat Razdand33e8c32021-01-29 13:02:19 -080063 ":services.smartspace-sources",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +000064 ":services.speech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090065 ":services.startop.iorap-sources",
66 ":services.systemcaptions-sources",
Adam He2653f232020-11-30 18:23:20 -080067 ":services.translation-sources",
Alex Agranovich50c987f2021-02-18 09:19:33 +000068 ":services.texttospeech-sources",
Jiyong Parkbae2e902019-11-17 13:11:19 +090069 ":services.usage-sources",
70 ":services.usb-sources",
71 ":services.voiceinteraction-sources",
Roshan Piusea33fb92020-02-20 12:49:45 -080072 ":services.wifi-sources",
Andrei Onea43114702021-02-10 20:53:12 +000073 ],
74 visibility: ["//visibility:private"],
75}
76
Felipe Lemefec71a72021-04-01 23:32:53 -070077java_library {
78 name: "Slogf",
79 srcs: ["core/java/com/android/server/utils/Slogf.java"],
80}
81
Colin Crosseb652a42017-12-05 09:46:29 -080082// merge all required services into one jar
83// ============================================================
84java_library {
85 name: "services",
Colin Crossa12c0f52018-06-27 11:00:11 -070086 installable: true,
Colin Crosseb652a42017-12-05 09:46:29 -080087
88 dex_preopt: {
89 app_image: true,
90 profile: "art-profile",
91 },
92
Jiyong Parkbae2e902019-11-17 13:11:19 +090093 srcs: [":services-main-sources"],
Colin Crosseb652a42017-12-05 09:46:29 -080094
95 // The convention is to name each service module 'services.$(module_name)'
96 static_libs: [
Colin Cross4c0b06b2017-12-12 19:43:04 -080097 "services.core",
Colin Crosseb652a42017-12-05 09:46:29 -080098 "services.accessibility",
Sunny Goyal54e91342018-11-14 11:59:02 -080099 "services.appprediction",
Colin Crosseb652a42017-12-05 09:46:29 -0800100 "services.appwidget",
101 "services.autofill",
102 "services.backup",
103 "services.companion",
Felipe Leme749b8892018-12-03 16:30:30 -0800104 "services.contentcapture",
Winson Chung3fb0f252019-01-08 17:41:55 -0800105 "services.contentsuggestions",
Colin Crosseb652a42017-12-05 09:46:29 -0800106 "services.coverage",
107 "services.devicepolicy",
108 "services.midi",
Nick Moukhinecf47bdd2020-08-19 16:29:18 +0200109 "services.musicsearch",
Colin Crosseb652a42017-12-05 09:46:29 -0800110 "services.net",
Danning Chen20b32ed2019-12-18 16:52:03 -0800111 "services.people",
Colin Crosseb652a42017-12-05 09:46:29 -0800112 "services.print",
Yi Kong86f85932020-06-29 20:03:55 +0800113 "services.profcollect",
Colin Crosseb652a42017-12-05 09:46:29 -0800114 "services.restrictions",
Hyunyoung Song21e60a92020-11-20 20:27:54 -0800115 "services.searchui",
Shashwat Razdand33e8c32021-01-29 13:02:19 -0800116 "services.smartspace",
Eugenio Marchioric3c0a1e2020-12-23 10:44:55 +0000117 "services.speech",
Igor Murashkin4de1e162018-11-26 10:33:17 -0800118 "services.startop",
Robert Berrye14120e2019-03-18 16:33:42 -0400119 "services.systemcaptions",
Adam He2653f232020-11-30 18:23:20 -0800120 "services.translation",
Alex Agranovich50c987f2021-02-18 09:19:33 +0000121 "services.texttospeech",
Colin Crosseb652a42017-12-05 09:46:29 -0800122 "services.usage",
123 "services.usb",
124 "services.voiceinteraction",
Roshan Piusea33fb92020-02-20 12:49:45 -0800125 "services.wifi",
Dmitri Plotnikov4eaac3a2020-05-04 17:00:16 -0700126 "service-blobstore",
127 "service-jobscheduler",
Colin Crosseb652a42017-12-05 09:46:29 -0800128 "android.hidl.base-V1.0-java",
129 ],
130
131 libs: [
132 "android.hidl.manager-V1.0-java",
Paul Duffinabebc6a2020-05-31 11:35:50 +0100133 "framework-tethering.stubs.module_lib",
Chris Wailes09724a72021-02-08 10:00:13 -0800134 "service-art.stubs.system_server",
Colin Crosseb652a42017-12-05 09:46:29 -0800135 ],
136
137 // Uncomment to enable output of certain warnings (deprecated, unchecked)
138 //javacflags: ["-Xlint"],
Colin Crosseb652a42017-12-05 09:46:29 -0800139}
140
Colin Cross3a7d8992017-12-05 17:33:58 -0800141// native library
142// =============================================================
143
144cc_library_shared {
145 name: "libandroid_servers",
146 defaults: ["libservices.core-libs"],
147 whole_static_libs: ["libservices.core"],
148}
atrost86895aa2019-08-19 16:51:15 +0100149
150platform_compat_config {
151 name: "services-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100152 src: ":services",
153}
Ulya Trafimovich0d1b063d62019-12-03 11:59:51 +0000154
155filegroup {
156 name: "art-profile",
157 srcs: ["art-profile"],
158}
Jiyong Parkabc72e42019-11-17 15:17:53 +0900159
160// API stub
161// =============================================================
162
Andrei Onea43114702021-02-10 20:53:12 +0000163stubs_defaults {
164 name: "services-stubs-default",
Jiyong Parkabc72e42019-11-17 15:17:53 +0900165 installable: false,
Makoto Onukiaf97aef2020-02-03 10:32:52 -0800166 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900167 " --hide-annotation android.annotation.Hide" +
Anton Hanssonf74130f2020-02-19 18:29:12 +0000168 " --hide InternalClasses" + // com.android.* classes are okay in this interface
169 // TODO: remove the --hide options below
Jiyong Parkabc72e42019-11-17 15:17:53 +0900170 " --hide-package com.google.android.startop.iorap" +
Jiyong Parkabc72e42019-11-17 15:17:53 +0900171 " --hide DeprecationMismatch" +
172 " --hide HiddenTypedefConstant",
Andrei Oneafaa271a2021-03-17 13:32:51 +0000173 visibility: ["//frameworks/base:__subpackages__"],
Felipe Lemed3895b62021-03-24 16:55:27 -0700174 filter_packages: ["com.android."],
Andrei Onea43114702021-02-10 20:53:12 +0000175}
176
177droidstubs {
Andrei Oneafaa271a2021-03-17 13:32:51 +0000178 name: "services-non-updatable-stubs",
Andrei Onea43114702021-02-10 20:53:12 +0000179 srcs: [":services-non-updatable-sources"],
180 defaults: ["services-stubs-default"],
181 check_api: {
182 current: {
Andrei Onea8168dc22021-04-30 12:52:36 +0000183 api_file: "api/current.txt",
184 removed_api_file: "api/removed.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000185 },
186 api_lint: {
187 enabled: true,
188 new_since: ":android-non-updatable.api.system-server.latest",
Andrei Onea8168dc22021-04-30 12:52:36 +0000189 baseline_file: "api/lint-baseline.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000190 },
191 },
192 dists: [
193 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700194 targets: [
195 "sdk",
196 "win_sdk",
197 ],
Andrei Onea43114702021-02-10 20:53:12 +0000198 dir: "apistubs/android/system-server/api",
199 dest: "android-non-updatable.txt",
Felipe Lemed3895b62021-03-24 16:55:27 -0700200 tag: ".api.txt",
Andrei Onea43114702021-02-10 20:53:12 +0000201 },
202 {
Felipe Lemed3895b62021-03-24 16:55:27 -0700203 targets: [
204 "sdk",
205 "win_sdk",
206 ],
Andrei Onea43114702021-02-10 20:53:12 +0000207 dir: "apistubs/android/system-server/api",
208 dest: "android-non-updatable-removed.txt",
209 tag: ".removed-api.txt",
210 },
Felipe Lemed3895b62021-03-24 16:55:27 -0700211 ],
212}