blob: d04eb17adf15d26ac74c20e4cdf6cdf4bdbd1394 [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
215 ":framework-core-sources",
216 ":framework-drm-sources",
217 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900218 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900219 ":framework-keystore-sources",
220 ":framework-location-sources",
221 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900222 ":framework-mca-effect-sources",
223 ":framework-mca-filterfw-sources",
224 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900225 ":framework-media-sources",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100226 ":framework-mime-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700227 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900228 ":framework-opengl-sources",
229 ":framework-rs-sources",
230 ":framework-sax-sources",
231 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700232 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900233 ":framework-telephony-sources",
234 ":framework-wifi-sources",
235 ":PacProcessor-aidl-sources",
236 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900237
atrost87488352019-10-10 19:27:31 +0100238 // AIDL from frameworks/base/native/
239 ":platform-compat-native-aidl",
240
Jiyong Park20426532019-08-19 15:24:49 +0900241 // AIDL sources from external directories
242 ":dumpstate_aidl",
243 ":framework_native_aidl",
244 ":gatekeeper_aidl",
245 ":gsiservice_aidl",
246 ":incidentcompanion_aidl",
247 ":installd_aidl",
248 ":keystore_aidl",
249 ":libaudioclient_aidl",
250 ":libbinder_aidl",
251 ":libbluetooth-binder-aidl",
252 ":libcamera_client_aidl",
253 ":libcamera_client_framework_aidl",
254 ":libupdate_engine_aidl",
255 ":storaged_aidl",
256 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900257
Jiyong Park20426532019-08-19 15:24:49 +0900258 // For the generated R.java and Manifest.java
259 ":framework-res{.aapt.srcjar}",
260
261 // etc.
262 ":framework-javastream-protos",
263 ":framework-statslog-gen",
264 ],
265}
Jiyong Park1cc95662019-08-07 22:45:07 +0900266
Jiyong Parkae9972b2019-09-15 20:19:02 +0900267filegroup {
268 name: "framework-all-sources",
269 srcs: [
270 ":framework-non-updatable-sources",
271 ":updatable-media-srcs",
272 ],
273}
274
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100275java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700276 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700277 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900278 export_include_dirs: [
279 "core/java",
280 "drm/java",
281 "graphics/java",
282 "keystore/java",
283 "location/java",
284 "lowpan/java",
285 "media/java",
286 "media/apex/java",
287 "media/mca/effect/java",
288 "media/mca/filterfw/java",
289 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700290 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900291 "opengl/java",
292 "rs/java",
293 "sax/java",
294 "telecomm/java",
295 "telephony/java",
296 "wifi/java",
297 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700298 },
Adam Pardyl50207032019-09-09 14:37:27 +0200299
300 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200301 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200302 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200303 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200304 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700305}
306
Jiyong Park20426532019-08-19 15:24:49 +0900307// Collection of classes that are generated from non-Java files that are not listed in
308// framework_srcs. These have no or very limited dependency to the framework.
309java_library {
310 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800311 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100312 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700313 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800314 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800315 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800316 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000317 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800318 "android.hardware.cas-V1.0-java",
319 "android.hardware.contexthub-V1.0-java",
320 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800321 "android.hardware.radio-V1.0-java",
322 "android.hardware.radio-V1.1-java",
323 "android.hardware.radio-V1.2-java",
324 "android.hardware.radio-V1.3-java",
325 "android.hardware.radio-V1.4-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800326 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800327 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700328 "android.hardware.thermal-V1.1-java",
329 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800330 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700331 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800332 "android.hardware.usb-V1.0-java-constants",
333 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800334 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800335 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000336 "android.hardware.vibrator-V1.0-java",
337 "android.hardware.vibrator-V1.1-java",
338 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900339 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800340 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000341 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900342
343 "com.android.sysprop.apex",
344 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800345 ],
Jiyong Park20426532019-08-19 15:24:49 +0900346 sdk_version: "core_platform",
347 installable: false,
348}
349
350java_defaults {
351 name: "framework-defaults",
352 defaults: ["framework-aidl-export-defaults"],
353 installable: true,
354
Jiyong Park20426532019-08-19 15:24:49 +0900355 aidl: {
356 generate_get_transaction_name: true,
357 },
358
Jiyong Parkae9972b2019-09-15 20:19:02 +0900359 srcs: ["core/java/**/*.logtags"],
360
Jiyong Park20426532019-08-19 15:24:49 +0900361 exclude_srcs: [
362 // See comment on framework-atb-backward-compatibility module below
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000363 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900364 ],
365
366 sdk_version: "core_platform",
367 libs: [
368 "ext",
369 "updatable_media_stubs",
370 ],
371
372 jarjar_rules: ":framework-jarjar-rules",
373
Tobias Thierer878c77b2019-08-18 15:19:45 +0100374 static_libs: [
375 "framework-internal-utils",
376 "mimemap",
377 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800378
Colin Crosscf3a0b52017-11-16 00:15:28 -0800379 dxflags: [
380 "--core-library",
381 "--multi-dex",
382 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100383
Eugene Susla3b2fe612019-08-06 18:47:14 -0700384 plugins: [
385 "view-inspector-annotation-processor",
386 "staledataclass-annotation-processor",
387 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100388}
389
Colin Crossbc2dc312018-10-26 22:34:06 -0700390filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800391 name: "framework-jarjar-rules",
392 srcs: ["jarjar_rules_hidl.txt"],
393}
394
395filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700396 name: "libincident_aidl",
397 srcs: [
398 "core/java/android/os/IIncidentManager.aidl",
399 "core/java/android/os/IIncidentReportStatusListener.aidl",
400 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700401 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700402}
403
404filegroup {
405 name: "statsd_aidl",
406 srcs: [
407 "core/java/android/os/IStatsCompanionService.aidl",
408 "core/java/android/os/IStatsManager.aidl",
Tej Singha0c89dd2019-01-25 16:39:18 -0800409 "core/java/android/os/IStatsPullerCallback.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700410 ],
Dan Willemsena38ff9f2019-06-11 10:56:01 -0700411 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700412}
413
Michael Wrightc390fbe2018-12-12 19:45:09 +0000414filegroup {
415 name: "libvibrator_aidl",
416 srcs: [
417 "core/java/android/os/IExternalVibrationController.aidl",
418 "core/java/android/os/IExternalVibratorService.aidl",
419 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700420 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000421}
422
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100423java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700424 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100425 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900426 srcs: [":framework-non-updatable-sources"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700427 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900428 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100429 required: [
430 "framework-platform-compat-config",
431 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100432 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100433 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100434 "services-devicepolicy-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100435 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900436 // For backwards compatibility.
437 stem: "framework",
438}
439
440// This "framework" module is NOT installed to the device. It's
441// "framework-minus-apex" that gets installed to the device. Note that
442// the filename is still framework.jar (via the stem property) for
443// compatibility reason. The purpose of this module is to provide
444// framework APIs (both public and private) for bundled apps.
445// "framework-minus-apex" can't be used for the purpose because 1)
446// many apps have already hardcoded the name "framework" and
447// 2) it lacks API symbols from updatable modules - as it's clear from
448// its suffix "-minus-apex".
449java_library {
450 name: "framework",
451 defaults: ["framework-aidl-export-defaults"],
452 installable: false, // this lib is a build-only library
453 static_libs: [
454 "framework-minus-apex",
455 // TODO(jiyong): add stubs for APEXes here
456 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700457 sdk_version: "core_platform",
458}
459
460java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900461 name: "framework-all",
462 defaults: ["framework-defaults"],
463 srcs: [":framework-all-sources"],
464 installable: false,
465}
466
467java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100468 name: "framework-annotation-proc",
atroste4d912f2019-10-01 13:33:03 +0100469 defaults: ["framework-aidl-export-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900470 srcs: [":framework-all-sources"],
Anna Trostanetski97088e92019-06-26 14:47:58 +0100471 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100472 plugins: [
473 "unsupportedappusage-annotation-processor",
474 "compat-changeid-annotation-processor",
475 ],
476}
477
478platform_compat_config {
479 name: "framework-platform-compat-config",
atrostb9c34502019-08-05 12:22:18 +0100480 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100481}
482
Paul Duffin521975802019-06-05 10:35:08 +0100483// A library including just UnsupportedAppUsage.java classes.
484//
485// Provided for target so that libraries can use it without depending on
486// the whole of framework or the core platform API.
487//
488// Built for host so that the annotation processor can also use this annotation.
489java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100490 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100491 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100492 srcs: [
493 "core/java/android/annotation/IntDef.java",
494 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100495 ],
496 static_libs: [
497 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100498 ],
Paul Duffin521975802019-06-05 10:35:08 +0100499
500 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800501}
502
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000503// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000504// android.test.base library has been removed and which provides support for
505// maintaining backwards compatibility for APKs that target pre-P and depend on
506// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
507// specified on the build command line.
508java_library {
509 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000510 installable: true,
Paul Duffina3b69212018-01-25 09:58:32 +0000511 srcs: [
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000512 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000513 ],
514}
515
Colin Crosscf3a0b52017-11-16 00:15:28 -0800516genrule {
517 name: "framework-statslog-gen",
518 tools: ["stats-log-api-gen"],
519 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800520 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800521}
522
523gensrcs {
524 name: "framework-javastream-protos",
525 depfile: true,
526
Tobias Thiererbc050342019-05-23 16:20:12 +0100527 tool_files: ["tools/genprotos.sh"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800528 tools: [
529 "aprotoc",
530 "protoc-gen-javastream",
531 "soong_zip",
532 ],
533
Alex Light159799d2018-08-08 07:05:19 -0700534 // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
535 // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
536 // the way sbox rewrites the command. See b/70221552.
537 cmd: "$(location tools/genprotos.sh) " +
Tobias Thiererbc050342019-05-23 16:20:12 +0100538 " $(location aprotoc) " +
539 " $(location protoc-gen-javastream) " +
540 " $(location soong_zip) " +
541 " $(genDir) " +
542 " $(depfile) " +
543 " $(in) " +
544 " $(out)",
Yi Jin437aa6e2018-01-10 11:34:26 -0800545 srcs: [
546 "core/proto/**/*.proto",
547 "libs/incident/**/*.proto",
548 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800549 output_extension: "srcjar",
550}
551
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900552filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900553 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900554 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900555 "core/java/android/annotation/NonNull.java",
556 "core/java/android/annotation/Nullable.java",
557 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900558 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900559 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900560 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900561 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100562 ],
Chalard Jean95213512019-01-30 21:04:58 +0900563}
564
565filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900566 name: "framework-networkstack-shared-srcs",
567 srcs: [
568 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900569 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900570 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900571 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900572 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900573 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900574 "core/java/com/android/internal/util/IState.java",
575 "core/java/com/android/internal/util/MessageUtils.java",
576 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900577 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900578 "core/java/com/android/internal/util/State.java",
579 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900580 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900581 "core/java/com/android/internal/util/WakeupMessage.java",
582 "core/java/android/net/shared/*.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100583 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900584}
585
markchiena6ba54d2019-09-03 15:58:06 +0800586filegroup {
587 name: "framework-tethering-shared-srcs",
588 srcs: [
589 "core/java/android/util/LocalLog.java",
590 ],
591}
Colin Crossd8e02252017-10-02 17:14:22 -0700592// Build ext.jar
593// ============================================================
594java_library {
595 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700596 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100597 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700598 static_libs: [
599 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700600 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000601 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100602 "libtextclassifier-java",
603 ],
604 required: [
605 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700606 ],
607 dxflags: ["--core-library"],
608}
609
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700610// ==== java proto host library ==============================
611java_library_host {
612 name: "platformprotos",
613 srcs: [
614 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700615 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700616 "core/proto/**/*.proto",
617 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700618 ],
619 proto: {
620 include_dirs: ["external/protobuf/src"],
621 type: "full",
622 },
623 errorprone: {
Tobias Thiererbc050342019-05-23 16:20:12 +0100624 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700625 },
626}
627
Colin Cross43214162018-08-20 13:57:24 -0700628// ==== java proto device library (for test only) ==============================
629java_library {
630 name: "platformprotosnano",
631 proto: {
632 type: "nano",
633 output_params: ["store_unknown_fields=true"],
634 include_dirs: ["external/protobuf/src"],
635 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000636 exclude_srcs: [
637 "core/proto/android/privacy.proto",
638 "core/proto/android/section.proto",
639 ],
Colin Cross43214162018-08-20 13:57:24 -0700640 sdk_version: "current",
641 srcs: [
642 "core/proto/**/*.proto",
643 "libs/incident/proto/android/os/**/*.proto",
644 ],
645}
646
647// ==== java proto device library (for test only) ==============================
648java_library {
649 name: "platformprotoslite",
650 proto: {
651 type: "lite",
652 include_dirs: ["external/protobuf/src"],
653 },
654
655 srcs: [
656 "core/proto/**/*.proto",
657 "libs/incident/proto/android/os/**/*.proto",
658 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000659 exclude_srcs: [
660 "core/proto/android/privacy.proto",
661 "core/proto/android/section.proto",
662 ],
Colin Cross43214162018-08-20 13:57:24 -0700663 // Protos have lots of MissingOverride and similar.
664 errorprone: {
665 javacflags: ["-XepDisableAllChecks"],
666 },
667}
668
Colin Crossaa0d4352017-05-02 14:14:56 -0700669// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000670cc_defaults {
671 name: "libplatformprotos-defaults",
672
Colin Crossaa0d4352017-05-02 14:14:56 -0700673 proto: {
674 export_proto_headers: true,
675 include_dirs: ["external/protobuf/src"],
676 },
677
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700678 cflags: [
679 "-Wall",
680 "-Werror",
681 "-Wno-unused-parameter",
682 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800683
684 srcs: [
685 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800686 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000687}
688
689cc_library {
690 name: "libplatformprotos",
691 defaults: ["libplatformprotos-defaults"],
692 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800693
Colin Crossaa0d4352017-05-02 14:14:56 -0700694 target: {
695 host: {
696 proto: {
697 type: "full",
698 },
699 },
700 android: {
701 proto: {
702 type: "lite",
703 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000704 shared_libs: [
705 "libprotobuf-cpp-lite",
706 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700707 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700708 enabled: false,
709 },
710 },
711 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700712}
713
Joe Onorato9bd5db72019-04-03 18:19:43 -0700714// This library is meant for vendor code that needs to output protobuf. It links
715// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
716// binary compatibility.
717cc_library {
718 name: "libplatformprotos-static",
719 defaults: ["libplatformprotos-defaults"],
720 host_supported: false,
721
722 // This is okay because this library is only built as a static library. The C++
723 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
724 // but is not authorized to be used outside of debugging.
725 vendor_available: true,
726
727 target: {
728 android: {
729 proto: {
730 type: "lite",
731 },
732 static_libs: [
733 "libprotobuf-cpp-lite",
734 ],
735 shared: {
736 enabled: false,
737 },
738 },
739 },
740}
741
742
Joe Onorato99598ee2019-02-11 15:55:13 +0000743// This is the full proto version of libplatformprotos. It may only
744// be used by test code that is not shipped on the device.
745cc_library {
746 name: "libplatformprotos-test",
747 defaults: ["libplatformprotos-defaults"],
748 host_supported: false,
749
750 target: {
751 android: {
752 proto: {
753 type: "full",
754 },
755 shared: {
756 enabled: false,
757 },
758 },
759 },
760}
761
762
Yi Jin04625ad2017-10-17 18:29:33 -0700763gensrcs {
764 name: "gen-platform-proto-constants",
765 depfile: true,
766
767 tools: [
768 "aprotoc",
769 "protoc-gen-cppstream",
770 ],
771
772 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800773 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800774 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800775 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700776 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700777 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700778 "core/proto/android/os/kernelwake.proto",
779 "core/proto/android/os/pagetypeinfo.proto",
780 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800781 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800782 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800783 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700784 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700785 ],
786
787 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800788 cmd: "mkdir -p $(genDir) " +
789 "&& $(location aprotoc) " +
790 " --plugin=$(location protoc-gen-cppstream) " +
791 " --dependency_out=$(depfile) " +
792 " --cppstream_out=$(genDir) " +
793 " -Iexternal/protobuf/src " +
794 " -I . " +
795 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700796
Logan Chien71ddfea2018-02-27 16:43:50 +0800797 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700798}
799
Joe Onorato99598ee2019-02-11 15:55:13 +0000800
Dan Albert2a8d9c22016-09-23 15:55:49 -0700801subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700802 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600803 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800804 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700805 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700806 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500807 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700808 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700809 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700810]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800811
812optional_subdirs = [
813 "core/tests/utiltests/jni",
814]
Steven Morelandeddafe92017-10-02 16:58:41 -0700815
Colin Crossa2b78a72018-03-29 13:31:04 -0700816// TODO(b/77285514): remove this once the last few hidl interfaces have been
817// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700818java_library {
819 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100820 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700821
822 srcs: [
823 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800824 "core/java/android/annotation/IntDef.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700825 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800826 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800827 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800828 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000829 "core/java/android/annotation/UnsupportedAppUsage.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700830 "core/java/android/os/HwBinder.java",
831 "core/java/android/os/HwBlob.java",
832 "core/java/android/os/HwParcel.java",
833 "core/java/android/os/IHwBinder.java",
834 "core/java/android/os/IHwInterface.java",
835 "core/java/android/os/DeadObjectException.java",
836 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700837 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700838 "core/java/android/os/RemoteException.java",
839 "core/java/android/util/AndroidException.java",
840 ],
841
842 dxflags: ["--core-library"],
843 installable: false,
844}
Nan Zhang2db709d2017-11-08 20:48:46 -0800845
846python_defaults {
847 name: "base_default",
848 version: {
849 py2: {
850 enabled: true,
851 embedded_launcher: true,
852 },
853 py3: {
854 enabled: false,
855 embedded_launcher: false,
856 },
857 },
858}
859
860python_binary_host {
861 name: "fontchain_linter",
862 defaults: ["base_default"],
863 main: "tools/fonts/fontchain_linter.py",
864 srcs: [
865 "tools/fonts/fontchain_linter.py",
866 ],
867 libs: [
868 "fontTools",
869 ],
870}
Nan Zhang172875b2018-02-27 11:24:03 -0800871
Jiyong Park20426532019-08-19 15:24:49 +0900872// TODO: Don't rely on this list by switching package.html into package-info.java
Nan Zhang172875b2018-02-27 11:24:03 -0800873frameworks_base_subdirs = [
874 "core/java",
875 "graphics/java",
876 "location/java",
877 "media/java",
878 "media/mca/effect/java",
879 "media/mca/filterfw/java",
880 "media/mca/filterpacks/java",
881 "drm/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700882 "mms/java",
Nan Zhang172875b2018-02-27 11:24:03 -0800883 "opengl/java",
884 "sax/java",
885 "telecomm/java",
Amit Mahajand3551532019-09-23 17:59:57 -0700886 "telephony/common",
Nan Zhang172875b2018-02-27 11:24:03 -0800887 "telephony/java",
888 "wifi/java",
889 "lowpan/java",
890 "keystore/java",
891 "rs/java",
892]
893
Paul Duffin0440e1f2019-02-11 16:13:25 +0000894// Make the api/current.txt file available for use by modules in other
895// directories.
896filegroup {
897 name: "frameworks-base-api-current.txt",
898 srcs: [
899 "api/current.txt",
900 ],
901}
902
Paul Duffincd35de32019-05-30 15:12:47 +0100903// Make the api/system-current.txt file available for use by modules in other
904// directories.
905filegroup {
906 name: "frameworks-base-api-system-current.txt",
907 srcs: [
908 "api/system-current.txt",
909 ],
910}
911
912// Make the api/system-removed.txt file available for use by modules in other
913// directories.
914filegroup {
915 name: "frameworks-base-api-system-removed.txt",
916 srcs: [
917 "api/system-removed.txt",
918 ],
919}
920
Nan Zhang7764a4b2018-08-22 11:27:31 -0700921framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc050342019-05-23 16:20:12 +0100922 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
923 "-overview $(location core/java/overview.html) " +
924 // Federate Support Library references against local API file.
925 "-federate SupportLib https://developer.android.com " +
926 "-federationapi SupportLib $(location :current-support-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800927
Nan Zhang7764a4b2018-08-22 11:27:31 -0700928framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700929 "voip-common",
930 "android.test.mock",
931 "android-support-annotations",
932 "android-support-compat",
933 "android-support-core-ui",
934 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700935 "android-support-design",
936 "android-support-dynamic-animation",
937 "android-support-exifinterface",
938 "android-support-fragment",
939 "android-support-media-compat",
940 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700941 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700942 "android-support-v7-cardview",
943 "android-support-v7-gridlayout",
944 "android-support-v7-mediarouter",
945 "android-support-v7-palette",
946 "android-support-v7-preference",
947 "android-support-v13",
948 "android-support-v14-preference",
949 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700950 "android-support-vectordrawable",
951 "android-support-animatedvectordrawable",
952 "android-support-v7-appcompat",
953 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700954 "android-support-v8-renderscript",
955 "android-support-multidex",
956 "android-support-multidex-instrumentation",
957]
958
959metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +0100960 "--ignore-classes-on-classpath " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700961 "--hide-package com.android.okhttp " +
962 "--hide-package com.android.org.conscrypt --hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +0100963 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700964 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +0100965 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700966 "--hide MissingPermission --hide BroadcastBehavior " +
967 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -0400968 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
969 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +0100970
971// http://b/129765390 Rewrite links to "platform" or "technotes" folders
972// which are siblings (and thus outside of) {@docRoot}.
973//
974// We have to escape \ as \\ and $ as $$ here because they get resolved by
975// different layers of the build tooling. The arguments are wrapped in '' so
976// that the shell doesn't add yet another level of escaping.
977metalava_framework_docs_args += " --replace-documentation " +
978 // packages whose descendants to apply replacement to (all packages from
979 // libcore/ojluni/src/main/java that contribute to documentation).
980 "com.sun:java:javax:jdk.net:sun " +
981 // regex of the string to replace
982 "'(<a\\s+href\\s?=[\\*\\s]*\")(?:(?:\\{@docRoot\\}/\\.\\./)|(?:(?:\\.\\./)+))((?:platform|technotes).+)\">' " +
983 // replacement (with $1, $2 backreferences to the regex groups)
984 "'$$1https://docs.oracle.com/javase/8/docs/$$2\">' "
Nan Zhang7764a4b2018-08-22 11:27:31 -0700985
Jiyong Parkae9972b2019-09-15 20:19:02 +0900986packages_to_document = [
987 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +0900988 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900989 "java",
990 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +0900991 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900992 "org.apache.http",
993 "org.json",
994 "org.w3c.dom",
995 "org.xml.sax",
996 "org.xmlpull",
997]
998
Nan Zhang7764a4b2018-08-22 11:27:31 -0700999stubs_defaults {
1000 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001001 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001002 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001003 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001004 "test-base/src/**/*.java",
1005 ":opt-telephony-srcs",
1006 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001007 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001008 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001009 ":updatable-media-srcs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001010 "test-mock/src/**/*.java",
1011 "test-runner/src/**/*.java",
1012 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001013 libs: framework_docs_only_libs,
Nan Zhang3e15ba82018-07-26 18:41:12 +00001014 local_sourcepaths: frameworks_base_subdirs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001015 create_doc_stubs: true,
1016 annotations_enabled: true,
1017 api_levels_annotations_enabled: true,
1018 api_levels_annotations_dirs: [
1019 "sdk-dir",
1020 "api-versions-jars-dir",
1021 ],
Jeff Gaston1b511422019-09-20 14:37:00 -04001022 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001023 merge_annotations_dirs: [
1024 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001025 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001026 ],
1027}
1028
1029doc_defaults {
1030 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001031 libs: framework_docs_only_libs +
Tobias Thiererbc050342019-05-23 16:20:12 +01001032 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001033 html_dirs: [
1034 "docs/html",
1035 ],
1036 knowntags: [
1037 "docs/knowntags.txt",
1038 ":known-oj-tags",
1039 ],
1040 custom_template: "droiddoc-templates-sdk",
1041 resourcesdir: "docs/html/reference/images/",
1042 resourcesoutdir: "reference/android/images/",
1043 hdf: [
1044 "dac true",
1045 "sdk.codename O",
1046 "sdk.preview.version 1",
1047 "sdk.version 7.0",
1048 "sdk.rel.id 1",
1049 "sdk.preview 0",
1050 ],
1051 arg_files: [
1052 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001053 "core/java/overview.html",
1054 ":current-support-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001055 ],
1056 create_stubs: false,
1057}
1058
Tiem Song730c19b2019-08-26 11:27:27 -07001059doc_defaults {
1060 name: "framework-dokka-docs-default",
1061 create_stubs: false,
1062}
1063
Nan Zhang894c9ec2018-09-10 18:58:39 -07001064stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001065 name: "metalava-api-stubs-default",
1066 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001067 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001068 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001069 ":opt-telephony-srcs",
1070 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001071 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001072 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001073 ":updatable-media-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001074 ],
Jiyong Park20426532019-08-19 15:24:49 +09001075 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001076 local_sourcepaths: frameworks_base_subdirs,
1077 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001078 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001079 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001080 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001081 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001082 "ojluni-annotated-sdk-stubs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001083 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001084 api_levels_annotations_enabled: true,
1085 api_levels_annotations_dirs: [
1086 "sdk-dir",
1087 "api-versions-jars-dir",
1088 ],
Jiyong Park20426532019-08-19 15:24:49 +09001089 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001090 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001091}
1092
Nan Zhang7764a4b2018-08-22 11:27:31 -07001093droidstubs {
1094 name: "framework-doc-stubs",
1095 defaults: ["framework-doc-stubs-default"],
1096 arg_files: [
1097 "core/res/AndroidManifest.xml",
1098 ],
1099 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001100 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001101}
1102
1103droidstubs {
1104 name: "framework-doc-system-stubs",
1105 defaults: ["framework-doc-stubs-default"],
1106 arg_files: [
1107 "core/res/AndroidManifest.xml",
1108 ],
1109 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001110 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001111}
1112
Nan Zhang3e15ba82018-07-26 18:41:12 +00001113droiddoc {
1114 name: "doc-comment-check-docs",
1115 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001116 srcs: [
1117 ":framework-doc-stubs",
1118 ],
1119 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001120 installable: false,
1121}
1122
1123droiddoc {
1124 name: "offline-sdk-docs",
1125 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001126 srcs: [
1127 ":framework-doc-stubs",
1128 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001129 hdf: [
1130 "android.whichdoc offline",
1131 ],
1132 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001133 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001134 static_doc_index_redirect: "docs/docs-preview-index.html",
1135}
1136
1137droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001138 // Please sync with android-api-council@ before making any changes for the name property below.
1139 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1140 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001141 name: "offline-sdk-referenceonly-docs",
1142 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001143 srcs: [
1144 ":framework-doc-stubs",
1145 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001146 hdf: [
1147 "android.whichdoc offline",
1148 ],
1149 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001150 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001151 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1152 static_doc_properties: "docs/source.properties",
1153}
1154
1155droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001156 // Please sync with android-api-council@ before making any changes for the name property below.
1157 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1158 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001159 name: "offline-system-sdk-referenceonly-docs",
1160 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001161 srcs: [
1162 ":framework-doc-system-stubs",
1163 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001164 hdf: [
1165 "android.whichdoc offline",
1166 ],
1167 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001168 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1169 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001170 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1171 static_doc_properties: "docs/source.properties",
1172}
1173
1174droiddoc {
1175 name: "online-sdk-docs",
1176 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001177 srcs: [
1178 ":framework-doc-stubs",
1179 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001180 hdf: [
1181 "android.whichdoc online",
1182 "android.hasSamples true",
1183 ],
1184 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001185 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001186 " -toroot / -samplegroup Admin " +
1187 " -samplegroup Background " +
1188 " -samplegroup Connectivity " +
1189 " -samplegroup Content " +
1190 " -samplegroup Input " +
1191 " -samplegroup Media " +
1192 " -samplegroup Notification " +
1193 " -samplegroup RenderScript " +
1194 " -samplegroup Security " +
1195 " -samplegroup Sensors " +
1196 " -samplegroup System " +
1197 " -samplegroup Testing " +
1198 " -samplegroup UI " +
1199 " -samplegroup Views " +
1200 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1201}
1202
1203droiddoc {
1204 name: "online-system-api-sdk-docs",
1205 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001206 srcs: [
1207 ":framework-doc-system-stubs",
1208 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001209 hdf: [
1210 "android.whichdoc online",
1211 "android.hasSamples true",
1212 ],
1213 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001214 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001215 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001216 " -title \"Android SDK - Including system APIs.\" " +
1217 " -hide 101 " +
1218 " -hide 104 " +
1219 " -hide 108 " +
1220 " -toroot / -samplegroup Admin " +
1221 " -samplegroup Background " +
1222 " -samplegroup Connectivity " +
1223 " -samplegroup Content " +
1224 " -samplegroup Input " +
1225 " -samplegroup Media " +
1226 " -samplegroup Notification " +
1227 " -samplegroup RenderScript " +
1228 " -samplegroup Security " +
1229 " -samplegroup Sensors " +
1230 " -samplegroup System " +
1231 " -samplegroup Testing " +
1232 " -samplegroup UI " +
1233 " -samplegroup Views " +
1234 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1235 installable: false,
1236}
1237
1238droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001239 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001240 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001241 srcs: [
1242 ":framework-doc-stubs",
1243 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001244 hdf: [
1245 "android.whichdoc online",
1246 "android.hasSamples true",
1247 ],
1248 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001249 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001250 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001251 " -samplegroup Background " +
1252 " -samplegroup Connectivity " +
1253 " -samplegroup Content " +
1254 " -samplegroup Input " +
1255 " -samplegroup Media " +
1256 " -samplegroup Notification " +
1257 " -samplegroup RenderScript " +
1258 " -samplegroup Security " +
1259 " -samplegroup Sensors " +
1260 " -samplegroup System " +
1261 " -samplegroup Testing " +
1262 " -samplegroup UI " +
1263 " -samplegroup Views " +
1264 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1265}
1266
1267droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001268 name: "ds-docs-kt",
1269 defaults: ["framework-dokka-docs-default"],
1270 srcs: [
1271 ":framework-doc-stubs",
1272 ],
1273 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1274 "-noStdlibLink",
1275 proofread_file: "ds-dokka-proofread.txt",
1276 dokka_enabled: true,
1277}
1278
1279java_genrule {
1280 name: "ds-docs",
1281 tools: [
1282 "zip2zip",
1283 "merge_zips",
1284 ],
1285 srcs: [
1286 ":ds-docs-java{.docs.zip}",
1287 ":ds-docs-kt{.docs.zip}",
1288 ],
1289 out: ["ds-docs.zip"],
1290 dist: {
1291 targets: ["docs"],
1292 },
1293 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1294 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1295}
1296
1297java_genrule {
1298 name: "ds-docs-switched",
1299 tools: [
1300 "switcher4",
1301 "soong_zip",
1302 ],
1303 srcs: [
1304 ":ds-docs-java{.docs.zip}",
1305 ":ds-docs-kt{.docs.zip}",
1306 ],
1307 out: ["ds-docs-switched.zip"],
1308 dist: {
1309 targets: ["docs"],
1310 },
1311 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1312 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1313 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1314 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1315 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1316}
1317
1318
1319droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001320 name: "ds-static-docs",
1321 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001322 srcs: [
1323 ":framework-doc-stubs",
1324 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001325 hdf: [
1326 "android.whichdoc online",
1327 ],
1328 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001329 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001330 " -staticonly " +
1331 " -toroot / " +
1332 " -devsite " +
1333 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001334}
1335
1336droiddoc {
1337 name: "ds-ref-navtree-docs",
1338 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001339 srcs: [
1340 ":framework-doc-stubs",
1341 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001342 hdf: [
1343 "android.whichdoc online",
1344 ],
1345 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001346 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001347 " -toroot / " +
1348 " -atLinksNavtree " +
1349 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001350}
1351
1352droiddoc {
1353 name: "online-sdk-dev-docs",
1354 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001355 srcs: [
1356 ":framework-doc-stubs",
1357 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001358 hdf: [
1359 "android.whichdoc online",
1360 "android.hasSamples true",
1361 ],
1362 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001363 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001364 " -toroot / -samplegroup Admin " +
1365 " -samplegroup Background " +
1366 " -samplegroup Connectivity " +
1367 " -samplegroup Content " +
1368 " -samplegroup Input " +
1369 " -samplegroup Media " +
1370 " -samplegroup Notification " +
1371 " -samplegroup RenderScript " +
1372 " -samplegroup Security " +
1373 " -samplegroup Sensors " +
1374 " -samplegroup System " +
1375 " -samplegroup Testing " +
1376 " -samplegroup UI " +
1377 " -samplegroup Views " +
1378 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1379}
1380
1381droiddoc {
1382 name: "hidden-docs",
1383 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001384 srcs: [
1385 ":framework-doc-stubs",
1386 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001387 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001388 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001389 " -referenceonly " +
1390 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001391}
1392
Nan Zhang7764a4b2018-08-22 11:27:31 -07001393droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001394 name: "hwbinder-stubs-docs",
1395 srcs: [
1396 "core/java/android/os/HidlSupport.java",
1397 "core/java/android/annotation/IntDef.java",
1398 "core/java/android/annotation/NonNull.java",
1399 "core/java/android/annotation/SystemApi.java",
1400 "core/java/android/os/HwBinder.java",
1401 "core/java/android/os/HwBlob.java",
1402 "core/java/android/os/HwParcel.java",
1403 "core/java/android/os/IHwBinder.java",
1404 "core/java/android/os/IHwInterface.java",
1405 "core/java/android/os/DeadObjectException.java",
1406 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001407 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001408 "core/java/android/os/RemoteException.java",
1409 "core/java/android/util/AndroidException.java",
1410 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001411 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001412 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001413 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001414 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001415 merge_annotations_dirs: [
1416 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001417 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001418 ],
1419 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001420}
1421
1422java_library_static {
1423 name: "hwbinder.stubs",
1424 sdk_version: "core_current",
1425 srcs: [
1426 ":hwbinder-stubs-docs",
1427 ],
1428}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001429
Nan Zhang894c9ec2018-09-10 18:58:39 -07001430droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001431 name: "hiddenapi-lists-docs",
1432 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001433 arg_files: [
1434 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001435 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001436 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001437 private_dex_api_filename: "private-dex.txt",
1438 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001439 args: metalava_framework_docs_args +
1440 " --show-unannotated " +
1441 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001442 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001443}
1444
Nan Zhang7764a4b2018-08-22 11:27:31 -07001445droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001446 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001447 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001448 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001449 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001450 ],
Jiyong Park20426532019-08-19 15:24:49 +09001451
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001452 arg_files: [
1453 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001454 ],
1455 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001456 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001457 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001458 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001459 " --show-unannotated " +
1460 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001461 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001462}
1463
Nan Zhang894c9ec2018-09-10 18:58:39 -07001464droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001465 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001466 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001467 api_filename: "public_api.txt",
1468 private_api_filename: "private.txt",
1469 removed_api_filename: "removed.txt",
1470 arg_files: [
1471 "core/res/AndroidManifest.xml",
1472 ],
1473 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001474 check_api: {
1475 current: {
1476 api_file: "api/current.txt",
1477 removed_api_file: "api/removed.txt",
1478 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001479 last_released: {
1480 api_file: ":last-released-public-api",
1481 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001482 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001483 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001484 api_lint: {
1485 enabled: true,
1486 new_since: ":last-released-public-api",
1487 baseline_file: "api/lint-baseline.txt",
1488 },
Nan Zhange5612602018-08-16 16:16:00 -07001489 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001490 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001491}
1492
Nan Zhang894c9ec2018-09-10 18:58:39 -07001493droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001494 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001495 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001496 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001497 api_filename: "system-api.txt",
1498 private_api_filename: "system-private.txt",
1499 private_dex_api_filename: "system-private-dex.txt",
1500 removed_api_filename: "system-removed.txt",
1501 arg_files: [
1502 "core/res/AndroidManifest.xml",
1503 ],
1504 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001505 check_api: {
1506 current: {
1507 api_file: "api/system-current.txt",
1508 removed_api_file: "api/system-removed.txt",
1509 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001510 last_released: {
1511 api_file: ":last-released-system-api",
1512 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001513 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001514 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001515 api_lint: {
1516 enabled: true,
1517 new_since: ":last-released-system-api",
1518 baseline_file: "api/system-lint-baseline.txt",
1519 },
Nan Zhange5612602018-08-16 16:16:00 -07001520 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001521 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001522}
1523
Nan Zhang894c9ec2018-09-10 18:58:39 -07001524droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001525 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001526 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001527 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001528 api_filename: "test-api.txt",
1529 removed_api_filename: "test-removed.txt",
1530 arg_files: [
1531 "core/res/AndroidManifest.xml",
1532 ],
1533 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001534 check_api: {
1535 current: {
1536 api_file: "api/test-current.txt",
1537 removed_api_file: "api/test-removed.txt",
1538 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001539 api_lint: {
1540 enabled: true,
1541 baseline_file: "api/test-lint-baseline.txt",
1542 },
Nan Zhange5612602018-08-16 16:16:00 -07001543 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001544}
Nan Zhangaf251302018-08-30 10:59:51 -07001545
1546filegroup {
1547 name: "framework-annotation-nonnull-srcs",
1548 srcs: [
1549 "core/java/android/annotation/NonNull.java",
1550 ],
1551}
Insun Kang06b25ae2018-11-20 10:05:44 +09001552
1553filegroup {
1554 name: "framework-media-annotation-srcs",
1555 srcs: [
1556 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001557 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001558 "core/java/android/annotation/DrawableRes.java",
1559 "core/java/android/annotation/IntDef.java",
1560 "core/java/android/annotation/LongDef.java",
1561 "core/java/android/annotation/NonNull.java",
1562 "core/java/android/annotation/Nullable.java",
1563 "core/java/android/annotation/RequiresPermission.java",
1564 "core/java/android/annotation/SdkConstant.java",
1565 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001566 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001567 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001568 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001569 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001570 ],
1571}
1572
Andrei Onea7a2985c2019-02-18 15:28:35 +00001573// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1574// annotations to private apis
1575aidl_mapping {
1576 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001577 srcs: [":framework-all-sources"],
Tobias Thiererbc050342019-05-23 16:20:12 +01001578 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001579}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001580
1581genrule {
1582 name: "framework-annotation-proc-index",
1583 srcs: [":framework-annotation-proc"],
1584 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1585 out: ["unsupportedappusage_index.csv"],
1586 dist: {
1587 targets: ["droidcore"],
1588 },
1589}
Chen Xu192bf1f2019-09-05 22:07:42 -07001590
1591// Avoid including Parcelable classes as we don't want to have two copies of
1592// Parcelable cross the process.
1593filegroup {
1594 name: "framework-telephony-stack-shared-srcs",
1595 srcs: [
1596 "core/java/android/os/RegistrantList.java",
1597 "core/java/android/os/Registrant.java",
1598 "core/java/android/util/LocalLog.java",
1599 "core/java/android/util/Slog.java",
1600 "core/java/android/util/TimeUtils.java",
1601 "core/java/com/android/internal/os/SomeArgs.java",
Michelebadc0212019-10-31 11:48:43 -07001602 "core/java/com/android/internal/util/ArrayUtils.java",
1603 "core/java/com/android/internal/util/DumpUtils.java",
1604 "core/java/com/android/internal/util/FastXmlSerializer.java",
1605 "core/java/com/android/internal/util/HexDump.java",
1606 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001607 "core/java/com/android/internal/util/Preconditions.java",
1608 "core/java/com/android/internal/util/State.java",
1609 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001610 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001611 "core/java/com/android/internal/util/XmlUtils.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001612 ],
1613}
1614
Chen Xu4fea79c2019-10-08 18:39:03 -07001615// Avoid including Parcelable classes as we don't want to have two copies of
1616// Parcelable cross the process.
1617filegroup {
1618 name: "framework-cellbroadcast-shared-srcs",
1619 srcs: [
1620 "core/java/android/util/LocalLog.java",
1621 "core/java/android/util/Slog.java",
1622 "core/java/com/android/internal/util/State.java",
1623 "core/java/com/android/internal/util/StateMachine.java",
1624 ],
atrostce84de02019-10-08 16:16:47 +01001625}
Roshan Pius09de13e2019-10-16 13:16:04 -07001626
1627filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001628 name: "framework-ims-common-shared-srcs",
1629 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001630 "core/java/android/os/RegistrantList.java",
1631 "core/java/android/os/Registrant.java",
1632 "core/java/com/android/internal/os/SomeArgs.java",
1633 "core/java/com/android/internal/util/Preconditions.java",
1634 ],
1635}
1636
1637filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001638 name: "framework-wifistack-shared-srcs",
1639 srcs: [
1640 ":framework-annotations",
Roshan Piusb0d9a2402019-11-04 07:29:53 -08001641 "core/java/android/os/HandlerExecutor.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001642 "core/java/android/util/KeyValueListParser.java",
1643 "core/java/android/util/LocalLog.java",
1644 "core/java/android/util/Rational.java",
1645 "core/java/android/util/proto/ProtoStream.java",
1646 "core/java/android/util/proto/ProtoOutputStream.java",
1647 "core/java/com/android/internal/util/FastXmlSerializer.java",
1648 "core/java/com/android/internal/util/HexDump.java",
1649 "core/java/com/android/internal/util/IState.java",
1650 "core/java/com/android/internal/util/MessageUtils.java",
1651 "core/java/com/android/internal/util/Preconditions.java",
1652 "core/java/com/android/internal/util/State.java",
1653 "core/java/com/android/internal/util/StateMachine.java",
1654 "core/java/com/android/internal/util/WakeupMessage.java",
1655 "core/java/com/android/internal/util/XmlUtils.java",
1656 ],
1657}