blob: c7b7c4ae2159307a650124806ba5c793b8aa41c5 [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 Parkb3609312019-08-16 21:17:14 +0900203 name: "framework-wifi-sources",
204 srcs: [
205 "wifi/java/**/*.java",
206 "wifi/java/**/*.aidl",
207 ],
208 path: "wifi/java",
209}
210
Jiyong Park20426532019-08-19 15:24:49 +0900211filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900212 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900213 srcs: [
214 // Java/AIDL sources under frameworks/base
Terry Wangecc0d1b2019-10-17 17:05:18 -0700215 ":framework-appsearch-sources",
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700216 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900217 ":framework-core-sources",
218 ":framework-drm-sources",
219 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900220 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900221 ":framework-keystore-sources",
222 ":framework-location-sources",
223 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-mca-effect-sources",
225 ":framework-mca-filterfw-sources",
226 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900227 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700228 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900229 ":framework-opengl-sources",
230 ":framework-rs-sources",
231 ":framework-sax-sources",
232 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700233 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900234 ":framework-telephony-sources",
235 ":framework-wifi-sources",
236 ":PacProcessor-aidl-sources",
237 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900238
atrost87488352019-10-10 19:27:31 +0100239 // AIDL from frameworks/base/native/
240 ":platform-compat-native-aidl",
241
Jiyong Park20426532019-08-19 15:24:49 +0900242 // AIDL sources from external directories
243 ":dumpstate_aidl",
244 ":framework_native_aidl",
245 ":gatekeeper_aidl",
246 ":gsiservice_aidl",
247 ":incidentcompanion_aidl",
248 ":installd_aidl",
249 ":keystore_aidl",
250 ":libaudioclient_aidl",
251 ":libbinder_aidl",
252 ":libbluetooth-binder-aidl",
253 ":libcamera_client_aidl",
254 ":libcamera_client_framework_aidl",
255 ":libupdate_engine_aidl",
Ruchir Rastogicd9dd942019-11-27 15:26:03 -0800256 // TODO: this needs to be removed when statsd-framework.jar is separated out
257 ":statsd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900258 ":storaged_aidl",
259 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900260
Jiyong Park20426532019-08-19 15:24:49 +0900261 // For the generated R.java and Manifest.java
262 ":framework-res{.aapt.srcjar}",
263
264 // etc.
265 ":framework-javastream-protos",
266 ":framework-statslog-gen",
267 ],
268}
Jiyong Park1cc95662019-08-07 22:45:07 +0900269
Jiyong Parkae9972b2019-09-15 20:19:02 +0900270filegroup {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000271 name: "framework-updatable-sources",
272 srcs: [
273 ":framework-sdkext-sources",
274 ":updatable-media-srcs",
275 ]
276}
277
278filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900279 name: "framework-all-sources",
280 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000281 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900282 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000283 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900284 ],
285}
286
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100287java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700288 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700289 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900290 export_include_dirs: [
291 "core/java",
292 "drm/java",
293 "graphics/java",
294 "keystore/java",
295 "location/java",
296 "lowpan/java",
297 "media/java",
298 "media/apex/java",
299 "media/mca/effect/java",
300 "media/mca/filterfw/java",
301 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700302 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900303 "opengl/java",
304 "rs/java",
305 "sax/java",
306 "telecomm/java",
307 "telephony/java",
308 "wifi/java",
309 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700310 },
Adam Pardyl50207032019-09-09 14:37:27 +0200311
312 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200313 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200314 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200315 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200316 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700317}
318
Jiyong Park20426532019-08-19 15:24:49 +0900319// Collection of classes that are generated from non-Java files that are not listed in
320// framework_srcs. These have no or very limited dependency to the framework.
321java_library {
322 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800323 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100324 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700325 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800326 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800327 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800328 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000329 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800330 "android.hardware.cas-V1.0-java",
331 "android.hardware.contexthub-V1.0-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800332 "android.hardware.gnss-V1.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800333 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800334 "android.hardware.radio-V1.0-java",
335 "android.hardware.radio-V1.1-java",
336 "android.hardware.radio-V1.2-java",
337 "android.hardware.radio-V1.3-java",
338 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800339 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800340 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800341 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700342 "android.hardware.thermal-V1.1-java",
343 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800344 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700345 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800346 "android.hardware.usb-V1.0-java-constants",
347 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800348 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800349 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000350 "android.hardware.vibrator-V1.0-java",
351 "android.hardware.vibrator-V1.1-java",
352 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900353 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800354 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000355 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900356
357 "com.android.sysprop.apex",
358 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800359 ],
Jiyong Park20426532019-08-19 15:24:49 +0900360 sdk_version: "core_platform",
361 installable: false,
362}
363
364java_defaults {
365 name: "framework-defaults",
366 defaults: ["framework-aidl-export-defaults"],
367 installable: true,
368
Jiyong Park20426532019-08-19 15:24:49 +0900369 aidl: {
370 generate_get_transaction_name: true,
371 },
372
Jiyong Parkae9972b2019-09-15 20:19:02 +0900373 srcs: ["core/java/**/*.logtags"],
374
Jiyong Park20426532019-08-19 15:24:49 +0900375 exclude_srcs: [
376 // See comment on framework-atb-backward-compatibility module below
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000377 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900378 ],
379
380 sdk_version: "core_platform",
381 libs: [
382 "ext",
383 "updatable_media_stubs",
384 ],
385
386 jarjar_rules: ":framework-jarjar-rules",
387
Tobias Thierer878c77b2019-08-18 15:19:45 +0100388 static_libs: [
389 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100390 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800391
Colin Crosscf3a0b52017-11-16 00:15:28 -0800392 dxflags: [
393 "--core-library",
394 "--multi-dex",
395 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100396
Eugene Susla3b2fe612019-08-06 18:47:14 -0700397 plugins: [
398 "view-inspector-annotation-processor",
399 "staledataclass-annotation-processor",
400 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100401}
402
Colin Crossbc2dc312018-10-26 22:34:06 -0700403filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800404 name: "framework-jarjar-rules",
Santiago Seifert7094b762019-11-20 20:51:43 +0000405 srcs: ["jarjar_rules_hidl.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800406}
407
408filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700409 name: "libincident_aidl",
410 srcs: [
411 "core/java/android/os/IIncidentManager.aidl",
412 "core/java/android/os/IIncidentReportStatusListener.aidl",
413 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700414 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700415}
416
417filegroup {
Michael Wrightc390fbe2018-12-12 19:45:09 +0000418 name: "libvibrator_aidl",
419 srcs: [
420 "core/java/android/os/IExternalVibrationController.aidl",
421 "core/java/android/os/IExternalVibratorService.aidl",
422 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700423 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000424}
425
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100426java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700427 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100428 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900429 srcs: [":framework-non-updatable-sources"],
atrost1a945502019-11-04 17:03:54 +0000430 libs: ["app-compat-annotations"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700431 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900432 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100433 required: [
434 "framework-platform-compat-config",
435 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100436 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100437 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100438 "services-devicepolicy-platform-compat-config",
atrostc3c2e4d2019-11-29 11:27:27 +0000439 "services-core-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100440 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000441 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000442 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
443 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000444 "mimemap",
445 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900446 // For backwards compatibility.
447 stem: "framework",
448}
449
450// This "framework" module is NOT installed to the device. It's
451// "framework-minus-apex" that gets installed to the device. Note that
452// the filename is still framework.jar (via the stem property) for
453// compatibility reason. The purpose of this module is to provide
454// framework APIs (both public and private) for bundled apps.
455// "framework-minus-apex" can't be used for the purpose because 1)
456// many apps have already hardcoded the name "framework" and
457// 2) it lacks API symbols from updatable modules - as it's clear from
458// its suffix "-minus-apex".
459java_library {
460 name: "framework",
461 defaults: ["framework-aidl-export-defaults"],
462 installable: false, // this lib is a build-only library
463 static_libs: [
464 "framework-minus-apex",
465 // TODO(jiyong): add stubs for APEXes here
466 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700467 sdk_version: "core_platform",
468}
469
470java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900471 name: "framework-all",
472 defaults: ["framework-defaults"],
473 srcs: [":framework-all-sources"],
474 installable: false,
atrost1a945502019-11-04 17:03:54 +0000475 libs: ["app-compat-annotations"],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000476 static_libs: ["exoplayer2-core"]
Jiyong Park97183492019-11-14 03:07:36 +0000477}
478
479java_library {
480 name: "framework-annotation-proc",
481 defaults: ["framework-aidl-export-defaults"],
482 srcs: [":framework-all-sources"],
483 libs: ["app-compat-annotations"],
484 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100485 plugins: [
486 "unsupportedappusage-annotation-processor",
487 "compat-changeid-annotation-processor",
488 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000489 static_libs: [
490 "exoplayer2-core"
491 ]
atrostb9c34502019-08-05 12:22:18 +0100492}
493
494platform_compat_config {
495 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000496 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100497}
498
Paul Duffin521975802019-06-05 10:35:08 +0100499// A library including just UnsupportedAppUsage.java classes.
500//
501// Provided for target so that libraries can use it without depending on
502// the whole of framework or the core platform API.
503//
504// Built for host so that the annotation processor can also use this annotation.
505java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100506 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100507 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100508 srcs: [
509 "core/java/android/annotation/IntDef.java",
510 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100511 ],
512 static_libs: [
513 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100514 ],
Paul Duffin521975802019-06-05 10:35:08 +0100515
516 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800517}
518
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000519// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000520// android.test.base library has been removed and which provides support for
521// maintaining backwards compatibility for APKs that target pre-P and depend on
522// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
523// specified on the build command line.
524java_library {
525 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000526 installable: true,
atrost1a945502019-11-04 17:03:54 +0000527 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000528 srcs: [
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000529 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000530 ],
531}
532
Colin Crosscf3a0b52017-11-16 00:15:28 -0800533genrule {
534 name: "framework-statslog-gen",
535 tools: ["stats-log-api-gen"],
536 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800537 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800538}
539
540gensrcs {
541 name: "framework-javastream-protos",
542 depfile: true,
543
544 tools: [
545 "aprotoc",
546 "protoc-gen-javastream",
547 "soong_zip",
548 ],
549
Anton Hanssond82b2f72019-11-18 13:34:56 +0000550 cmd: "mkdir -p $(genDir)/$(in) " +
551 "&& $(location aprotoc) " +
552 " --plugin=$(location protoc-gen-javastream) " +
553 " --dependency_out=$(depfile) " +
554 " --javastream_out=$(genDir)/$(in) " +
555 " -Iexternal/protobuf/src " +
556 " -I . " +
557 " $(in) " +
558 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
559
Yi Jin437aa6e2018-01-10 11:34:26 -0800560 srcs: [
561 "core/proto/**/*.proto",
562 "libs/incident/**/*.proto",
563 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800564 output_extension: "srcjar",
565}
566
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900567filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900568 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900569 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900570 "core/java/android/annotation/NonNull.java",
571 "core/java/android/annotation/Nullable.java",
572 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900573 "core/java/android/annotation/IntRange.java",
Anton Hanssondc1e99b2019-12-06 17:07:28 +0000574 "core/java/android/annotation/SystemApi.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900575 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900576 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900577 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100578 ],
Chalard Jean95213512019-01-30 21:04:58 +0900579}
580
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000581java_library {
582 name: "framework-annotations-lib",
583 srcs: [ ":framework-annotations" ],
584 sdk_version: "current",
585}
586
Chalard Jean95213512019-01-30 21:04:58 +0900587filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900588 name: "framework-networkstack-shared-srcs",
589 srcs: [
590 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900591 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900592 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900593 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900594 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900595 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900596 "core/java/com/android/internal/util/IState.java",
597 "core/java/com/android/internal/util/MessageUtils.java",
598 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900599 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900600 "core/java/com/android/internal/util/State.java",
601 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900602 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900603 "core/java/com/android/internal/util/WakeupMessage.java",
604 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100605 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900606}
607
markchiena6ba54d2019-09-03 15:58:06 +0800608filegroup {
609 name: "framework-tethering-shared-srcs",
610 srcs: [
611 "core/java/android/util/LocalLog.java",
612 ],
613}
Colin Crossd8e02252017-10-02 17:14:22 -0700614// Build ext.jar
615// ============================================================
616java_library {
617 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700618 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100619 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700620 static_libs: [
621 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700622 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000623 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100624 "libtextclassifier-java",
625 ],
626 required: [
627 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700628 ],
629 dxflags: ["--core-library"],
630}
631
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700632// ==== java proto host library ==============================
633java_library_host {
634 name: "platformprotos",
635 srcs: [
636 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700637 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700638 "core/proto/**/*.proto",
639 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700640 ],
641 proto: {
642 include_dirs: ["external/protobuf/src"],
643 type: "full",
644 },
645 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100646 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700647 },
648}
649
Colin Cross43214162018-08-20 13:57:24 -0700650// ==== java proto device library (for test only) ==============================
651java_library {
652 name: "platformprotosnano",
653 proto: {
654 type: "nano",
655 output_params: ["store_unknown_fields=true"],
656 include_dirs: ["external/protobuf/src"],
657 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000658 exclude_srcs: [
659 "core/proto/android/privacy.proto",
660 "core/proto/android/section.proto",
661 ],
Colin Cross43214162018-08-20 13:57:24 -0700662 sdk_version: "current",
663 srcs: [
664 "core/proto/**/*.proto",
665 "libs/incident/proto/android/os/**/*.proto",
666 ],
667}
668
669// ==== java proto device library (for test only) ==============================
670java_library {
671 name: "platformprotoslite",
672 proto: {
673 type: "lite",
674 include_dirs: ["external/protobuf/src"],
675 },
676
677 srcs: [
678 "core/proto/**/*.proto",
679 "libs/incident/proto/android/os/**/*.proto",
680 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000681 exclude_srcs: [
682 "core/proto/android/privacy.proto",
683 "core/proto/android/section.proto",
684 ],
Colin Cross43214162018-08-20 13:57:24 -0700685 // Protos have lots of MissingOverride and similar.
686 errorprone: {
687 javacflags: ["-XepDisableAllChecks"],
688 },
689}
690
Colin Crossaa0d4352017-05-02 14:14:56 -0700691// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000692cc_defaults {
693 name: "libplatformprotos-defaults",
694
Colin Crossaa0d4352017-05-02 14:14:56 -0700695 proto: {
696 export_proto_headers: true,
697 include_dirs: ["external/protobuf/src"],
698 },
699
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700700 cflags: [
701 "-Wall",
702 "-Werror",
703 "-Wno-unused-parameter",
704 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800705
706 srcs: [
707 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800708 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000709}
710
711cc_library {
712 name: "libplatformprotos",
713 defaults: ["libplatformprotos-defaults"],
714 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800715
Colin Crossaa0d4352017-05-02 14:14:56 -0700716 target: {
717 host: {
718 proto: {
719 type: "full",
720 },
721 },
722 android: {
723 proto: {
724 type: "lite",
725 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000726 shared_libs: [
727 "libprotobuf-cpp-lite",
728 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700729 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700730 enabled: false,
731 },
732 },
733 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700734}
735
Joe Onorato9bd5db72019-04-03 18:19:43 -0700736// This library is meant for vendor code that needs to output protobuf. It links
737// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
738// binary compatibility.
739cc_library {
740 name: "libplatformprotos-static",
741 defaults: ["libplatformprotos-defaults"],
742 host_supported: false,
743
744 // This is okay because this library is only built as a static library. The C++
745 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
746 // but is not authorized to be used outside of debugging.
747 vendor_available: true,
748
749 target: {
750 android: {
751 proto: {
752 type: "lite",
753 },
754 static_libs: [
755 "libprotobuf-cpp-lite",
756 ],
757 shared: {
758 enabled: false,
759 },
760 },
761 },
762}
763
764
Joe Onorato99598ee2019-02-11 15:55:13 +0000765// This is the full proto version of libplatformprotos. It may only
766// be used by test code that is not shipped on the device.
767cc_library {
768 name: "libplatformprotos-test",
769 defaults: ["libplatformprotos-defaults"],
770 host_supported: false,
771
772 target: {
773 android: {
774 proto: {
775 type: "full",
776 },
777 shared: {
778 enabled: false,
779 },
780 },
781 },
782}
783
Songchun Fan0037c3f2019-10-30 15:20:59 -0700784filegroup {
785 name: "incremental_aidl",
786 srcs: [
Songchun Fand1b41d42019-11-12 17:09:53 -0800787 "core/java/android/os/incremental/IIncrementalManager.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700788 "core/java/android/os/incremental/IIncrementalServiceProxy.aidl",
789 "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
790 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
791 "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
792 ],
793 path: "core/java",
794}
795
796filegroup {
Songchun Fan6dd47b52019-11-29 15:20:18 -0800797 name: "dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700798 srcs: [
Songchun Fan6dd47b52019-11-29 15:20:18 -0800799 "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700800 ],
801 path: "core/java",
802}
803
804aidl_interface {
805 name: "libincremental_aidl",
806 srcs: [
807 ":incremental_aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800808 ],
809 imports: [
810 "libdataloader_aidl",
811 ],
812 backend: {
813 java: {
814 sdk_version: "28",
815 },
816 cpp: {
817 enabled: true,
818 },
819 ndk: {
820 enabled: true,
821 },
822 },
823}
824
825aidl_interface {
826 name: "libdataloader_aidl",
827 srcs: [
828 ":dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700829 ],
830 backend: {
831 java: {
832 sdk_version: "28",
833 },
834 cpp: {
835 enabled: true,
836 },
837 ndk: {
838 enabled: true,
839 },
840 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700841}
Joe Onorato99598ee2019-02-11 15:55:13 +0000842
Yi Jin04625ad2017-10-17 18:29:33 -0700843gensrcs {
844 name: "gen-platform-proto-constants",
845 depfile: true,
846
847 tools: [
848 "aprotoc",
849 "protoc-gen-cppstream",
850 ],
851
852 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800853 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800854 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800855 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700856 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700857 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700858 "core/proto/android/os/kernelwake.proto",
859 "core/proto/android/os/pagetypeinfo.proto",
860 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800861 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800862 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800863 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700864 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700865 ],
866
867 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800868 cmd: "mkdir -p $(genDir) " +
869 "&& $(location aprotoc) " +
870 " --plugin=$(location protoc-gen-cppstream) " +
871 " --dependency_out=$(depfile) " +
872 " --cppstream_out=$(genDir) " +
873 " -Iexternal/protobuf/src " +
874 " -I . " +
875 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700876
Logan Chien71ddfea2018-02-27 16:43:50 +0800877 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700878}
879
Joe Onorato99598ee2019-02-11 15:55:13 +0000880
Dan Albert2a8d9c22016-09-23 15:55:49 -0700881subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700882 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600883 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800884 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700885 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700886 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500887 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700888 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700889 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700890]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800891
892optional_subdirs = [
893 "core/tests/utiltests/jni",
894]
Steven Morelandeddafe92017-10-02 16:58:41 -0700895
Colin Crossa2b78a72018-03-29 13:31:04 -0700896// TODO(b/77285514): remove this once the last few hidl interfaces have been
897// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700898java_library {
899 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100900 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700901
902 srcs: [
903 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800904 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800905 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700906 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800907 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800908 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800909 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000910 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800911 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700912 "core/java/android/os/HwBinder.java",
913 "core/java/android/os/HwBlob.java",
914 "core/java/android/os/HwParcel.java",
915 "core/java/android/os/IHwBinder.java",
916 "core/java/android/os/IHwInterface.java",
917 "core/java/android/os/DeadObjectException.java",
918 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700919 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700920 "core/java/android/os/RemoteException.java",
921 "core/java/android/util/AndroidException.java",
922 ],
923
924 dxflags: ["--core-library"],
925 installable: false,
926}
Nan Zhang2db709d2017-11-08 20:48:46 -0800927
928python_defaults {
929 name: "base_default",
930 version: {
931 py2: {
932 enabled: true,
933 embedded_launcher: true,
934 },
935 py3: {
936 enabled: false,
937 embedded_launcher: false,
938 },
939 },
940}
941
942python_binary_host {
943 name: "fontchain_linter",
944 defaults: ["base_default"],
945 main: "tools/fonts/fontchain_linter.py",
946 srcs: [
947 "tools/fonts/fontchain_linter.py",
948 ],
949 libs: [
950 "fontTools",
951 ],
952}
Nan Zhang172875b2018-02-27 11:24:03 -0800953
Paul Duffin0440e1f2019-02-11 16:13:25 +0000954// Make the api/current.txt file available for use by modules in other
955// directories.
956filegroup {
957 name: "frameworks-base-api-current.txt",
958 srcs: [
959 "api/current.txt",
960 ],
961}
962
Paul Duffincd35de32019-05-30 15:12:47 +0100963// Make the api/system-current.txt file available for use by modules in other
964// directories.
965filegroup {
966 name: "frameworks-base-api-system-current.txt",
967 srcs: [
968 "api/system-current.txt",
969 ],
970}
971
972// Make the api/system-removed.txt file available for use by modules in other
973// directories.
974filegroup {
975 name: "frameworks-base-api-system-removed.txt",
976 srcs: [
977 "api/system-removed.txt",
978 ],
979}
980
Nan Zhang7764a4b2018-08-22 11:27:31 -0700981framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100982 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
983 "-overview $(location core/java/overview.html) " +
984 // Federate Support Library references against local API file.
985 "-federate SupportLib https://developer.android.com " +
Charles Munger1b1c0ca2019-11-19 14:01:19 -0800986 "-federationapi SupportLib $(location :current-support-api) " +
987 // Federate Support Library references against local API file.
988 "-federate AndroidX https://developer.android.com " +
989 "-federationapi AndroidX $(location :current-androidx-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800990
Nan Zhang7764a4b2018-08-22 11:27:31 -0700991framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700992 "voip-common",
993 "android.test.mock",
994 "android-support-annotations",
995 "android-support-compat",
996 "android-support-core-ui",
997 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700998 "android-support-design",
999 "android-support-dynamic-animation",
1000 "android-support-exifinterface",
1001 "android-support-fragment",
1002 "android-support-media-compat",
1003 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001004 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001005 "android-support-v7-cardview",
1006 "android-support-v7-gridlayout",
1007 "android-support-v7-mediarouter",
1008 "android-support-v7-palette",
1009 "android-support-v7-preference",
1010 "android-support-v13",
1011 "android-support-v14-preference",
1012 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001013 "android-support-vectordrawable",
1014 "android-support-animatedvectordrawable",
1015 "android-support-v7-appcompat",
1016 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001017 "android-support-v8-renderscript",
1018 "android-support-multidex",
1019 "android-support-multidex-instrumentation",
1020]
1021
1022metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +01001023 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +00001024 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001025 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001026 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +01001027 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001028 "--hide MissingPermission --hide BroadcastBehavior " +
1029 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -04001030 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1031 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001032
Jiyong Parkae9972b2019-09-15 20:19:02 +09001033packages_to_document = [
1034 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001035 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001036 "java",
1037 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001038 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001039 "org.apache.http",
1040 "org.json",
1041 "org.w3c.dom",
1042 "org.xml.sax",
1043 "org.xmlpull",
1044]
1045
Nan Zhang7764a4b2018-08-22 11:27:31 -07001046stubs_defaults {
1047 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001048 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +00001049 ":framework-mime-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001050 ":framework-non-updatable-sources",
1051 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001052 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001053 "test-base/src/**/*.java",
1054 ":opt-telephony-srcs",
1055 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001056 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001057 ":core_public_api_files",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001058 "test-mock/src/**/*.java",
1059 "test-runner/src/**/*.java",
1060 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001061 libs: framework_docs_only_libs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001062 create_doc_stubs: true,
1063 annotations_enabled: true,
1064 api_levels_annotations_enabled: true,
1065 api_levels_annotations_dirs: [
1066 "sdk-dir",
1067 "api-versions-jars-dir",
1068 ],
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001069 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001070 merge_annotations_dirs: [
1071 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001072 ],
1073}
1074
1075doc_defaults {
1076 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001077 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001078 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001079 html_dirs: [
1080 "docs/html",
1081 ],
1082 knowntags: [
1083 "docs/knowntags.txt",
1084 ":known-oj-tags",
1085 ],
1086 custom_template: "droiddoc-templates-sdk",
1087 resourcesdir: "docs/html/reference/images/",
1088 resourcesoutdir: "reference/android/images/",
1089 hdf: [
1090 "dac true",
1091 "sdk.codename O",
1092 "sdk.preview.version 1",
1093 "sdk.version 7.0",
1094 "sdk.rel.id 1",
1095 "sdk.preview 0",
1096 ],
1097 arg_files: [
1098 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001099 "core/java/overview.html",
1100 ":current-support-api",
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001101 ":current-androidx-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001102 ],
1103 create_stubs: false,
1104}
1105
Tiem Song730c19b2019-08-26 11:27:27 -07001106doc_defaults {
1107 name: "framework-dokka-docs-default",
1108 create_stubs: false,
1109}
1110
Nan Zhang894c9ec2018-09-10 18:58:39 -07001111stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001112 name: "metalava-api-stubs-default",
1113 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001114 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001115 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001116 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001117 ":opt-telephony-srcs",
1118 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001119 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001120 ":core_public_api_files",
evitayan69d77da2019-10-30 19:58:48 -07001121 ":ike-api-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001122 ],
Jiyong Park20426532019-08-19 15:24:49 +09001123 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001124 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001125 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001126 previous_api: ":last-released-public-api",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001127 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001128 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001129 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001130 api_levels_annotations_enabled: true,
1131 api_levels_annotations_dirs: [
1132 "sdk-dir",
1133 "api-versions-jars-dir",
1134 ],
Jiyong Park20426532019-08-19 15:24:49 +09001135 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001136 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001137}
1138
Nan Zhang7764a4b2018-08-22 11:27:31 -07001139droidstubs {
1140 name: "framework-doc-stubs",
1141 defaults: ["framework-doc-stubs-default"],
1142 arg_files: [
1143 "core/res/AndroidManifest.xml",
1144 ],
1145 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001146 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001147}
1148
1149droidstubs {
1150 name: "framework-doc-system-stubs",
1151 defaults: ["framework-doc-stubs-default"],
1152 arg_files: [
1153 "core/res/AndroidManifest.xml",
1154 ],
1155 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001156 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001157}
1158
Nan Zhang3e15ba82018-07-26 18:41:12 +00001159droiddoc {
1160 name: "doc-comment-check-docs",
1161 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001162 srcs: [
1163 ":framework-doc-stubs",
1164 ],
1165 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001166 installable: false,
1167}
1168
1169droiddoc {
1170 name: "offline-sdk-docs",
1171 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001172 srcs: [
1173 ":framework-doc-stubs",
1174 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001175 hdf: [
1176 "android.whichdoc offline",
1177 ],
1178 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001179 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001180 static_doc_index_redirect: "docs/docs-preview-index.html",
1181}
1182
1183droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001184 // Please sync with android-api-council@ before making any changes for the name property below.
1185 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1186 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001187 name: "offline-sdk-referenceonly-docs",
1188 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001189 srcs: [
1190 ":framework-doc-stubs",
1191 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001192 hdf: [
1193 "android.whichdoc offline",
1194 ],
1195 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001196 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001197 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1198 static_doc_properties: "docs/source.properties",
1199}
1200
1201droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001202 // Please sync with android-api-council@ before making any changes for the name property below.
1203 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1204 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001205 name: "offline-system-sdk-referenceonly-docs",
1206 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001207 srcs: [
1208 ":framework-doc-system-stubs",
1209 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001210 hdf: [
1211 "android.whichdoc offline",
1212 ],
1213 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001214 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1215 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001216 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1217 static_doc_properties: "docs/source.properties",
1218}
1219
1220droiddoc {
1221 name: "online-sdk-docs",
1222 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001223 srcs: [
1224 ":framework-doc-stubs",
1225 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001226 hdf: [
1227 "android.whichdoc online",
1228 "android.hasSamples true",
1229 ],
1230 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001231 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001232 " -toroot / -samplegroup Admin " +
1233 " -samplegroup Background " +
1234 " -samplegroup Connectivity " +
1235 " -samplegroup Content " +
1236 " -samplegroup Input " +
1237 " -samplegroup Media " +
1238 " -samplegroup Notification " +
1239 " -samplegroup RenderScript " +
1240 " -samplegroup Security " +
1241 " -samplegroup Sensors " +
1242 " -samplegroup System " +
1243 " -samplegroup Testing " +
1244 " -samplegroup UI " +
1245 " -samplegroup Views " +
1246 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1247}
1248
1249droiddoc {
1250 name: "online-system-api-sdk-docs",
1251 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001252 srcs: [
1253 ":framework-doc-system-stubs",
1254 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001255 hdf: [
1256 "android.whichdoc online",
1257 "android.hasSamples true",
1258 ],
1259 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001260 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001261 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001262 " -title \"Android SDK - Including system APIs.\" " +
1263 " -hide 101 " +
1264 " -hide 104 " +
1265 " -hide 108 " +
1266 " -toroot / -samplegroup Admin " +
1267 " -samplegroup Background " +
1268 " -samplegroup Connectivity " +
1269 " -samplegroup Content " +
1270 " -samplegroup Input " +
1271 " -samplegroup Media " +
1272 " -samplegroup Notification " +
1273 " -samplegroup RenderScript " +
1274 " -samplegroup Security " +
1275 " -samplegroup Sensors " +
1276 " -samplegroup System " +
1277 " -samplegroup Testing " +
1278 " -samplegroup UI " +
1279 " -samplegroup Views " +
1280 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1281 installable: false,
1282}
1283
1284droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001285 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001286 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001287 srcs: [
1288 ":framework-doc-stubs",
1289 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001290 hdf: [
1291 "android.whichdoc online",
1292 "android.hasSamples true",
1293 ],
1294 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001295 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001296 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001297 " -samplegroup Background " +
1298 " -samplegroup Connectivity " +
1299 " -samplegroup Content " +
1300 " -samplegroup Input " +
1301 " -samplegroup Media " +
1302 " -samplegroup Notification " +
1303 " -samplegroup RenderScript " +
1304 " -samplegroup Security " +
1305 " -samplegroup Sensors " +
1306 " -samplegroup System " +
1307 " -samplegroup Testing " +
1308 " -samplegroup UI " +
1309 " -samplegroup Views " +
1310 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1311}
1312
1313droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001314 name: "ds-docs-kt",
1315 defaults: ["framework-dokka-docs-default"],
1316 srcs: [
1317 ":framework-doc-stubs",
1318 ],
1319 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1320 "-noStdlibLink",
1321 proofread_file: "ds-dokka-proofread.txt",
1322 dokka_enabled: true,
1323}
1324
1325java_genrule {
1326 name: "ds-docs",
1327 tools: [
1328 "zip2zip",
1329 "merge_zips",
1330 ],
1331 srcs: [
1332 ":ds-docs-java{.docs.zip}",
1333 ":ds-docs-kt{.docs.zip}",
1334 ],
1335 out: ["ds-docs.zip"],
1336 dist: {
1337 targets: ["docs"],
1338 },
1339 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1340 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1341}
1342
1343java_genrule {
1344 name: "ds-docs-switched",
1345 tools: [
1346 "switcher4",
1347 "soong_zip",
1348 ],
1349 srcs: [
1350 ":ds-docs-java{.docs.zip}",
1351 ":ds-docs-kt{.docs.zip}",
1352 ],
1353 out: ["ds-docs-switched.zip"],
1354 dist: {
1355 targets: ["docs"],
1356 },
1357 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1358 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1359 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1360 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1361 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1362}
1363
1364
1365droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001366 name: "ds-static-docs",
1367 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001368 srcs: [
1369 ":framework-doc-stubs",
1370 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001371 hdf: [
1372 "android.whichdoc online",
1373 ],
1374 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001375 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001376 " -staticonly " +
1377 " -toroot / " +
1378 " -devsite " +
1379 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001380}
1381
1382droiddoc {
1383 name: "ds-ref-navtree-docs",
1384 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001385 srcs: [
1386 ":framework-doc-stubs",
1387 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001388 hdf: [
1389 "android.whichdoc online",
1390 ],
1391 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001392 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001393 " -toroot / " +
1394 " -atLinksNavtree " +
1395 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001396}
1397
1398droiddoc {
1399 name: "online-sdk-dev-docs",
1400 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001401 srcs: [
1402 ":framework-doc-stubs",
1403 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001404 hdf: [
1405 "android.whichdoc online",
1406 "android.hasSamples true",
1407 ],
1408 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001409 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001410 " -toroot / -samplegroup Admin " +
1411 " -samplegroup Background " +
1412 " -samplegroup Connectivity " +
1413 " -samplegroup Content " +
1414 " -samplegroup Input " +
1415 " -samplegroup Media " +
1416 " -samplegroup Notification " +
1417 " -samplegroup RenderScript " +
1418 " -samplegroup Security " +
1419 " -samplegroup Sensors " +
1420 " -samplegroup System " +
1421 " -samplegroup Testing " +
1422 " -samplegroup UI " +
1423 " -samplegroup Views " +
1424 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1425}
1426
1427droiddoc {
1428 name: "hidden-docs",
1429 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001430 srcs: [
1431 ":framework-doc-stubs",
1432 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001433 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001434 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001435 " -referenceonly " +
1436 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001437}
1438
Nan Zhang7764a4b2018-08-22 11:27:31 -07001439droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001440 name: "hwbinder-stubs-docs",
1441 srcs: [
1442 "core/java/android/os/HidlSupport.java",
1443 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001444 "core/java/android/annotation/IntRange.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001445 "core/java/android/annotation/NonNull.java",
1446 "core/java/android/annotation/SystemApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001447 "core/java/android/os/HidlMemory.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001448 "core/java/android/os/HwBinder.java",
1449 "core/java/android/os/HwBlob.java",
1450 "core/java/android/os/HwParcel.java",
1451 "core/java/android/os/IHwBinder.java",
1452 "core/java/android/os/IHwInterface.java",
1453 "core/java/android/os/DeadObjectException.java",
1454 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001455 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001456 "core/java/android/os/RemoteException.java",
1457 "core/java/android/util/AndroidException.java",
1458 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001459 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001460 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001461 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001462 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001463 merge_annotations_dirs: [
1464 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001465 ],
1466 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001467}
1468
1469java_library_static {
1470 name: "hwbinder.stubs",
1471 sdk_version: "core_current",
1472 srcs: [
1473 ":hwbinder-stubs-docs",
1474 ],
1475}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001476
Nan Zhang894c9ec2018-09-10 18:58:39 -07001477droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001478 name: "hiddenapi-lists-docs",
1479 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001480 arg_files: [
1481 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001482 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001483 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001484 private_dex_api_filename: "private-dex.txt",
1485 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001486 args: metalava_framework_docs_args +
1487 " --show-unannotated " +
1488 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001489 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001490}
1491
Nan Zhang7764a4b2018-08-22 11:27:31 -07001492droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001493 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001494 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001495 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001496 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001497 ],
Jiyong Park20426532019-08-19 15:24:49 +09001498
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001499 arg_files: [
1500 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001501 ],
1502 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001503 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001504 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001505 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001506 " --show-unannotated " +
1507 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001508 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001509}
1510
Nan Zhang894c9ec2018-09-10 18:58:39 -07001511droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001512 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001513 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001514 api_filename: "public_api.txt",
1515 private_api_filename: "private.txt",
1516 removed_api_filename: "removed.txt",
1517 arg_files: [
1518 "core/res/AndroidManifest.xml",
1519 ],
1520 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001521 check_api: {
1522 current: {
1523 api_file: "api/current.txt",
1524 removed_api_file: "api/removed.txt",
1525 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001526 last_released: {
1527 api_file: ":last-released-public-api",
1528 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001529 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001530 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001531 api_lint: {
1532 enabled: true,
1533 new_since: ":last-released-public-api",
1534 baseline_file: "api/lint-baseline.txt",
1535 },
Nan Zhange5612602018-08-16 16:16:00 -07001536 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001537 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001538}
1539
Nan Zhang894c9ec2018-09-10 18:58:39 -07001540droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001541 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001542 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001543 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001544 api_filename: "system-api.txt",
1545 private_api_filename: "system-private.txt",
1546 private_dex_api_filename: "system-private-dex.txt",
1547 removed_api_filename: "system-removed.txt",
1548 arg_files: [
1549 "core/res/AndroidManifest.xml",
1550 ],
1551 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001552 check_api: {
1553 current: {
1554 api_file: "api/system-current.txt",
1555 removed_api_file: "api/system-removed.txt",
1556 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001557 last_released: {
1558 api_file: ":last-released-system-api",
1559 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001560 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001561 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001562 api_lint: {
1563 enabled: true,
1564 new_since: ":last-released-system-api",
1565 baseline_file: "api/system-lint-baseline.txt",
1566 },
Nan Zhange5612602018-08-16 16:16:00 -07001567 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001568 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001569}
1570
Nan Zhang894c9ec2018-09-10 18:58:39 -07001571droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001572 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001573 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001574 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001575 api_filename: "test-api.txt",
1576 removed_api_filename: "test-removed.txt",
1577 arg_files: [
1578 "core/res/AndroidManifest.xml",
1579 ],
1580 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001581 check_api: {
1582 current: {
1583 api_file: "api/test-current.txt",
1584 removed_api_file: "api/test-removed.txt",
1585 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001586 api_lint: {
1587 enabled: true,
1588 baseline_file: "api/test-lint-baseline.txt",
1589 },
Nan Zhange5612602018-08-16 16:16:00 -07001590 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001591}
Nan Zhangaf251302018-08-30 10:59:51 -07001592
1593filegroup {
1594 name: "framework-annotation-nonnull-srcs",
1595 srcs: [
1596 "core/java/android/annotation/NonNull.java",
1597 ],
1598}
Insun Kang06b25ae2018-11-20 10:05:44 +09001599
1600filegroup {
1601 name: "framework-media-annotation-srcs",
1602 srcs: [
1603 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001604 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001605 "core/java/android/annotation/DrawableRes.java",
1606 "core/java/android/annotation/IntDef.java",
1607 "core/java/android/annotation/LongDef.java",
1608 "core/java/android/annotation/NonNull.java",
1609 "core/java/android/annotation/Nullable.java",
1610 "core/java/android/annotation/RequiresPermission.java",
1611 "core/java/android/annotation/SdkConstant.java",
1612 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001613 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001614 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001615 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001616 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001617 ],
1618}
1619
Andrei Onea7a2985c2019-02-18 15:28:35 +00001620// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1621// annotations to private apis
1622aidl_mapping {
1623 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001624 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001625 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001626}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001627
1628genrule {
1629 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001630 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001631 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1632 out: ["unsupportedappusage_index.csv"],
1633 dist: {
1634 targets: ["droidcore"],
1635 },
1636}
Chen Xu192bf1f2019-09-05 22:07:42 -07001637
1638// Avoid including Parcelable classes as we don't want to have two copies of
1639// Parcelable cross the process.
1640filegroup {
1641 name: "framework-telephony-stack-shared-srcs",
1642 srcs: [
1643 "core/java/android/os/RegistrantList.java",
1644 "core/java/android/os/Registrant.java",
1645 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001646 "core/java/android/util/TimeUtils.java",
1647 "core/java/com/android/internal/os/SomeArgs.java",
Michelebadc0212019-10-31 11:48:43 -07001648 "core/java/com/android/internal/util/FastXmlSerializer.java",
1649 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001650 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001651 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001652 "core/java/com/android/internal/util/Preconditions.java",
1653 "core/java/com/android/internal/util/State.java",
1654 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001655 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001656 ],
1657}
1658
Chen Xu4fea79c2019-10-08 18:39:03 -07001659// Avoid including Parcelable classes as we don't want to have two copies of
1660// Parcelable cross the process.
1661filegroup {
1662 name: "framework-cellbroadcast-shared-srcs",
1663 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001664 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001665 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001666 "core/java/com/android/internal/util/IState.java",
1667 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001668 "core/java/com/android/internal/util/State.java",
1669 "core/java/com/android/internal/util/StateMachine.java",
1670 ],
atrostce84de02019-10-08 16:16:47 +01001671}
Roshan Pius09de13e2019-10-16 13:16:04 -07001672
1673filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001674 name: "framework-ims-common-shared-srcs",
1675 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001676 "core/java/android/os/RegistrantList.java",
1677 "core/java/android/os/Registrant.java",
1678 "core/java/com/android/internal/os/SomeArgs.java",
1679 "core/java/com/android/internal/util/Preconditions.java",
1680 ],
1681}
1682
1683filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001684 name: "framework-wifistack-shared-srcs",
1685 srcs: [
1686 ":framework-annotations",
Roshan Piusb0d9a242019-11-04 07:29:53 -08001687 "core/java/android/os/HandlerExecutor.java",
Roshan Pius04769a52019-12-04 13:03:47 -08001688 "core/java/android/util/BackupUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001689 "core/java/android/util/KeyValueListParser.java",
1690 "core/java/android/util/LocalLog.java",
1691 "core/java/android/util/Rational.java",
1692 "core/java/android/util/proto/ProtoStream.java",
1693 "core/java/android/util/proto/ProtoOutputStream.java",
1694 "core/java/com/android/internal/util/FastXmlSerializer.java",
1695 "core/java/com/android/internal/util/HexDump.java",
1696 "core/java/com/android/internal/util/IState.java",
1697 "core/java/com/android/internal/util/MessageUtils.java",
1698 "core/java/com/android/internal/util/Preconditions.java",
1699 "core/java/com/android/internal/util/State.java",
1700 "core/java/com/android/internal/util/StateMachine.java",
1701 "core/java/com/android/internal/util/WakeupMessage.java",
1702 "core/java/com/android/internal/util/XmlUtils.java",
1703 ],
1704}