blob: bf901ec2f50c5bffd5a4d9465313fcf7c5f0b4ba [file] [log] [blame]
Dan Albert2a8d9c22016-09-23 15:55:49 -07001// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Colin Crosscf3a0b52017-11-16 00:15:28 -080015// Build the master framework library.
16
17// READ ME: ########################################################
18//
19// When updating this list of aidl files, consider if that aidl is
20// part of the SDK API. If it is, also add it to the list in Android.mk
21// that is preprocessed and distributed with the SDK. This list should
22// not contain any aidl files for parcelables, but the one below should
23// if you intend for 3rd parties to be able to send those objects
24// across process boundaries.
25//
26// READ ME: ########################################################
27
Artur Satayev3cc3fa42019-08-02 16:42:07 +010028filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +090029 name: "framework-core-sources",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010030 srcs: [
Artur Satayev3cc3fa42019-08-02 16:42:07 +010031 "core/java/**/*.java",
Jiyong Parkb3609312019-08-16 21:17:14 +090032 "core/java/**/*.aidl",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010033 ],
Jiyong Parkb3609312019-08-16 21:17:14 +090034 path: "core/java",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010035}
36
Jiyong Park00ea0b12019-10-31 20:38:47 +090037// These are subset of framework-core-sources that are needed by the
38// android.test.mock library. Ideally, the library should use public APIs only,
39// but unfortunately its API signature has some references to these private APIs.
40filegroup {
41 name: "framework-core-sources-for-test-mock",
42 srcs: [
43 "core/java/android/app/IApplicationThread.aidl",
44 "core/java/android/app/IServiceConnection.aidl",
45 "core/java/android/content/IContentProvider.java",
46 "core/java/android/content/pm/IPackageDataObserver.aidl",
47 "core/java/android/content/pm/InstantAppInfo.java",
48 "core/java/android/content/pm/KeySet.java",
49 "core/java/android/content/pm/PackageManager.java",
50 "core/java/android/content/pm/VerifierDeviceIdentity.java",
51 "core/java/android/content/res/Resources.java",
52 "core/java/android/os/storage/VolumeInfo.java",
53 "core/java/android/view/DisplayAdjustments.java",
54 ],
55 path: "core/java",
56}
57
Jiyong Parkb3609312019-08-16 21:17:14 +090058filegroup {
59 name: "framework-drm-sources",
60 srcs: [
61 "drm/java/**/*.java",
62 ],
63 path: "drm/java",
64}
Jiyong Park1cc95662019-08-07 22:45:07 +090065
Jiyong Parkb3609312019-08-16 21:17:14 +090066filegroup {
67 name: "framework-graphics-sources",
68 srcs: [
69 "graphics/java/**/*.java",
70 "graphics/java/**/*.aidl",
71 ],
72 path: "graphics/java",
73}
74
75filegroup {
76 name: "framework-keystore-sources",
77 srcs: [
78 "keystore/java/**/*.java",
79 "keystore/java/**/*.aidl",
80 ],
81 path: "keystore/java",
82}
83
84filegroup {
85 name: "framework-location-sources",
86 srcs: [
87 "location/java/**/*.java",
88 "location/java/**/*.aidl",
89 ],
90 path: "location/java",
91}
92
93filegroup {
94 name: "framework-lowpan-sources",
95 srcs: [
96 "lowpan/java/**/*.java",
97 "lowpan/java/**/*.aidl",
98 ],
99 path: "lowpan/java",
100}
101
102filegroup {
103 name: "framework-media-sources",
104 srcs: [
105 "media/java/**/*.java",
106 "media/java/**/*.aidl",
107 ],
108 path: "media/java",
109}
110
111filegroup {
112 name: "framework-mca-effect-sources",
113 srcs: [
114 "media/mca/effect/java/**/*.java",
115 ],
116 path: "media/mca/effect/java",
117}
118
119filegroup {
120 name: "framework-mca-filterfw-sources",
121 srcs: [
122 "media/mca/filterfw/java/**/*.java",
123 ],
124 path: "media/mca/filterfw/java",
125}
126
127filegroup {
128 name: "framework-mca-filterpacks-sources",
129 srcs: [
130 "media/mca/filterpacks/java/**/*.java",
131 ],
132 path: "media/mca/filterpacks/java",
133}
134
135filegroup {
Tobias Thierer878c77b2019-08-18 15:19:45 +0100136 name: "framework-mime-sources",
137 srcs: [
138 "mime/java/**/*.java",
139 ],
140 path: "mime/java",
141}
142
143filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900144 name: "framework-opengl-sources",
145 srcs: [
146 "opengl/java/**/*.java",
147 ],
148 path: "opengl/java",
149}
150
151filegroup {
152 name: "framework-rs-sources",
153 srcs: [
154 "rs/java/**/*.java",
155 ],
156 path: "rs/java",
157}
158
159filegroup {
160 name: "framework-sax-sources",
161 srcs: [
162 "sax/java/**/*.java",
163 ],
164 path: "sax/java",
165}
166
167filegroup {
168 name: "framework-telecomm-sources",
169 srcs: [
170 "telecomm/java/**/*.java",
171 "telecomm/java/**/*.aidl",
172 ],
173 path: "telecomm/java",
174}
175
176filegroup {
177 name: "framework-telephony-sources",
178 srcs: [
179 "telephony/java/**/*.java",
180 "telephony/java/**/*.aidl",
181 ],
182 path: "telephony/java",
183}
184
185filegroup {
Amit Mahajand3551532019-09-23 17:59:57 -0700186 name: "framework-telephony-common-sources",
187 srcs: [
188 "telephony/common/**/*.java",
189 ],
190 path: "telephony/common",
191}
192
193filegroup {
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700194 name: "framework-mms-sources",
195 srcs: [
196 "mms/java/**/*.java",
197 "mms/java/**/*.aidl",
198 ],
199 path: "mms/java",
200}
201
202filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900203 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900204 srcs: [
205 // Java/AIDL sources under frameworks/base
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700206 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900207 ":framework-core-sources",
208 ":framework-drm-sources",
209 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900210 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900211 ":framework-keystore-sources",
212 ":framework-location-sources",
213 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900214 ":framework-mca-effect-sources",
215 ":framework-mca-filterfw-sources",
216 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900217 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700218 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900219 ":framework-opengl-sources",
220 ":framework-rs-sources",
221 ":framework-sax-sources",
222 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700223 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-telephony-sources",
David Su130441b2019-12-14 21:37:20 -0800225 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -0800226 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900227 ":PacProcessor-aidl-sources",
228 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900229
atrost87488352019-10-10 19:27:31 +0100230 // AIDL from frameworks/base/native/
231 ":platform-compat-native-aidl",
232
Jiyong Park20426532019-08-19 15:24:49 +0900233 // AIDL sources from external directories
234 ":dumpstate_aidl",
235 ":framework_native_aidl",
236 ":gatekeeper_aidl",
237 ":gsiservice_aidl",
238 ":incidentcompanion_aidl",
239 ":installd_aidl",
240 ":keystore_aidl",
241 ":libaudioclient_aidl",
242 ":libbinder_aidl",
243 ":libbluetooth-binder-aidl",
244 ":libcamera_client_aidl",
245 ":libcamera_client_framework_aidl",
246 ":libupdate_engine_aidl",
Ruchir Rastogicd9dd942019-11-27 15:26:03 -0800247 // TODO: this needs to be removed when statsd-framework.jar is separated out
Jeffrey Huang8c1ae5a2019-12-12 10:56:24 -0800248 ":statsd_java_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900249 ":storaged_aidl",
250 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900251
Jiyong Park20426532019-08-19 15:24:49 +0900252 // For the generated R.java and Manifest.java
253 ":framework-res{.aapt.srcjar}",
254
255 // etc.
256 ":framework-javastream-protos",
257 ":framework-statslog-gen",
258 ],
259}
Jiyong Park1cc95662019-08-07 22:45:07 +0900260
Jiyong Parkae9972b2019-09-15 20:19:02 +0900261filegroup {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000262 name: "framework-updatable-sources",
263 srcs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800264 ":framework-appsearch-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000265 ":framework-sdkext-sources",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800266 ":framework-statsd-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000267 ":updatable-media-srcs",
David Su754fcc22019-09-04 14:31:58 -0700268 ":framework-wifi-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000269 ]
270}
271
272filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900273 name: "framework-all-sources",
274 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000275 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900276 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000277 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900278 ],
279}
280
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100281java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700282 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700283 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900284 export_include_dirs: [
285 "core/java",
286 "drm/java",
287 "graphics/java",
288 "keystore/java",
289 "location/java",
290 "lowpan/java",
291 "media/java",
292 "media/apex/java",
293 "media/mca/effect/java",
294 "media/mca/filterfw/java",
295 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700296 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900297 "opengl/java",
298 "rs/java",
299 "sax/java",
300 "telecomm/java",
301 "telephony/java",
302 "wifi/java",
303 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700304 },
Adam Pardyl50207032019-09-09 14:37:27 +0200305
306 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200307 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200308 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200309 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200310 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700311}
312
Jiyong Park20426532019-08-19 15:24:49 +0900313// Collection of classes that are generated from non-Java files that are not listed in
314// framework_srcs. These have no or very limited dependency to the framework.
315java_library {
316 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800317 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100318 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700319 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800320 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800321 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800322 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000323 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800324 "android.hardware.cas-V1.0-java",
325 "android.hardware.contexthub-V1.0-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800326 "android.hardware.gnss-V1.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800327 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800328 "android.hardware.radio-V1.0-java",
329 "android.hardware.radio-V1.1-java",
330 "android.hardware.radio-V1.2-java",
331 "android.hardware.radio-V1.3-java",
332 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800333 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800334 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800335 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700336 "android.hardware.thermal-V1.1-java",
337 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800338 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700339 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800340 "android.hardware.usb-V1.0-java-constants",
341 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800342 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800343 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000344 "android.hardware.vibrator-V1.0-java",
345 "android.hardware.vibrator-V1.1-java",
346 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900347 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800348 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000349 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900350
351 "com.android.sysprop.apex",
352 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800353 ],
Etan Cohen73450f22019-12-12 23:29:25 -0800354 aidl: {
355 include_dirs: ["system/connectivity/wificond/aidl"],
356 },
Jiyong Park20426532019-08-19 15:24:49 +0900357 sdk_version: "core_platform",
358 installable: false,
359}
360
361java_defaults {
362 name: "framework-defaults",
363 defaults: ["framework-aidl-export-defaults"],
364 installable: true,
365
Jiyong Park20426532019-08-19 15:24:49 +0900366 aidl: {
367 generate_get_transaction_name: true,
368 },
369
Jiyong Parkae9972b2019-09-15 20:19:02 +0900370 srcs: ["core/java/**/*.logtags"],
371
Jiyong Park20426532019-08-19 15:24:49 +0900372 exclude_srcs: [
373 // See comment on framework-atb-backward-compatibility module below
Winson14ff7172019-10-23 10:42:27 -0700374 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900375 ],
376
377 sdk_version: "core_platform",
378 libs: [
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000379 "app-compat-annotations",
Jiyong Park20426532019-08-19 15:24:49 +0900380 "ext",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000381 "unsupportedappusage",
Jiyong Park20426532019-08-19 15:24:49 +0900382 "updatable_media_stubs",
383 ],
384
385 jarjar_rules: ":framework-jarjar-rules",
386
Tobias Thierer878c77b2019-08-18 15:19:45 +0100387 static_libs: [
388 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100389 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800390
Colin Crosscf3a0b52017-11-16 00:15:28 -0800391 dxflags: [
392 "--core-library",
393 "--multi-dex",
394 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100395
Eugene Susla3b2fe612019-08-06 18:47:14 -0700396 plugins: [
397 "view-inspector-annotation-processor",
398 "staledataclass-annotation-processor",
399 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100400}
401
Colin Crossbc2dc312018-10-26 22:34:06 -0700402filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800403 name: "framework-jarjar-rules",
David Su130441b2019-12-14 21:37:20 -0800404 srcs: ["framework-jarjar-rules.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800405}
406
407filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700408 name: "libincident_aidl",
409 srcs: [
410 "core/java/android/os/IIncidentManager.aidl",
411 "core/java/android/os/IIncidentReportStatusListener.aidl",
412 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700413 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700414}
415
416filegroup {
Michael Wrightc390fbe2018-12-12 19:45:09 +0000417 name: "libvibrator_aidl",
418 srcs: [
419 "core/java/android/os/IExternalVibrationController.aidl",
420 "core/java/android/os/IExternalVibratorService.aidl",
421 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700422 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000423}
424
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100425java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700426 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100427 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900428 srcs: [":framework-non-updatable-sources"],
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800429 libs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800430 "framework-appsearch-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800431 // TODO(b/146167933): Use framework-statsd-stubs
432 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700433 "framework-wifi-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800434 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700435 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900436 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100437 required: [
438 "framework-platform-compat-config",
439 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100440 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100441 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100442 "services-devicepolicy-platform-compat-config",
atrostc3c2e4d2019-11-29 11:27:27 +0000443 "services-core-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100444 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000445 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000446 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
447 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000448 "mimemap",
449 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900450 // For backwards compatibility.
451 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900452 apex_available: ["//apex_available:platform"],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900453}
454
455// This "framework" module is NOT installed to the device. It's
456// "framework-minus-apex" that gets installed to the device. Note that
457// the filename is still framework.jar (via the stem property) for
458// compatibility reason. The purpose of this module is to provide
459// framework APIs (both public and private) for bundled apps.
460// "framework-minus-apex" can't be used for the purpose because 1)
461// many apps have already hardcoded the name "framework" and
462// 2) it lacks API symbols from updatable modules - as it's clear from
463// its suffix "-minus-apex".
464java_library {
465 name: "framework",
466 defaults: ["framework-aidl-export-defaults"],
467 installable: false, // this lib is a build-only library
468 static_libs: [
469 "framework-minus-apex",
Jiyong Park92721342019-12-18 17:26:38 +0900470 "updatable_media_stubs",
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800471 "framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
Anton Hansson355000d2019-12-06 17:07:45 +0000472 "framework-sdkext-stubs-systemapi",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800473 // TODO(b/146167933): Use framework-statsd-stubs instead.
474 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700475 // TODO(b/140299412): should be framework-wifi-stubs
476 "framework-wifi",
Anton Hansson355000d2019-12-06 17:07:45 +0000477 // TODO(jiyong): add more stubs for APEXes here
Jiyong Park911cd4f2019-10-21 14:35:14 +0900478 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700479 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900480 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700481}
482
483java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900484 name: "framework-all",
485 defaults: ["framework-defaults"],
486 srcs: [":framework-all-sources"],
487 installable: false,
Jiyong Park352f9e22019-12-09 14:45:07 +0900488 static_libs: ["exoplayer2-core"],
489 apex_available: ["//apex_available:platform"],
Jiyong Park97183492019-11-14 03:07:36 +0000490}
491
492java_library {
493 name: "framework-annotation-proc",
494 defaults: ["framework-aidl-export-defaults"],
495 srcs: [":framework-all-sources"],
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000496 libs: [
497 "app-compat-annotations",
498 "unsupportedappusage",
499 ],
Jiyong Park97183492019-11-14 03:07:36 +0000500 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100501 plugins: [
502 "unsupportedappusage-annotation-processor",
503 "compat-changeid-annotation-processor",
504 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000505 static_libs: [
506 "exoplayer2-core"
507 ]
atrostb9c34502019-08-05 12:22:18 +0100508}
509
510platform_compat_config {
511 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000512 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100513}
514
Paul Duffin521975802019-06-05 10:35:08 +0100515// A library including just UnsupportedAppUsage.java classes.
516//
517// Provided for target so that libraries can use it without depending on
518// the whole of framework or the core platform API.
519//
520// Built for host so that the annotation processor can also use this annotation.
521java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100522 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100523 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100524 srcs: [
525 "core/java/android/annotation/IntDef.java",
526 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100527 ],
528 static_libs: [
529 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100530 ],
Paul Duffin521975802019-06-05 10:35:08 +0100531
532 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800533}
534
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000535// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000536// android.test.base library has been removed and which provides support for
537// maintaining backwards compatibility for APKs that target pre-P and depend on
538// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
539// specified on the build command line.
540java_library {
541 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000542 installable: true,
atrost1a945502019-11-04 17:03:54 +0000543 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000544 srcs: [
Winson14ff7172019-10-23 10:42:27 -0700545 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000546 ],
547}
548
Colin Crosscf3a0b52017-11-16 00:15:28 -0800549genrule {
550 name: "framework-statslog-gen",
551 tools: ["stats-log-api-gen"],
552 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800553 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800554}
555
556gensrcs {
557 name: "framework-javastream-protos",
558 depfile: true,
559
560 tools: [
561 "aprotoc",
562 "protoc-gen-javastream",
563 "soong_zip",
564 ],
565
Anton Hanssond82b2f72019-11-18 13:34:56 +0000566 cmd: "mkdir -p $(genDir)/$(in) " +
567 "&& $(location aprotoc) " +
568 " --plugin=$(location protoc-gen-javastream) " +
569 " --dependency_out=$(depfile) " +
570 " --javastream_out=$(genDir)/$(in) " +
571 " -Iexternal/protobuf/src " +
572 " -I . " +
573 " $(in) " +
574 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
575
Yi Jin437aa6e2018-01-10 11:34:26 -0800576 srcs: [
577 "core/proto/**/*.proto",
578 "libs/incident/**/*.proto",
579 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800580 output_extension: "srcjar",
581}
582
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900583filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900584 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900585 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900586 "core/java/android/annotation/NonNull.java",
587 "core/java/android/annotation/Nullable.java",
588 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900589 "core/java/android/annotation/IntRange.java",
Anton Hanssondc1e99b2019-12-06 17:07:28 +0000590 "core/java/android/annotation/SystemApi.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900591 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900592 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900593 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100594 ],
Chalard Jean95213512019-01-30 21:04:58 +0900595}
596
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000597java_library {
598 name: "framework-annotations-lib",
599 srcs: [ ":framework-annotations" ],
600 sdk_version: "current",
601}
602
Chalard Jean95213512019-01-30 21:04:58 +0900603filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900604 name: "framework-networkstack-shared-srcs",
605 srcs: [
606 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900607 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900608 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900609 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900610 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900611 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900612 "core/java/com/android/internal/util/IState.java",
613 "core/java/com/android/internal/util/MessageUtils.java",
614 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900615 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900616 "core/java/com/android/internal/util/State.java",
617 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900618 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900619 "core/java/com/android/internal/util/WakeupMessage.java",
620 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100621 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900622}
623
markchiena6ba54d2019-09-03 15:58:06 +0800624filegroup {
625 name: "framework-tethering-shared-srcs",
626 srcs: [
627 "core/java/android/util/LocalLog.java",
628 ],
629}
Colin Crossd8e02252017-10-02 17:14:22 -0700630// Build ext.jar
631// ============================================================
632java_library {
633 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700634 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100635 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700636 static_libs: [
637 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700638 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000639 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100640 "libtextclassifier-java",
641 ],
642 required: [
643 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700644 ],
645 dxflags: ["--core-library"],
646}
647
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700648// ==== java proto host library ==============================
649java_library_host {
650 name: "platformprotos",
651 srcs: [
652 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700653 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700654 "core/proto/**/*.proto",
655 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700656 ],
657 proto: {
658 include_dirs: ["external/protobuf/src"],
659 type: "full",
660 },
661 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100662 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700663 },
664}
665
Colin Cross43214162018-08-20 13:57:24 -0700666// ==== java proto device library (for test only) ==============================
667java_library {
668 name: "platformprotosnano",
669 proto: {
670 type: "nano",
671 output_params: ["store_unknown_fields=true"],
672 include_dirs: ["external/protobuf/src"],
673 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000674 exclude_srcs: [
675 "core/proto/android/privacy.proto",
676 "core/proto/android/section.proto",
677 ],
Colin Cross43214162018-08-20 13:57:24 -0700678 sdk_version: "current",
679 srcs: [
680 "core/proto/**/*.proto",
681 "libs/incident/proto/android/os/**/*.proto",
682 ],
683}
684
685// ==== java proto device library (for test only) ==============================
686java_library {
687 name: "platformprotoslite",
688 proto: {
689 type: "lite",
690 include_dirs: ["external/protobuf/src"],
691 },
692
693 srcs: [
694 "core/proto/**/*.proto",
695 "libs/incident/proto/android/os/**/*.proto",
696 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000697 exclude_srcs: [
698 "core/proto/android/privacy.proto",
699 "core/proto/android/section.proto",
700 ],
Colin Cross43214162018-08-20 13:57:24 -0700701 // Protos have lots of MissingOverride and similar.
702 errorprone: {
703 javacflags: ["-XepDisableAllChecks"],
704 },
705}
706
Colin Crossaa0d4352017-05-02 14:14:56 -0700707// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000708cc_defaults {
709 name: "libplatformprotos-defaults",
710
Colin Crossaa0d4352017-05-02 14:14:56 -0700711 proto: {
712 export_proto_headers: true,
713 include_dirs: ["external/protobuf/src"],
714 },
715
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700716 cflags: [
717 "-Wall",
718 "-Werror",
719 "-Wno-unused-parameter",
720 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800721
722 srcs: [
723 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800724 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000725}
726
727cc_library {
728 name: "libplatformprotos",
729 defaults: ["libplatformprotos-defaults"],
730 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800731
Colin Crossaa0d4352017-05-02 14:14:56 -0700732 target: {
733 host: {
734 proto: {
735 type: "full",
736 },
737 },
738 android: {
739 proto: {
740 type: "lite",
741 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000742 shared_libs: [
743 "libprotobuf-cpp-lite",
744 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700745 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700746 enabled: false,
747 },
748 },
749 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700750}
751
Joe Onorato9bd5db72019-04-03 18:19:43 -0700752// This library is meant for vendor code that needs to output protobuf. It links
753// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
754// binary compatibility.
755cc_library {
756 name: "libplatformprotos-static",
757 defaults: ["libplatformprotos-defaults"],
758 host_supported: false,
759
760 // This is okay because this library is only built as a static library. The C++
761 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
762 // but is not authorized to be used outside of debugging.
763 vendor_available: true,
764
765 target: {
766 android: {
767 proto: {
768 type: "lite",
769 },
770 static_libs: [
771 "libprotobuf-cpp-lite",
772 ],
773 shared: {
774 enabled: false,
775 },
776 },
777 },
778}
779
780
Joe Onorato99598ee2019-02-11 15:55:13 +0000781// This is the full proto version of libplatformprotos. It may only
782// be used by test code that is not shipped on the device.
783cc_library {
784 name: "libplatformprotos-test",
785 defaults: ["libplatformprotos-defaults"],
786 host_supported: false,
787
788 target: {
789 android: {
790 proto: {
791 type: "full",
792 },
793 shared: {
794 enabled: false,
795 },
796 },
797 },
798}
799
Songchun Fan0037c3f2019-10-30 15:20:59 -0700800filegroup {
801 name: "incremental_aidl",
802 srcs: [
Songchun Fan0037c3f2019-10-30 15:20:59 -0700803 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700804 ],
805 path: "core/java",
806}
807
808filegroup {
Songchun Fan6dd47b52019-11-29 15:20:18 -0800809 name: "dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700810 srcs: [
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800811 "core/java/android/content/pm/DataLoaderParamsParcel.aidl",
812 "core/java/android/content/pm/FileSystemControlParcel.aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800813 "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
Alex Buynytskyyea14d192019-12-13 15:42:18 -0800814 "core/java/android/content/pm/IPackageInstallerSessionFileSystemConnector.aidl",
815 "core/java/android/content/pm/NamedParcelFileDescriptor.aidl",
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800816 ],
817 path: "core/java",
818}
819
820filegroup {
821 name: "incremental_manager_aidl",
822 srcs: [
823 "core/java/android/os/incremental/IIncrementalManager.aidl",
824 "core/java/android/os/incremental/IIncrementalManagerNative.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700825 ],
826 path: "core/java",
827}
828
829aidl_interface {
830 name: "libincremental_aidl",
831 srcs: [
832 ":incremental_aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800833 ],
Songchun Fan6dd47b52019-11-29 15:20:18 -0800834 backend: {
835 java: {
836 sdk_version: "28",
837 },
838 cpp: {
839 enabled: true,
840 },
841 ndk: {
842 enabled: true,
843 },
844 },
845}
846
847aidl_interface {
848 name: "libdataloader_aidl",
849 srcs: [
850 ":dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700851 ],
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800852 imports: [
853 "libincremental_aidl",
854 ],
Songchun Fan0037c3f2019-10-30 15:20:59 -0700855 backend: {
856 java: {
857 sdk_version: "28",
858 },
859 cpp: {
860 enabled: true,
861 },
862 ndk: {
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800863 enabled: false,
864 },
865 },
866}
867
868aidl_interface {
869 name: "libincremental_manager_aidl",
870 srcs: [
871 ":incremental_manager_aidl",
872 ],
873 imports: [
874 "libincremental_aidl",
875 "libdataloader_aidl",
876 ],
877 backend: {
878 java: {
879 sdk_version: "28",
880 },
881 cpp: {
Songchun Fan0037c3f2019-10-30 15:20:59 -0700882 enabled: true,
883 },
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800884 ndk: {
885 enabled: false,
886 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700887 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700888}
Joe Onorato99598ee2019-02-11 15:55:13 +0000889
Yi Jin04625ad2017-10-17 18:29:33 -0700890gensrcs {
891 name: "gen-platform-proto-constants",
892 depfile: true,
893
894 tools: [
895 "aprotoc",
896 "protoc-gen-cppstream",
897 ],
898
899 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800900 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800901 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800902 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700903 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700904 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700905 "core/proto/android/os/kernelwake.proto",
906 "core/proto/android/os/pagetypeinfo.proto",
907 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800908 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800909 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800910 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700911 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700912 ],
913
914 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800915 cmd: "mkdir -p $(genDir) " +
916 "&& $(location aprotoc) " +
917 " --plugin=$(location protoc-gen-cppstream) " +
918 " --dependency_out=$(depfile) " +
919 " --cppstream_out=$(genDir) " +
920 " -Iexternal/protobuf/src " +
921 " -I . " +
922 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700923
Logan Chien71ddfea2018-02-27 16:43:50 +0800924 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700925}
926
Joe Onorato99598ee2019-02-11 15:55:13 +0000927
Dan Albert2a8d9c22016-09-23 15:55:49 -0700928subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700929 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600930 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800931 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700932 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700933 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500934 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700935 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700936 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700937]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800938
939optional_subdirs = [
940 "core/tests/utiltests/jni",
941]
Steven Morelandeddafe92017-10-02 16:58:41 -0700942
Colin Crossa2b78a72018-03-29 13:31:04 -0700943// TODO(b/77285514): remove this once the last few hidl interfaces have been
944// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700945java_library {
946 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100947 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700948
949 srcs: [
950 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800951 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800952 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700953 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800954 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800955 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800956 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000957 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800958 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700959 "core/java/android/os/HwBinder.java",
960 "core/java/android/os/HwBlob.java",
961 "core/java/android/os/HwParcel.java",
962 "core/java/android/os/IHwBinder.java",
963 "core/java/android/os/IHwInterface.java",
964 "core/java/android/os/DeadObjectException.java",
965 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700966 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700967 "core/java/android/os/RemoteException.java",
968 "core/java/android/util/AndroidException.java",
969 ],
Artur Satayevafdb23a2019-12-10 17:47:53 +0000970 libs: [ "unsupportedappusage" ],
Steven Morelandeddafe92017-10-02 16:58:41 -0700971
972 dxflags: ["--core-library"],
973 installable: false,
974}
Nan Zhang2db709d2017-11-08 20:48:46 -0800975
976python_defaults {
977 name: "base_default",
978 version: {
979 py2: {
980 enabled: true,
981 embedded_launcher: true,
982 },
983 py3: {
984 enabled: false,
985 embedded_launcher: false,
986 },
987 },
988}
989
990python_binary_host {
991 name: "fontchain_linter",
992 defaults: ["base_default"],
993 main: "tools/fonts/fontchain_linter.py",
994 srcs: [
995 "tools/fonts/fontchain_linter.py",
996 ],
997 libs: [
998 "fontTools",
999 ],
1000}
Nan Zhang172875b2018-02-27 11:24:03 -08001001
Paul Duffin0440e1f2019-02-11 16:13:25 +00001002// Make the api/current.txt file available for use by modules in other
1003// directories.
1004filegroup {
1005 name: "frameworks-base-api-current.txt",
1006 srcs: [
1007 "api/current.txt",
1008 ],
1009}
1010
Paul Duffincd35de32019-05-30 15:12:47 +01001011// Make the api/system-current.txt file available for use by modules in other
1012// directories.
1013filegroup {
1014 name: "frameworks-base-api-system-current.txt",
1015 srcs: [
1016 "api/system-current.txt",
1017 ],
1018}
1019
1020// Make the api/system-removed.txt file available for use by modules in other
1021// directories.
1022filegroup {
1023 name: "frameworks-base-api-system-removed.txt",
1024 srcs: [
1025 "api/system-removed.txt",
1026 ],
1027}
1028
Nan Zhang7764a4b2018-08-22 11:27:31 -07001029framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001030 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
1031 "-overview $(location core/java/overview.html) " +
1032 // Federate Support Library references against local API file.
1033 "-federate SupportLib https://developer.android.com " +
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001034 "-federationapi SupportLib $(location :current-support-api) " +
1035 // Federate Support Library references against local API file.
1036 "-federate AndroidX https://developer.android.com " +
1037 "-federationapi AndroidX $(location :current-androidx-api) "
Nan Zhang172875b2018-02-27 11:24:03 -08001038
Nan Zhang7764a4b2018-08-22 11:27:31 -07001039framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -07001040 "voip-common",
1041 "android.test.mock",
1042 "android-support-annotations",
1043 "android-support-compat",
1044 "android-support-core-ui",
1045 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001046 "android-support-design",
1047 "android-support-dynamic-animation",
1048 "android-support-exifinterface",
1049 "android-support-fragment",
1050 "android-support-media-compat",
1051 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001052 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001053 "android-support-v7-cardview",
1054 "android-support-v7-gridlayout",
1055 "android-support-v7-mediarouter",
1056 "android-support-v7-palette",
1057 "android-support-v7-preference",
1058 "android-support-v13",
1059 "android-support-v14-preference",
1060 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001061 "android-support-vectordrawable",
1062 "android-support-animatedvectordrawable",
1063 "android-support-v7-appcompat",
1064 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001065 "android-support-v8-renderscript",
1066 "android-support-multidex",
1067 "android-support-multidex-instrumentation",
1068]
1069
1070metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +01001071 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +00001072 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001073 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001074 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +01001075 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001076 "--hide MissingPermission --hide BroadcastBehavior " +
1077 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -04001078 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1079 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001080
Jiyong Parkae9972b2019-09-15 20:19:02 +09001081packages_to_document = [
1082 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001083 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001084 "java",
1085 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001086 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001087 "org.apache.http",
1088 "org.json",
1089 "org.w3c.dom",
1090 "org.xml.sax",
1091 "org.xmlpull",
1092]
1093
Nan Zhang7764a4b2018-08-22 11:27:31 -07001094stubs_defaults {
1095 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001096 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +00001097 ":framework-mime-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001098 ":framework-non-updatable-sources",
1099 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001100 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001101 "test-base/src/**/*.java",
1102 ":opt-telephony-srcs",
1103 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001104 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001105 ":core_public_api_files",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001106 "test-mock/src/**/*.java",
1107 "test-runner/src/**/*.java",
1108 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001109 libs: framework_docs_only_libs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001110 create_doc_stubs: true,
1111 annotations_enabled: true,
1112 api_levels_annotations_enabled: true,
1113 api_levels_annotations_dirs: [
1114 "sdk-dir",
1115 "api-versions-jars-dir",
1116 ],
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001117 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001118 merge_annotations_dirs: [
1119 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001120 ],
1121}
1122
1123doc_defaults {
1124 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001125 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001126 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001127 html_dirs: [
1128 "docs/html",
1129 ],
1130 knowntags: [
1131 "docs/knowntags.txt",
1132 ":known-oj-tags",
1133 ],
1134 custom_template: "droiddoc-templates-sdk",
1135 resourcesdir: "docs/html/reference/images/",
1136 resourcesoutdir: "reference/android/images/",
1137 hdf: [
1138 "dac true",
1139 "sdk.codename O",
1140 "sdk.preview.version 1",
1141 "sdk.version 7.0",
1142 "sdk.rel.id 1",
1143 "sdk.preview 0",
1144 ],
1145 arg_files: [
1146 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001147 "core/java/overview.html",
1148 ":current-support-api",
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001149 ":current-androidx-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001150 ],
1151 create_stubs: false,
1152}
1153
Tiem Song730c19b2019-08-26 11:27:27 -07001154doc_defaults {
1155 name: "framework-dokka-docs-default",
1156 create_stubs: false,
1157}
1158
Nan Zhang894c9ec2018-09-10 18:58:39 -07001159stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001160 name: "metalava-api-stubs-default",
1161 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001162 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001163 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001164 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001165 ":opt-telephony-srcs",
1166 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001167 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001168 ":core_public_api_files",
evitayan69d77da2019-10-30 19:58:48 -07001169 ":ike-api-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001170 ],
Jiyong Park20426532019-08-19 15:24:49 +09001171 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001172 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001173 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001174 previous_api: ":last-released-public-api",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001175 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001176 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001177 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001178 api_levels_annotations_enabled: true,
1179 api_levels_annotations_dirs: [
1180 "sdk-dir",
1181 "api-versions-jars-dir",
1182 ],
Jiyong Park20426532019-08-19 15:24:49 +09001183 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001184 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001185}
1186
Nan Zhang7764a4b2018-08-22 11:27:31 -07001187droidstubs {
1188 name: "framework-doc-stubs",
1189 defaults: ["framework-doc-stubs-default"],
1190 arg_files: [
1191 "core/res/AndroidManifest.xml",
1192 ],
1193 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001194 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001195}
1196
1197droidstubs {
1198 name: "framework-doc-system-stubs",
1199 defaults: ["framework-doc-stubs-default"],
1200 arg_files: [
1201 "core/res/AndroidManifest.xml",
1202 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001203 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001204 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001205}
1206
Nan Zhang3e15ba82018-07-26 18:41:12 +00001207droiddoc {
1208 name: "doc-comment-check-docs",
1209 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001210 srcs: [
1211 ":framework-doc-stubs",
1212 ],
1213 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001214 installable: false,
1215}
1216
1217droiddoc {
1218 name: "offline-sdk-docs",
1219 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001220 srcs: [
1221 ":framework-doc-stubs",
1222 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001223 hdf: [
1224 "android.whichdoc offline",
1225 ],
1226 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001227 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001228 static_doc_index_redirect: "docs/docs-preview-index.html",
1229}
1230
1231droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001232 // Please sync with android-api-council@ before making any changes for the name property below.
1233 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1234 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001235 name: "offline-sdk-referenceonly-docs",
1236 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001237 srcs: [
1238 ":framework-doc-stubs",
1239 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001240 hdf: [
1241 "android.whichdoc offline",
1242 ],
1243 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001244 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001245 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1246 static_doc_properties: "docs/source.properties",
1247}
1248
1249droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001250 // Please sync with android-api-council@ before making any changes for the name property below.
1251 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1252 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001253 name: "offline-system-sdk-referenceonly-docs",
1254 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001255 srcs: [
1256 ":framework-doc-system-stubs",
1257 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001258 hdf: [
1259 "android.whichdoc offline",
1260 ],
1261 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001262 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1263 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001264 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1265 static_doc_properties: "docs/source.properties",
1266}
1267
1268droiddoc {
1269 name: "online-sdk-docs",
1270 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001271 srcs: [
1272 ":framework-doc-stubs",
1273 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001274 hdf: [
1275 "android.whichdoc online",
1276 "android.hasSamples true",
1277 ],
1278 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001279 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001280 " -toroot / -samplegroup Admin " +
1281 " -samplegroup Background " +
1282 " -samplegroup Connectivity " +
1283 " -samplegroup Content " +
1284 " -samplegroup Input " +
1285 " -samplegroup Media " +
1286 " -samplegroup Notification " +
1287 " -samplegroup RenderScript " +
1288 " -samplegroup Security " +
1289 " -samplegroup Sensors " +
1290 " -samplegroup System " +
1291 " -samplegroup Testing " +
1292 " -samplegroup UI " +
1293 " -samplegroup Views " +
1294 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1295}
1296
1297droiddoc {
1298 name: "online-system-api-sdk-docs",
1299 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001300 srcs: [
1301 ":framework-doc-system-stubs",
1302 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001303 hdf: [
1304 "android.whichdoc online",
1305 "android.hasSamples true",
1306 ],
1307 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001308 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001309 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001310 " -title \"Android SDK - Including system APIs.\" " +
1311 " -hide 101 " +
1312 " -hide 104 " +
1313 " -hide 108 " +
1314 " -toroot / -samplegroup Admin " +
1315 " -samplegroup Background " +
1316 " -samplegroup Connectivity " +
1317 " -samplegroup Content " +
1318 " -samplegroup Input " +
1319 " -samplegroup Media " +
1320 " -samplegroup Notification " +
1321 " -samplegroup RenderScript " +
1322 " -samplegroup Security " +
1323 " -samplegroup Sensors " +
1324 " -samplegroup System " +
1325 " -samplegroup Testing " +
1326 " -samplegroup UI " +
1327 " -samplegroup Views " +
1328 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1329 installable: false,
1330}
1331
1332droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001333 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001334 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001335 srcs: [
1336 ":framework-doc-stubs",
1337 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001338 hdf: [
1339 "android.whichdoc online",
1340 "android.hasSamples true",
1341 ],
1342 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001343 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001344 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001345 " -samplegroup Background " +
1346 " -samplegroup Connectivity " +
1347 " -samplegroup Content " +
1348 " -samplegroup Input " +
1349 " -samplegroup Media " +
1350 " -samplegroup Notification " +
1351 " -samplegroup RenderScript " +
1352 " -samplegroup Security " +
1353 " -samplegroup Sensors " +
1354 " -samplegroup System " +
1355 " -samplegroup Testing " +
1356 " -samplegroup UI " +
1357 " -samplegroup Views " +
1358 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1359}
1360
1361droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001362 name: "ds-docs-kt",
1363 defaults: ["framework-dokka-docs-default"],
1364 srcs: [
1365 ":framework-doc-stubs",
1366 ],
1367 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1368 "-noStdlibLink",
1369 proofread_file: "ds-dokka-proofread.txt",
1370 dokka_enabled: true,
1371}
1372
1373java_genrule {
1374 name: "ds-docs",
1375 tools: [
1376 "zip2zip",
1377 "merge_zips",
1378 ],
1379 srcs: [
1380 ":ds-docs-java{.docs.zip}",
1381 ":ds-docs-kt{.docs.zip}",
1382 ],
1383 out: ["ds-docs.zip"],
1384 dist: {
1385 targets: ["docs"],
1386 },
1387 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1388 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1389}
1390
1391java_genrule {
1392 name: "ds-docs-switched",
1393 tools: [
1394 "switcher4",
1395 "soong_zip",
1396 ],
1397 srcs: [
1398 ":ds-docs-java{.docs.zip}",
1399 ":ds-docs-kt{.docs.zip}",
1400 ],
1401 out: ["ds-docs-switched.zip"],
1402 dist: {
1403 targets: ["docs"],
1404 },
1405 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1406 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1407 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1408 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1409 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1410}
1411
1412
1413droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001414 name: "ds-static-docs",
1415 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001416 srcs: [
1417 ":framework-doc-stubs",
1418 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001419 hdf: [
1420 "android.whichdoc online",
1421 ],
1422 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001423 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001424 " -staticonly " +
1425 " -toroot / " +
1426 " -devsite " +
1427 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001428}
1429
1430droiddoc {
1431 name: "ds-ref-navtree-docs",
1432 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001433 srcs: [
1434 ":framework-doc-stubs",
1435 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001436 hdf: [
1437 "android.whichdoc online",
1438 ],
1439 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001440 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001441 " -toroot / " +
1442 " -atLinksNavtree " +
1443 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001444}
1445
1446droiddoc {
1447 name: "online-sdk-dev-docs",
1448 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001449 srcs: [
1450 ":framework-doc-stubs",
1451 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001452 hdf: [
1453 "android.whichdoc online",
1454 "android.hasSamples true",
1455 ],
1456 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001457 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001458 " -toroot / -samplegroup Admin " +
1459 " -samplegroup Background " +
1460 " -samplegroup Connectivity " +
1461 " -samplegroup Content " +
1462 " -samplegroup Input " +
1463 " -samplegroup Media " +
1464 " -samplegroup Notification " +
1465 " -samplegroup RenderScript " +
1466 " -samplegroup Security " +
1467 " -samplegroup Sensors " +
1468 " -samplegroup System " +
1469 " -samplegroup Testing " +
1470 " -samplegroup UI " +
1471 " -samplegroup Views " +
1472 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1473}
1474
1475droiddoc {
1476 name: "hidden-docs",
1477 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001478 srcs: [
1479 ":framework-doc-stubs",
1480 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001481 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001482 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001483 " -referenceonly " +
1484 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001485}
1486
Nan Zhang7764a4b2018-08-22 11:27:31 -07001487droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001488 name: "hwbinder-stubs-docs",
1489 srcs: [
1490 "core/java/android/os/HidlSupport.java",
1491 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001492 "core/java/android/annotation/IntRange.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001493 "core/java/android/annotation/NonNull.java",
1494 "core/java/android/annotation/SystemApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001495 "core/java/android/os/HidlMemory.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001496 "core/java/android/os/HwBinder.java",
1497 "core/java/android/os/HwBlob.java",
1498 "core/java/android/os/HwParcel.java",
1499 "core/java/android/os/IHwBinder.java",
1500 "core/java/android/os/IHwInterface.java",
1501 "core/java/android/os/DeadObjectException.java",
1502 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001503 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001504 "core/java/android/os/RemoteException.java",
1505 "core/java/android/util/AndroidException.java",
1506 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001507 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001508 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001509 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001510 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001511 merge_annotations_dirs: [
1512 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001513 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001514 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
Colin Crossa2b78a72018-03-29 13:31:04 -07001515}
1516
1517java_library_static {
1518 name: "hwbinder.stubs",
1519 sdk_version: "core_current",
1520 srcs: [
1521 ":hwbinder-stubs-docs",
1522 ],
1523}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001524
Nan Zhang894c9ec2018-09-10 18:58:39 -07001525droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001526 name: "hiddenapi-lists-docs",
1527 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001528 arg_files: [
1529 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001530 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001531 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001532 private_dex_api_filename: "private-dex.txt",
1533 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001534 args: metalava_framework_docs_args +
1535 " --show-unannotated " +
Jiyong Park119afc02019-12-04 17:17:48 +09001536 " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001537 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001538}
1539
Nan Zhang7764a4b2018-08-22 11:27:31 -07001540droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001541 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001542 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001543 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001544 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001545 ],
Jiyong Park20426532019-08-19 15:24:49 +09001546
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001547 arg_files: [
1548 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001549 ],
1550 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001551 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001552 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001553 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001554 " --show-unannotated " +
Jiyong Park119afc02019-12-04 17:17:48 +09001555 " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001556 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001557}
1558
Nan Zhang894c9ec2018-09-10 18:58:39 -07001559droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001560 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001561 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001562 api_filename: "public_api.txt",
1563 private_api_filename: "private.txt",
1564 removed_api_filename: "removed.txt",
1565 arg_files: [
1566 "core/res/AndroidManifest.xml",
1567 ],
1568 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001569 check_api: {
1570 current: {
1571 api_file: "api/current.txt",
1572 removed_api_file: "api/removed.txt",
1573 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001574 last_released: {
1575 api_file: ":last-released-public-api",
1576 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001577 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001578 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001579 api_lint: {
1580 enabled: true,
1581 new_since: ":last-released-public-api",
1582 baseline_file: "api/lint-baseline.txt",
1583 },
Nan Zhange5612602018-08-16 16:16:00 -07001584 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001585 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001586}
1587
Nan Zhang894c9ec2018-09-10 18:58:39 -07001588droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001589 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001590 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001591 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001592 api_filename: "system-api.txt",
1593 private_api_filename: "system-private.txt",
1594 private_dex_api_filename: "system-private-dex.txt",
1595 removed_api_filename: "system-removed.txt",
1596 arg_files: [
1597 "core/res/AndroidManifest.xml",
1598 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001599 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
Nan Zhange5612602018-08-16 16:16:00 -07001600 check_api: {
1601 current: {
1602 api_file: "api/system-current.txt",
1603 removed_api_file: "api/system-removed.txt",
1604 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001605 last_released: {
1606 api_file: ":last-released-system-api",
1607 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001608 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001609 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001610 api_lint: {
1611 enabled: true,
1612 new_since: ":last-released-system-api",
1613 baseline_file: "api/system-lint-baseline.txt",
1614 },
Nan Zhange5612602018-08-16 16:16:00 -07001615 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001616 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001617}
1618
Nan Zhang894c9ec2018-09-10 18:58:39 -07001619droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001620 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001621 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001622 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001623 api_filename: "test-api.txt",
1624 removed_api_filename: "test-removed.txt",
1625 arg_files: [
1626 "core/res/AndroidManifest.xml",
1627 ],
1628 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001629 check_api: {
1630 current: {
1631 api_file: "api/test-current.txt",
1632 removed_api_file: "api/test-removed.txt",
1633 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001634 api_lint: {
1635 enabled: true,
1636 baseline_file: "api/test-lint-baseline.txt",
1637 },
Nan Zhange5612602018-08-16 16:16:00 -07001638 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001639}
Nan Zhangaf251302018-08-30 10:59:51 -07001640
1641filegroup {
1642 name: "framework-annotation-nonnull-srcs",
1643 srcs: [
1644 "core/java/android/annotation/NonNull.java",
1645 ],
1646}
Insun Kang06b25ae2018-11-20 10:05:44 +09001647
1648filegroup {
1649 name: "framework-media-annotation-srcs",
1650 srcs: [
1651 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001652 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001653 "core/java/android/annotation/DrawableRes.java",
1654 "core/java/android/annotation/IntDef.java",
1655 "core/java/android/annotation/LongDef.java",
1656 "core/java/android/annotation/NonNull.java",
1657 "core/java/android/annotation/Nullable.java",
1658 "core/java/android/annotation/RequiresPermission.java",
1659 "core/java/android/annotation/SdkConstant.java",
1660 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001661 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001662 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001663 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001664 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001665 ],
1666}
1667
Andrei Onea7a2985c2019-02-18 15:28:35 +00001668// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1669// annotations to private apis
1670aidl_mapping {
1671 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001672 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001673 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001674}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001675
1676genrule {
1677 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001678 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001679 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1680 out: ["unsupportedappusage_index.csv"],
1681 dist: {
1682 targets: ["droidcore"],
1683 },
1684}
Chen Xu192bf1f2019-09-05 22:07:42 -07001685
1686// Avoid including Parcelable classes as we don't want to have two copies of
1687// Parcelable cross the process.
1688filegroup {
1689 name: "framework-telephony-stack-shared-srcs",
1690 srcs: [
1691 "core/java/android/os/RegistrantList.java",
1692 "core/java/android/os/Registrant.java",
1693 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001694 "core/java/android/util/TimeUtils.java",
1695 "core/java/com/android/internal/os/SomeArgs.java",
Meng Wang9c2a8e02019-12-13 16:45:34 -08001696 "core/java/com/android/internal/util/AsyncChannel.java",
1697 "core/java/com/android/internal/util/BitwiseInputStream.java",
Michelebadc0212019-10-31 11:48:43 -07001698 "core/java/com/android/internal/util/FastXmlSerializer.java",
1699 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001700 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001701 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001702 "core/java/com/android/internal/util/Preconditions.java",
1703 "core/java/com/android/internal/util/State.java",
1704 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001705 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001706 ],
1707}
1708
Chen Xu4fea79c2019-10-08 18:39:03 -07001709// Avoid including Parcelable classes as we don't want to have two copies of
1710// Parcelable cross the process.
1711filegroup {
1712 name: "framework-cellbroadcast-shared-srcs",
1713 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001714 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001715 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001716 "core/java/com/android/internal/util/IState.java",
1717 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001718 "core/java/com/android/internal/util/State.java",
1719 "core/java/com/android/internal/util/StateMachine.java",
1720 ],
atrostce84de02019-10-08 16:16:47 +01001721}
Roshan Pius09de13e2019-10-16 13:16:04 -07001722
1723filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001724 name: "framework-ims-common-shared-srcs",
1725 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001726 "core/java/android/os/RegistrantList.java",
1727 "core/java/android/os/Registrant.java",
1728 "core/java/com/android/internal/os/SomeArgs.java",
1729 "core/java/com/android/internal/util/Preconditions.java",
1730 ],
1731}
1732
1733filegroup {
Roshan Pius62eb61c2019-12-06 13:49:47 -08001734 name: "framework-wifi-service-shared-srcs",
Roshan Pius09de13e2019-10-16 13:16:04 -07001735 srcs: [
1736 ":framework-annotations",
Roshan Piusc93cd7a2019-12-09 07:39:41 -08001737 "core/java/android/net/InterfaceConfiguration.java",
1738 "core/java/android/os/HandlerExecutor.java",
Roshan Pius04769a52019-12-04 13:03:47 -08001739 "core/java/android/util/BackupUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001740 "core/java/android/util/LocalLog.java",
1741 "core/java/android/util/Rational.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001742 "core/java/com/android/internal/util/FastXmlSerializer.java",
1743 "core/java/com/android/internal/util/HexDump.java",
1744 "core/java/com/android/internal/util/IState.java",
1745 "core/java/com/android/internal/util/MessageUtils.java",
1746 "core/java/com/android/internal/util/Preconditions.java",
1747 "core/java/com/android/internal/util/State.java",
1748 "core/java/com/android/internal/util/StateMachine.java",
1749 "core/java/com/android/internal/util/WakeupMessage.java",
1750 "core/java/com/android/internal/util/XmlUtils.java",
1751 ],
1752}