blob: 6b18c2dfbe7ad382d6301b7d5c6415a57db12923 [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
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700215 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900216 ":framework-core-sources",
217 ":framework-drm-sources",
218 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900219 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900220 ":framework-keystore-sources",
221 ":framework-location-sources",
222 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900223 ":framework-mca-effect-sources",
224 ":framework-mca-filterfw-sources",
225 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900226 ":framework-media-sources",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100227 ":framework-mime-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",
256 ":storaged_aidl",
257 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900258
Jiyong Park20426532019-08-19 15:24:49 +0900259 // For the generated R.java and Manifest.java
260 ":framework-res{.aapt.srcjar}",
261
262 // etc.
263 ":framework-javastream-protos",
264 ":framework-statslog-gen",
265 ],
266}
Jiyong Park1cc95662019-08-07 22:45:07 +0900267
Jiyong Parkae9972b2019-09-15 20:19:02 +0900268filegroup {
269 name: "framework-all-sources",
270 srcs: [
271 ":framework-non-updatable-sources",
272 ":updatable-media-srcs",
273 ],
274}
275
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100276java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700277 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700278 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900279 export_include_dirs: [
280 "core/java",
281 "drm/java",
282 "graphics/java",
283 "keystore/java",
284 "location/java",
285 "lowpan/java",
286 "media/java",
287 "media/apex/java",
288 "media/mca/effect/java",
289 "media/mca/filterfw/java",
290 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700291 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900292 "opengl/java",
293 "rs/java",
294 "sax/java",
295 "telecomm/java",
296 "telephony/java",
297 "wifi/java",
298 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700299 },
Adam Pardyl50207032019-09-09 14:37:27 +0200300
301 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200302 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200303 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200304 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200305 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700306}
307
Jiyong Park20426532019-08-19 15:24:49 +0900308// Collection of classes that are generated from non-Java files that are not listed in
309// framework_srcs. These have no or very limited dependency to the framework.
310java_library {
311 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800312 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100313 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700314 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800315 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800316 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800317 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000318 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800319 "android.hardware.cas-V1.0-java",
320 "android.hardware.contexthub-V1.0-java",
321 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800322 "android.hardware.radio-V1.0-java",
323 "android.hardware.radio-V1.1-java",
324 "android.hardware.radio-V1.2-java",
325 "android.hardware.radio-V1.3-java",
326 "android.hardware.radio-V1.4-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800327 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800328 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700329 "android.hardware.thermal-V1.1-java",
330 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800331 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700332 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800333 "android.hardware.usb-V1.0-java-constants",
334 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800335 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800336 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000337 "android.hardware.vibrator-V1.0-java",
338 "android.hardware.vibrator-V1.1-java",
339 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900340 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800341 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000342 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900343
344 "com.android.sysprop.apex",
345 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800346 ],
Jiyong Park20426532019-08-19 15:24:49 +0900347 sdk_version: "core_platform",
348 installable: false,
349}
350
351java_defaults {
352 name: "framework-defaults",
353 defaults: ["framework-aidl-export-defaults"],
354 installable: true,
355
Jiyong Park20426532019-08-19 15:24:49 +0900356 aidl: {
357 generate_get_transaction_name: true,
358 },
359
Jiyong Parkae9972b2019-09-15 20:19:02 +0900360 srcs: ["core/java/**/*.logtags"],
361
Jiyong Park20426532019-08-19 15:24:49 +0900362 exclude_srcs: [
363 // See comment on framework-atb-backward-compatibility module below
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000364 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900365 ],
366
367 sdk_version: "core_platform",
368 libs: [
369 "ext",
370 "updatable_media_stubs",
371 ],
372
373 jarjar_rules: ":framework-jarjar-rules",
374
Tobias Thierer878c77b2019-08-18 15:19:45 +0100375 static_libs: [
376 "framework-internal-utils",
377 "mimemap",
378 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800379
Colin Crosscf3a0b52017-11-16 00:15:28 -0800380 dxflags: [
381 "--core-library",
382 "--multi-dex",
383 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100384
Eugene Susla3b2fe612019-08-06 18:47:14 -0700385 plugins: [
386 "view-inspector-annotation-processor",
387 "staledataclass-annotation-processor",
388 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100389}
390
Colin Crossbc2dc312018-10-26 22:34:06 -0700391filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800392 name: "framework-jarjar-rules",
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000393 srcs: ["framework_jarjar_rules.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800394}
395
396filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700397 name: "libincident_aidl",
398 srcs: [
399 "core/java/android/os/IIncidentManager.aidl",
400 "core/java/android/os/IIncidentReportStatusListener.aidl",
401 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700402 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700403}
404
405filegroup {
406 name: "statsd_aidl",
407 srcs: [
Tej Singh59184292019-10-11 11:07:06 -0700408 "core/java/android/os/IPullAtomCallback.aidl",
409 "core/java/android/os/IPullAtomResultReceiver.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700410 "core/java/android/os/IStatsCompanionService.aidl",
411 "core/java/android/os/IStatsManager.aidl",
Tej Singha0c89dd2019-01-25 16:39:18 -0800412 "core/java/android/os/IStatsPullerCallback.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700413 ],
Dan Willemsena38ff9f2019-06-11 10:56:01 -0700414 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700415}
416
Michael Wrightc390fbe2018-12-12 19:45:09 +0000417filegroup {
418 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",
atrostaec9bc12019-08-16 18:14:09 +0100439 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900440 // For backwards compatibility.
441 stem: "framework",
442}
443
444// This "framework" module is NOT installed to the device. It's
445// "framework-minus-apex" that gets installed to the device. Note that
446// the filename is still framework.jar (via the stem property) for
447// compatibility reason. The purpose of this module is to provide
448// framework APIs (both public and private) for bundled apps.
449// "framework-minus-apex" can't be used for the purpose because 1)
450// many apps have already hardcoded the name "framework" and
451// 2) it lacks API symbols from updatable modules - as it's clear from
452// its suffix "-minus-apex".
453java_library {
454 name: "framework",
455 defaults: ["framework-aidl-export-defaults"],
456 installable: false, // this lib is a build-only library
457 static_libs: [
458 "framework-minus-apex",
459 // TODO(jiyong): add stubs for APEXes here
460 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700461 sdk_version: "core_platform",
462}
463
464java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900465 name: "framework-all",
466 defaults: ["framework-defaults"],
467 srcs: [":framework-all-sources"],
468 installable: false,
atrost1a945502019-11-04 17:03:54 +0000469 libs: ["app-compat-annotations"],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000470 static_libs: ["exoplayer2-core"]
Jiyong Park97183492019-11-14 03:07:36 +0000471}
472
473java_library {
474 name: "framework-annotation-proc",
475 defaults: ["framework-aidl-export-defaults"],
476 srcs: [":framework-all-sources"],
477 libs: ["app-compat-annotations"],
478 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100479 plugins: [
480 "unsupportedappusage-annotation-processor",
481 "compat-changeid-annotation-processor",
482 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000483 static_libs: [
484 "exoplayer2-core"
485 ]
atrostb9c34502019-08-05 12:22:18 +0100486}
487
488platform_compat_config {
489 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000490 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100491}
492
Paul Duffin521975802019-06-05 10:35:08 +0100493// A library including just UnsupportedAppUsage.java classes.
494//
495// Provided for target so that libraries can use it without depending on
496// the whole of framework or the core platform API.
497//
498// Built for host so that the annotation processor can also use this annotation.
499java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100500 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100501 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100502 srcs: [
503 "core/java/android/annotation/IntDef.java",
504 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100505 ],
506 static_libs: [
507 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100508 ],
Paul Duffin521975802019-06-05 10:35:08 +0100509
510 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800511}
512
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000513// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000514// android.test.base library has been removed and which provides support for
515// maintaining backwards compatibility for APKs that target pre-P and depend on
516// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
517// specified on the build command line.
518java_library {
519 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000520 installable: true,
atrost1a945502019-11-04 17:03:54 +0000521 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000522 srcs: [
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000523 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000524 ],
525}
526
Colin Crosscf3a0b52017-11-16 00:15:28 -0800527genrule {
528 name: "framework-statslog-gen",
529 tools: ["stats-log-api-gen"],
530 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800531 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800532}
533
534gensrcs {
535 name: "framework-javastream-protos",
536 depfile: true,
537
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100538 tool_files: ["tools/genprotos.sh"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800539 tools: [
540 "aprotoc",
541 "protoc-gen-javastream",
542 "soong_zip",
543 ],
544
Alex Light159799d2018-08-08 07:05:19 -0700545 // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
546 // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
547 // the way sbox rewrites the command. See b/70221552.
548 cmd: "$(location tools/genprotos.sh) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100549 " $(location aprotoc) " +
550 " $(location protoc-gen-javastream) " +
551 " $(location soong_zip) " +
552 " $(genDir) " +
553 " $(depfile) " +
554 " $(in) " +
555 " $(out)",
Yi Jin437aa6e2018-01-10 11:34:26 -0800556 srcs: [
557 "core/proto/**/*.proto",
558 "libs/incident/**/*.proto",
559 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800560 output_extension: "srcjar",
561}
562
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900563filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900564 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900565 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900566 "core/java/android/annotation/NonNull.java",
567 "core/java/android/annotation/Nullable.java",
568 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900569 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900570 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900571 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900572 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100573 ],
Chalard Jean95213512019-01-30 21:04:58 +0900574}
575
576filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900577 name: "framework-networkstack-shared-srcs",
578 srcs: [
579 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900580 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900581 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900582 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900583 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900584 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900585 "core/java/com/android/internal/util/IState.java",
586 "core/java/com/android/internal/util/MessageUtils.java",
587 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900588 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900589 "core/java/com/android/internal/util/State.java",
590 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900591 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900592 "core/java/com/android/internal/util/WakeupMessage.java",
593 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100594 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900595}
596
markchiena6ba54d2019-09-03 15:58:06 +0800597filegroup {
598 name: "framework-tethering-shared-srcs",
599 srcs: [
600 "core/java/android/util/LocalLog.java",
601 ],
602}
Colin Crossd8e02252017-10-02 17:14:22 -0700603// Build ext.jar
604// ============================================================
605java_library {
606 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700607 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100608 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700609 static_libs: [
610 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700611 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000612 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100613 "libtextclassifier-java",
614 ],
615 required: [
616 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700617 ],
618 dxflags: ["--core-library"],
619}
620
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700621// ==== java proto host library ==============================
622java_library_host {
623 name: "platformprotos",
624 srcs: [
625 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700626 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700627 "core/proto/**/*.proto",
628 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700629 ],
630 proto: {
631 include_dirs: ["external/protobuf/src"],
632 type: "full",
633 },
634 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100635 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700636 },
637}
638
Colin Cross43214162018-08-20 13:57:24 -0700639// ==== java proto device library (for test only) ==============================
640java_library {
641 name: "platformprotosnano",
642 proto: {
643 type: "nano",
644 output_params: ["store_unknown_fields=true"],
645 include_dirs: ["external/protobuf/src"],
646 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000647 exclude_srcs: [
648 "core/proto/android/privacy.proto",
649 "core/proto/android/section.proto",
650 ],
Colin Cross43214162018-08-20 13:57:24 -0700651 sdk_version: "current",
652 srcs: [
653 "core/proto/**/*.proto",
654 "libs/incident/proto/android/os/**/*.proto",
655 ],
656}
657
658// ==== java proto device library (for test only) ==============================
659java_library {
660 name: "platformprotoslite",
661 proto: {
662 type: "lite",
663 include_dirs: ["external/protobuf/src"],
664 },
665
666 srcs: [
667 "core/proto/**/*.proto",
668 "libs/incident/proto/android/os/**/*.proto",
669 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000670 exclude_srcs: [
671 "core/proto/android/privacy.proto",
672 "core/proto/android/section.proto",
673 ],
Colin Cross43214162018-08-20 13:57:24 -0700674 // Protos have lots of MissingOverride and similar.
675 errorprone: {
676 javacflags: ["-XepDisableAllChecks"],
677 },
678}
679
Colin Crossaa0d4352017-05-02 14:14:56 -0700680// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000681cc_defaults {
682 name: "libplatformprotos-defaults",
683
Colin Crossaa0d4352017-05-02 14:14:56 -0700684 proto: {
685 export_proto_headers: true,
686 include_dirs: ["external/protobuf/src"],
687 },
688
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700689 cflags: [
690 "-Wall",
691 "-Werror",
692 "-Wno-unused-parameter",
693 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800694
695 srcs: [
696 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800697 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000698}
699
700cc_library {
701 name: "libplatformprotos",
702 defaults: ["libplatformprotos-defaults"],
703 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800704
Colin Crossaa0d4352017-05-02 14:14:56 -0700705 target: {
706 host: {
707 proto: {
708 type: "full",
709 },
710 },
711 android: {
712 proto: {
713 type: "lite",
714 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000715 shared_libs: [
716 "libprotobuf-cpp-lite",
717 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700718 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700719 enabled: false,
720 },
721 },
722 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700723}
724
Joe Onorato9bd5db72019-04-03 18:19:43 -0700725// This library is meant for vendor code that needs to output protobuf. It links
726// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
727// binary compatibility.
728cc_library {
729 name: "libplatformprotos-static",
730 defaults: ["libplatformprotos-defaults"],
731 host_supported: false,
732
733 // This is okay because this library is only built as a static library. The C++
734 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
735 // but is not authorized to be used outside of debugging.
736 vendor_available: true,
737
738 target: {
739 android: {
740 proto: {
741 type: "lite",
742 },
743 static_libs: [
744 "libprotobuf-cpp-lite",
745 ],
746 shared: {
747 enabled: false,
748 },
749 },
750 },
751}
752
753
Joe Onorato99598ee2019-02-11 15:55:13 +0000754// This is the full proto version of libplatformprotos. It may only
755// be used by test code that is not shipped on the device.
756cc_library {
757 name: "libplatformprotos-test",
758 defaults: ["libplatformprotos-defaults"],
759 host_supported: false,
760
761 target: {
762 android: {
763 proto: {
764 type: "full",
765 },
766 shared: {
767 enabled: false,
768 },
769 },
770 },
771}
772
Songchun Fan0037c3f2019-10-30 15:20:59 -0700773filegroup {
774 name: "incremental_aidl",
775 srcs: [
776 "core/java/android/os/incremental/IIncrementalService.aidl",
777 "core/java/android/os/incremental/IIncrementalServiceProxy.aidl",
778 "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
779 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
780 "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
781 ],
782 path: "core/java",
783}
784
785filegroup {
786 name: "incremental_data_loader_aidl",
787 srcs: [
788 "core/java/android/service/incremental/IIncrementalDataLoaderStatusListener.aidl",
789 "core/java/android/service/incremental/IIncrementalDataLoaderService.aidl",
790 ],
791 path: "core/java",
792}
793
794aidl_interface {
795 name: "libincremental_aidl",
796 srcs: [
797 ":incremental_aidl",
798 ":incremental_data_loader_aidl",
799 ],
800 backend: {
801 java: {
802 sdk_version: "28",
803 },
804 cpp: {
805 enabled: true,
806 },
807 ndk: {
808 enabled: true,
809 },
810 },
811 api_dir: "aidl/incremental",
812}
Joe Onorato99598ee2019-02-11 15:55:13 +0000813
Yi Jin04625ad2017-10-17 18:29:33 -0700814gensrcs {
815 name: "gen-platform-proto-constants",
816 depfile: true,
817
818 tools: [
819 "aprotoc",
820 "protoc-gen-cppstream",
821 ],
822
823 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800824 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800825 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800826 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700827 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700828 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700829 "core/proto/android/os/kernelwake.proto",
830 "core/proto/android/os/pagetypeinfo.proto",
831 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800832 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800833 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800834 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700835 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700836 ],
837
838 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800839 cmd: "mkdir -p $(genDir) " +
840 "&& $(location aprotoc) " +
841 " --plugin=$(location protoc-gen-cppstream) " +
842 " --dependency_out=$(depfile) " +
843 " --cppstream_out=$(genDir) " +
844 " -Iexternal/protobuf/src " +
845 " -I . " +
846 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700847
Logan Chien71ddfea2018-02-27 16:43:50 +0800848 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700849}
850
Joe Onorato99598ee2019-02-11 15:55:13 +0000851
Dan Albert2a8d9c22016-09-23 15:55:49 -0700852subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700853 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600854 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800855 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700856 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700857 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500858 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700859 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700860 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700861]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800862
863optional_subdirs = [
864 "core/tests/utiltests/jni",
865]
Steven Morelandeddafe92017-10-02 16:58:41 -0700866
Colin Crossa2b78a72018-03-29 13:31:04 -0700867// TODO(b/77285514): remove this once the last few hidl interfaces have been
868// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700869java_library {
870 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100871 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700872
873 srcs: [
874 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800875 "core/java/android/annotation/IntDef.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700876 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800877 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800878 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800879 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000880 "core/java/android/annotation/UnsupportedAppUsage.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700881 "core/java/android/os/HwBinder.java",
882 "core/java/android/os/HwBlob.java",
883 "core/java/android/os/HwParcel.java",
884 "core/java/android/os/IHwBinder.java",
885 "core/java/android/os/IHwInterface.java",
886 "core/java/android/os/DeadObjectException.java",
887 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700888 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700889 "core/java/android/os/RemoteException.java",
890 "core/java/android/util/AndroidException.java",
891 ],
892
893 dxflags: ["--core-library"],
894 installable: false,
895}
Nan Zhang2db709d2017-11-08 20:48:46 -0800896
897python_defaults {
898 name: "base_default",
899 version: {
900 py2: {
901 enabled: true,
902 embedded_launcher: true,
903 },
904 py3: {
905 enabled: false,
906 embedded_launcher: false,
907 },
908 },
909}
910
911python_binary_host {
912 name: "fontchain_linter",
913 defaults: ["base_default"],
914 main: "tools/fonts/fontchain_linter.py",
915 srcs: [
916 "tools/fonts/fontchain_linter.py",
917 ],
918 libs: [
919 "fontTools",
920 ],
921}
Nan Zhang172875b2018-02-27 11:24:03 -0800922
Jiyong Park20426532019-08-19 15:24:49 +0900923// TODO: Don't rely on this list by switching package.html into package-info.java
Nan Zhang172875b2018-02-27 11:24:03 -0800924frameworks_base_subdirs = [
925 "core/java",
926 "graphics/java",
927 "location/java",
928 "media/java",
929 "media/mca/effect/java",
930 "media/mca/filterfw/java",
931 "media/mca/filterpacks/java",
932 "drm/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700933 "mms/java",
Nan Zhang172875b2018-02-27 11:24:03 -0800934 "opengl/java",
935 "sax/java",
936 "telecomm/java",
Amit Mahajand3551532019-09-23 17:59:57 -0700937 "telephony/common",
Nan Zhang172875b2018-02-27 11:24:03 -0800938 "telephony/java",
939 "wifi/java",
940 "lowpan/java",
941 "keystore/java",
942 "rs/java",
943]
944
Paul Duffin0440e1f2019-02-11 16:13:25 +0000945// Make the api/current.txt file available for use by modules in other
946// directories.
947filegroup {
948 name: "frameworks-base-api-current.txt",
949 srcs: [
950 "api/current.txt",
951 ],
952}
953
Paul Duffincd35de32019-05-30 15:12:47 +0100954// Make the api/system-current.txt file available for use by modules in other
955// directories.
956filegroup {
957 name: "frameworks-base-api-system-current.txt",
958 srcs: [
959 "api/system-current.txt",
960 ],
961}
962
963// Make the api/system-removed.txt file available for use by modules in other
964// directories.
965filegroup {
966 name: "frameworks-base-api-system-removed.txt",
967 srcs: [
968 "api/system-removed.txt",
969 ],
970}
971
Nan Zhang7764a4b2018-08-22 11:27:31 -0700972framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100973 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
974 "-overview $(location core/java/overview.html) " +
975 // Federate Support Library references against local API file.
976 "-federate SupportLib https://developer.android.com " +
977 "-federationapi SupportLib $(location :current-support-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800978
Nan Zhang7764a4b2018-08-22 11:27:31 -0700979framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700980 "voip-common",
981 "android.test.mock",
982 "android-support-annotations",
983 "android-support-compat",
984 "android-support-core-ui",
985 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700986 "android-support-design",
987 "android-support-dynamic-animation",
988 "android-support-exifinterface",
989 "android-support-fragment",
990 "android-support-media-compat",
991 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700992 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700993 "android-support-v7-cardview",
994 "android-support-v7-gridlayout",
995 "android-support-v7-mediarouter",
996 "android-support-v7-palette",
997 "android-support-v7-preference",
998 "android-support-v13",
999 "android-support-v14-preference",
1000 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001001 "android-support-vectordrawable",
1002 "android-support-animatedvectordrawable",
1003 "android-support-v7-appcompat",
1004 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001005 "android-support-v8-renderscript",
1006 "android-support-multidex",
1007 "android-support-multidex-instrumentation",
1008]
1009
1010metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +01001011 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +00001012 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001013 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001014 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +01001015 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001016 "--hide MissingPermission --hide BroadcastBehavior " +
1017 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -04001018 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1019 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001020
Jiyong Parkae9972b2019-09-15 20:19:02 +09001021packages_to_document = [
1022 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001023 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001024 "java",
1025 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001026 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001027 "org.apache.http",
1028 "org.json",
1029 "org.w3c.dom",
1030 "org.xml.sax",
1031 "org.xmlpull",
1032]
1033
Nan Zhang7764a4b2018-08-22 11:27:31 -07001034stubs_defaults {
1035 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001036 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001037 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001038 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001039 "test-base/src/**/*.java",
1040 ":opt-telephony-srcs",
1041 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001042 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001043 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001044 ":updatable-media-srcs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001045 "test-mock/src/**/*.java",
1046 "test-runner/src/**/*.java",
1047 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001048 libs: framework_docs_only_libs,
Nan Zhang3e15ba82018-07-26 18:41:12 +00001049 local_sourcepaths: frameworks_base_subdirs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001050 create_doc_stubs: true,
1051 annotations_enabled: true,
1052 api_levels_annotations_enabled: true,
1053 api_levels_annotations_dirs: [
1054 "sdk-dir",
1055 "api-versions-jars-dir",
1056 ],
Jeff Gaston1b511422019-09-20 14:37:00 -04001057 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001058 merge_annotations_dirs: [
1059 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001060 ],
1061}
1062
1063doc_defaults {
1064 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001065 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001066 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001067 html_dirs: [
1068 "docs/html",
1069 ],
1070 knowntags: [
1071 "docs/knowntags.txt",
1072 ":known-oj-tags",
1073 ],
1074 custom_template: "droiddoc-templates-sdk",
1075 resourcesdir: "docs/html/reference/images/",
1076 resourcesoutdir: "reference/android/images/",
1077 hdf: [
1078 "dac true",
1079 "sdk.codename O",
1080 "sdk.preview.version 1",
1081 "sdk.version 7.0",
1082 "sdk.rel.id 1",
1083 "sdk.preview 0",
1084 ],
1085 arg_files: [
1086 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001087 "core/java/overview.html",
1088 ":current-support-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001089 ],
1090 create_stubs: false,
1091}
1092
Tiem Song730c19b2019-08-26 11:27:27 -07001093doc_defaults {
1094 name: "framework-dokka-docs-default",
1095 create_stubs: false,
1096}
1097
Nan Zhang894c9ec2018-09-10 18:58:39 -07001098stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001099 name: "metalava-api-stubs-default",
1100 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001101 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001102 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001103 ":opt-telephony-srcs",
1104 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001105 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001106 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001107 ":updatable-media-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001108 ],
Jiyong Park20426532019-08-19 15:24:49 +09001109 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001110 local_sourcepaths: frameworks_base_subdirs,
1111 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001112 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001113 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001114 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001115 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001116 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001117 api_levels_annotations_enabled: true,
1118 api_levels_annotations_dirs: [
1119 "sdk-dir",
1120 "api-versions-jars-dir",
1121 ],
Jiyong Park20426532019-08-19 15:24:49 +09001122 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001123 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001124}
1125
Nan Zhang7764a4b2018-08-22 11:27:31 -07001126droidstubs {
1127 name: "framework-doc-stubs",
1128 defaults: ["framework-doc-stubs-default"],
1129 arg_files: [
1130 "core/res/AndroidManifest.xml",
1131 ],
1132 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001133 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001134}
1135
1136droidstubs {
1137 name: "framework-doc-system-stubs",
1138 defaults: ["framework-doc-stubs-default"],
1139 arg_files: [
1140 "core/res/AndroidManifest.xml",
1141 ],
1142 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001143 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001144}
1145
Nan Zhang3e15ba82018-07-26 18:41:12 +00001146droiddoc {
1147 name: "doc-comment-check-docs",
1148 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001149 srcs: [
1150 ":framework-doc-stubs",
1151 ],
1152 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001153 installable: false,
1154}
1155
1156droiddoc {
1157 name: "offline-sdk-docs",
1158 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001159 srcs: [
1160 ":framework-doc-stubs",
1161 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001162 hdf: [
1163 "android.whichdoc offline",
1164 ],
1165 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001166 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001167 static_doc_index_redirect: "docs/docs-preview-index.html",
1168}
1169
1170droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001171 // Please sync with android-api-council@ before making any changes for the name property below.
1172 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1173 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001174 name: "offline-sdk-referenceonly-docs",
1175 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001176 srcs: [
1177 ":framework-doc-stubs",
1178 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001179 hdf: [
1180 "android.whichdoc offline",
1181 ],
1182 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001183 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001184 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1185 static_doc_properties: "docs/source.properties",
1186}
1187
1188droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001189 // Please sync with android-api-council@ before making any changes for the name property below.
1190 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1191 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001192 name: "offline-system-sdk-referenceonly-docs",
1193 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001194 srcs: [
1195 ":framework-doc-system-stubs",
1196 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001197 hdf: [
1198 "android.whichdoc offline",
1199 ],
1200 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001201 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1202 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001203 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1204 static_doc_properties: "docs/source.properties",
1205}
1206
1207droiddoc {
1208 name: "online-sdk-docs",
1209 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001210 srcs: [
1211 ":framework-doc-stubs",
1212 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001213 hdf: [
1214 "android.whichdoc online",
1215 "android.hasSamples true",
1216 ],
1217 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001218 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001219 " -toroot / -samplegroup Admin " +
1220 " -samplegroup Background " +
1221 " -samplegroup Connectivity " +
1222 " -samplegroup Content " +
1223 " -samplegroup Input " +
1224 " -samplegroup Media " +
1225 " -samplegroup Notification " +
1226 " -samplegroup RenderScript " +
1227 " -samplegroup Security " +
1228 " -samplegroup Sensors " +
1229 " -samplegroup System " +
1230 " -samplegroup Testing " +
1231 " -samplegroup UI " +
1232 " -samplegroup Views " +
1233 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1234}
1235
1236droiddoc {
1237 name: "online-system-api-sdk-docs",
1238 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001239 srcs: [
1240 ":framework-doc-system-stubs",
1241 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001242 hdf: [
1243 "android.whichdoc online",
1244 "android.hasSamples true",
1245 ],
1246 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001247 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001248 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001249 " -title \"Android SDK - Including system APIs.\" " +
1250 " -hide 101 " +
1251 " -hide 104 " +
1252 " -hide 108 " +
1253 " -toroot / -samplegroup Admin " +
1254 " -samplegroup Background " +
1255 " -samplegroup Connectivity " +
1256 " -samplegroup Content " +
1257 " -samplegroup Input " +
1258 " -samplegroup Media " +
1259 " -samplegroup Notification " +
1260 " -samplegroup RenderScript " +
1261 " -samplegroup Security " +
1262 " -samplegroup Sensors " +
1263 " -samplegroup System " +
1264 " -samplegroup Testing " +
1265 " -samplegroup UI " +
1266 " -samplegroup Views " +
1267 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1268 installable: false,
1269}
1270
1271droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001272 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001273 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001274 srcs: [
1275 ":framework-doc-stubs",
1276 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001277 hdf: [
1278 "android.whichdoc online",
1279 "android.hasSamples true",
1280 ],
1281 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001282 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001283 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001284 " -samplegroup Background " +
1285 " -samplegroup Connectivity " +
1286 " -samplegroup Content " +
1287 " -samplegroup Input " +
1288 " -samplegroup Media " +
1289 " -samplegroup Notification " +
1290 " -samplegroup RenderScript " +
1291 " -samplegroup Security " +
1292 " -samplegroup Sensors " +
1293 " -samplegroup System " +
1294 " -samplegroup Testing " +
1295 " -samplegroup UI " +
1296 " -samplegroup Views " +
1297 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1298}
1299
1300droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001301 name: "ds-docs-kt",
1302 defaults: ["framework-dokka-docs-default"],
1303 srcs: [
1304 ":framework-doc-stubs",
1305 ],
1306 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1307 "-noStdlibLink",
1308 proofread_file: "ds-dokka-proofread.txt",
1309 dokka_enabled: true,
1310}
1311
1312java_genrule {
1313 name: "ds-docs",
1314 tools: [
1315 "zip2zip",
1316 "merge_zips",
1317 ],
1318 srcs: [
1319 ":ds-docs-java{.docs.zip}",
1320 ":ds-docs-kt{.docs.zip}",
1321 ],
1322 out: ["ds-docs.zip"],
1323 dist: {
1324 targets: ["docs"],
1325 },
1326 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1327 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1328}
1329
1330java_genrule {
1331 name: "ds-docs-switched",
1332 tools: [
1333 "switcher4",
1334 "soong_zip",
1335 ],
1336 srcs: [
1337 ":ds-docs-java{.docs.zip}",
1338 ":ds-docs-kt{.docs.zip}",
1339 ],
1340 out: ["ds-docs-switched.zip"],
1341 dist: {
1342 targets: ["docs"],
1343 },
1344 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1345 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1346 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1347 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1348 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1349}
1350
1351
1352droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001353 name: "ds-static-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 ],
1361 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001362 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001363 " -staticonly " +
1364 " -toroot / " +
1365 " -devsite " +
1366 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001367}
1368
1369droiddoc {
1370 name: "ds-ref-navtree-docs",
1371 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001372 srcs: [
1373 ":framework-doc-stubs",
1374 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001375 hdf: [
1376 "android.whichdoc online",
1377 ],
1378 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001379 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001380 " -toroot / " +
1381 " -atLinksNavtree " +
1382 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001383}
1384
1385droiddoc {
1386 name: "online-sdk-dev-docs",
1387 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001388 srcs: [
1389 ":framework-doc-stubs",
1390 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001391 hdf: [
1392 "android.whichdoc online",
1393 "android.hasSamples true",
1394 ],
1395 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001396 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001397 " -toroot / -samplegroup Admin " +
1398 " -samplegroup Background " +
1399 " -samplegroup Connectivity " +
1400 " -samplegroup Content " +
1401 " -samplegroup Input " +
1402 " -samplegroup Media " +
1403 " -samplegroup Notification " +
1404 " -samplegroup RenderScript " +
1405 " -samplegroup Security " +
1406 " -samplegroup Sensors " +
1407 " -samplegroup System " +
1408 " -samplegroup Testing " +
1409 " -samplegroup UI " +
1410 " -samplegroup Views " +
1411 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1412}
1413
1414droiddoc {
1415 name: "hidden-docs",
1416 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001417 srcs: [
1418 ":framework-doc-stubs",
1419 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001420 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001421 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001422 " -referenceonly " +
1423 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001424}
1425
Nan Zhang7764a4b2018-08-22 11:27:31 -07001426droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001427 name: "hwbinder-stubs-docs",
1428 srcs: [
1429 "core/java/android/os/HidlSupport.java",
1430 "core/java/android/annotation/IntDef.java",
1431 "core/java/android/annotation/NonNull.java",
1432 "core/java/android/annotation/SystemApi.java",
1433 "core/java/android/os/HwBinder.java",
1434 "core/java/android/os/HwBlob.java",
1435 "core/java/android/os/HwParcel.java",
1436 "core/java/android/os/IHwBinder.java",
1437 "core/java/android/os/IHwInterface.java",
1438 "core/java/android/os/DeadObjectException.java",
1439 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001440 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001441 "core/java/android/os/RemoteException.java",
1442 "core/java/android/util/AndroidException.java",
1443 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001444 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001445 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001446 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001447 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001448 merge_annotations_dirs: [
1449 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001450 ],
1451 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001452}
1453
1454java_library_static {
1455 name: "hwbinder.stubs",
1456 sdk_version: "core_current",
1457 srcs: [
1458 ":hwbinder-stubs-docs",
1459 ],
1460}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001461
Nan Zhang894c9ec2018-09-10 18:58:39 -07001462droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001463 name: "hiddenapi-lists-docs",
1464 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001465 arg_files: [
1466 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001467 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001468 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001469 private_dex_api_filename: "private-dex.txt",
1470 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001471 args: metalava_framework_docs_args +
1472 " --show-unannotated " +
1473 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001474 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001475}
1476
Nan Zhang7764a4b2018-08-22 11:27:31 -07001477droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001478 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001479 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001480 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001481 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001482 ],
Jiyong Park20426532019-08-19 15:24:49 +09001483
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001484 arg_files: [
1485 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001486 ],
1487 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001488 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001489 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001490 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001491 " --show-unannotated " +
1492 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001493 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001494}
1495
Nan Zhang894c9ec2018-09-10 18:58:39 -07001496droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001497 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001498 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001499 api_filename: "public_api.txt",
1500 private_api_filename: "private.txt",
1501 removed_api_filename: "removed.txt",
1502 arg_files: [
1503 "core/res/AndroidManifest.xml",
1504 ],
1505 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001506 check_api: {
1507 current: {
1508 api_file: "api/current.txt",
1509 removed_api_file: "api/removed.txt",
1510 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001511 last_released: {
1512 api_file: ":last-released-public-api",
1513 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001514 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001515 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001516 api_lint: {
1517 enabled: true,
1518 new_since: ":last-released-public-api",
1519 baseline_file: "api/lint-baseline.txt",
1520 },
Nan Zhange5612602018-08-16 16:16:00 -07001521 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001522 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001523}
1524
Nan Zhang894c9ec2018-09-10 18:58:39 -07001525droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001526 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001527 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001528 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001529 api_filename: "system-api.txt",
1530 private_api_filename: "system-private.txt",
1531 private_dex_api_filename: "system-private-dex.txt",
1532 removed_api_filename: "system-removed.txt",
1533 arg_files: [
1534 "core/res/AndroidManifest.xml",
1535 ],
1536 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001537 check_api: {
1538 current: {
1539 api_file: "api/system-current.txt",
1540 removed_api_file: "api/system-removed.txt",
1541 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001542 last_released: {
1543 api_file: ":last-released-system-api",
1544 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001545 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001546 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001547 api_lint: {
1548 enabled: true,
1549 new_since: ":last-released-system-api",
1550 baseline_file: "api/system-lint-baseline.txt",
1551 },
Nan Zhange5612602018-08-16 16:16:00 -07001552 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001553 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001554}
1555
Nan Zhang894c9ec2018-09-10 18:58:39 -07001556droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001557 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001558 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001559 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001560 api_filename: "test-api.txt",
1561 removed_api_filename: "test-removed.txt",
1562 arg_files: [
1563 "core/res/AndroidManifest.xml",
1564 ],
1565 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001566 check_api: {
1567 current: {
1568 api_file: "api/test-current.txt",
1569 removed_api_file: "api/test-removed.txt",
1570 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001571 api_lint: {
1572 enabled: true,
1573 baseline_file: "api/test-lint-baseline.txt",
1574 },
Nan Zhange5612602018-08-16 16:16:00 -07001575 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001576}
Nan Zhangaf251302018-08-30 10:59:51 -07001577
1578filegroup {
1579 name: "framework-annotation-nonnull-srcs",
1580 srcs: [
1581 "core/java/android/annotation/NonNull.java",
1582 ],
1583}
Insun Kang06b25ae2018-11-20 10:05:44 +09001584
1585filegroup {
1586 name: "framework-media-annotation-srcs",
1587 srcs: [
1588 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001589 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001590 "core/java/android/annotation/DrawableRes.java",
1591 "core/java/android/annotation/IntDef.java",
1592 "core/java/android/annotation/LongDef.java",
1593 "core/java/android/annotation/NonNull.java",
1594 "core/java/android/annotation/Nullable.java",
1595 "core/java/android/annotation/RequiresPermission.java",
1596 "core/java/android/annotation/SdkConstant.java",
1597 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001598 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001599 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001600 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001601 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001602 ],
1603}
1604
Andrei Onea7a2985c2019-02-18 15:28:35 +00001605// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1606// annotations to private apis
1607aidl_mapping {
1608 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001609 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001610 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001611}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001612
1613genrule {
1614 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001615 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001616 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1617 out: ["unsupportedappusage_index.csv"],
1618 dist: {
1619 targets: ["droidcore"],
1620 },
1621}
Chen Xu192bf1f2019-09-05 22:07:42 -07001622
1623// Avoid including Parcelable classes as we don't want to have two copies of
1624// Parcelable cross the process.
1625filegroup {
1626 name: "framework-telephony-stack-shared-srcs",
1627 srcs: [
1628 "core/java/android/os/RegistrantList.java",
1629 "core/java/android/os/Registrant.java",
1630 "core/java/android/util/LocalLog.java",
1631 "core/java/android/util/Slog.java",
1632 "core/java/android/util/TimeUtils.java",
1633 "core/java/com/android/internal/os/SomeArgs.java",
Michelebadc0212019-10-31 11:48:43 -07001634 "core/java/com/android/internal/util/ArrayUtils.java",
1635 "core/java/com/android/internal/util/DumpUtils.java",
1636 "core/java/com/android/internal/util/FastXmlSerializer.java",
1637 "core/java/com/android/internal/util/HexDump.java",
1638 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001639 "core/java/com/android/internal/util/Preconditions.java",
1640 "core/java/com/android/internal/util/State.java",
1641 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001642 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001643 "core/java/com/android/internal/util/XmlUtils.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001644 ],
1645}
1646
Chen Xu4fea79c2019-10-08 18:39:03 -07001647// Avoid including Parcelable classes as we don't want to have two copies of
1648// Parcelable cross the process.
1649filegroup {
1650 name: "framework-cellbroadcast-shared-srcs",
1651 srcs: [
1652 "core/java/android/util/LocalLog.java",
1653 "core/java/android/util/Slog.java",
1654 "core/java/com/android/internal/util/State.java",
1655 "core/java/com/android/internal/util/StateMachine.java",
1656 ],
atrostce84de02019-10-08 16:16:47 +01001657}
Roshan Pius09de13e2019-10-16 13:16:04 -07001658
1659filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001660 name: "framework-ims-common-shared-srcs",
1661 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001662 "core/java/android/os/RegistrantList.java",
1663 "core/java/android/os/Registrant.java",
1664 "core/java/com/android/internal/os/SomeArgs.java",
1665 "core/java/com/android/internal/util/Preconditions.java",
1666 ],
1667}
1668
1669filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001670 name: "framework-wifistack-shared-srcs",
1671 srcs: [
1672 ":framework-annotations",
Roshan Piusb0d9a242019-11-04 07:29:53 -08001673 "core/java/android/os/HandlerExecutor.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001674 "core/java/android/util/KeyValueListParser.java",
1675 "core/java/android/util/LocalLog.java",
1676 "core/java/android/util/Rational.java",
1677 "core/java/android/util/proto/ProtoStream.java",
1678 "core/java/android/util/proto/ProtoOutputStream.java",
1679 "core/java/com/android/internal/util/FastXmlSerializer.java",
1680 "core/java/com/android/internal/util/HexDump.java",
1681 "core/java/com/android/internal/util/IState.java",
1682 "core/java/com/android/internal/util/MessageUtils.java",
1683 "core/java/com/android/internal/util/Preconditions.java",
1684 "core/java/com/android/internal/util/State.java",
1685 "core/java/com/android/internal/util/StateMachine.java",
1686 "core/java/com/android/internal/util/WakeupMessage.java",
1687 "core/java/com/android/internal/util/XmlUtils.java",
1688 ],
1689}