blob: c9c9a9a31f3273289c837f8d3afa32e8c569b936 [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 Seifert7094b762019-11-20 20:51:43 +0000393 srcs: ["jarjar_rules_hidl.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
538 tools: [
539 "aprotoc",
540 "protoc-gen-javastream",
541 "soong_zip",
542 ],
543
Anton Hanssond82b2f72019-11-18 13:34:56 +0000544 cmd: "mkdir -p $(genDir)/$(in) " +
545 "&& $(location aprotoc) " +
546 " --plugin=$(location protoc-gen-javastream) " +
547 " --dependency_out=$(depfile) " +
548 " --javastream_out=$(genDir)/$(in) " +
549 " -Iexternal/protobuf/src " +
550 " -I . " +
551 " $(in) " +
552 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
553
Yi Jin437aa6e2018-01-10 11:34:26 -0800554 srcs: [
555 "core/proto/**/*.proto",
556 "libs/incident/**/*.proto",
557 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800558 output_extension: "srcjar",
559}
560
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900561filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900562 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900563 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900564 "core/java/android/annotation/NonNull.java",
565 "core/java/android/annotation/Nullable.java",
566 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900567 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900568 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900569 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900570 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100571 ],
Chalard Jean95213512019-01-30 21:04:58 +0900572}
573
574filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900575 name: "framework-networkstack-shared-srcs",
576 srcs: [
577 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900578 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900579 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900580 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900581 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900582 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900583 "core/java/com/android/internal/util/IState.java",
584 "core/java/com/android/internal/util/MessageUtils.java",
585 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900586 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900587 "core/java/com/android/internal/util/State.java",
588 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900589 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900590 "core/java/com/android/internal/util/WakeupMessage.java",
591 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100592 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900593}
594
markchiena6ba54d2019-09-03 15:58:06 +0800595filegroup {
596 name: "framework-tethering-shared-srcs",
597 srcs: [
598 "core/java/android/util/LocalLog.java",
599 ],
600}
Colin Crossd8e02252017-10-02 17:14:22 -0700601// Build ext.jar
602// ============================================================
603java_library {
604 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700605 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100606 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700607 static_libs: [
608 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700609 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000610 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100611 "libtextclassifier-java",
612 ],
613 required: [
614 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700615 ],
616 dxflags: ["--core-library"],
617}
618
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700619// ==== java proto host library ==============================
620java_library_host {
621 name: "platformprotos",
622 srcs: [
623 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700624 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700625 "core/proto/**/*.proto",
626 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700627 ],
628 proto: {
629 include_dirs: ["external/protobuf/src"],
630 type: "full",
631 },
632 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100633 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700634 },
635}
636
Colin Cross43214162018-08-20 13:57:24 -0700637// ==== java proto device library (for test only) ==============================
638java_library {
639 name: "platformprotosnano",
640 proto: {
641 type: "nano",
642 output_params: ["store_unknown_fields=true"],
643 include_dirs: ["external/protobuf/src"],
644 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000645 exclude_srcs: [
646 "core/proto/android/privacy.proto",
647 "core/proto/android/section.proto",
648 ],
Colin Cross43214162018-08-20 13:57:24 -0700649 sdk_version: "current",
650 srcs: [
651 "core/proto/**/*.proto",
652 "libs/incident/proto/android/os/**/*.proto",
653 ],
654}
655
656// ==== java proto device library (for test only) ==============================
657java_library {
658 name: "platformprotoslite",
659 proto: {
660 type: "lite",
661 include_dirs: ["external/protobuf/src"],
662 },
663
664 srcs: [
665 "core/proto/**/*.proto",
666 "libs/incident/proto/android/os/**/*.proto",
667 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000668 exclude_srcs: [
669 "core/proto/android/privacy.proto",
670 "core/proto/android/section.proto",
671 ],
Colin Cross43214162018-08-20 13:57:24 -0700672 // Protos have lots of MissingOverride and similar.
673 errorprone: {
674 javacflags: ["-XepDisableAllChecks"],
675 },
676}
677
Colin Crossaa0d4352017-05-02 14:14:56 -0700678// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000679cc_defaults {
680 name: "libplatformprotos-defaults",
681
Colin Crossaa0d4352017-05-02 14:14:56 -0700682 proto: {
683 export_proto_headers: true,
684 include_dirs: ["external/protobuf/src"],
685 },
686
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700687 cflags: [
688 "-Wall",
689 "-Werror",
690 "-Wno-unused-parameter",
691 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800692
693 srcs: [
694 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800695 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000696}
697
698cc_library {
699 name: "libplatformprotos",
700 defaults: ["libplatformprotos-defaults"],
701 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800702
Colin Crossaa0d4352017-05-02 14:14:56 -0700703 target: {
704 host: {
705 proto: {
706 type: "full",
707 },
708 },
709 android: {
710 proto: {
711 type: "lite",
712 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000713 shared_libs: [
714 "libprotobuf-cpp-lite",
715 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700716 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700717 enabled: false,
718 },
719 },
720 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700721}
722
Joe Onorato9bd5db72019-04-03 18:19:43 -0700723// This library is meant for vendor code that needs to output protobuf. It links
724// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
725// binary compatibility.
726cc_library {
727 name: "libplatformprotos-static",
728 defaults: ["libplatformprotos-defaults"],
729 host_supported: false,
730
731 // This is okay because this library is only built as a static library. The C++
732 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
733 // but is not authorized to be used outside of debugging.
734 vendor_available: true,
735
736 target: {
737 android: {
738 proto: {
739 type: "lite",
740 },
741 static_libs: [
742 "libprotobuf-cpp-lite",
743 ],
744 shared: {
745 enabled: false,
746 },
747 },
748 },
749}
750
751
Joe Onorato99598ee2019-02-11 15:55:13 +0000752// This is the full proto version of libplatformprotos. It may only
753// be used by test code that is not shipped on the device.
754cc_library {
755 name: "libplatformprotos-test",
756 defaults: ["libplatformprotos-defaults"],
757 host_supported: false,
758
759 target: {
760 android: {
761 proto: {
762 type: "full",
763 },
764 shared: {
765 enabled: false,
766 },
767 },
768 },
769}
770
Songchun Fan0037c3f2019-10-30 15:20:59 -0700771filegroup {
772 name: "incremental_aidl",
773 srcs: [
774 "core/java/android/os/incremental/IIncrementalService.aidl",
775 "core/java/android/os/incremental/IIncrementalServiceProxy.aidl",
776 "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
777 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
778 "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
779 ],
780 path: "core/java",
781}
782
783filegroup {
784 name: "incremental_data_loader_aidl",
785 srcs: [
786 "core/java/android/service/incremental/IIncrementalDataLoaderStatusListener.aidl",
787 "core/java/android/service/incremental/IIncrementalDataLoaderService.aidl",
788 ],
789 path: "core/java",
790}
791
792aidl_interface {
793 name: "libincremental_aidl",
794 srcs: [
795 ":incremental_aidl",
796 ":incremental_data_loader_aidl",
797 ],
798 backend: {
799 java: {
800 sdk_version: "28",
801 },
802 cpp: {
803 enabled: true,
804 },
805 ndk: {
806 enabled: true,
807 },
808 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700809}
Joe Onorato99598ee2019-02-11 15:55:13 +0000810
Yi Jin04625ad2017-10-17 18:29:33 -0700811gensrcs {
812 name: "gen-platform-proto-constants",
813 depfile: true,
814
815 tools: [
816 "aprotoc",
817 "protoc-gen-cppstream",
818 ],
819
820 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800821 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800822 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800823 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700824 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700825 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700826 "core/proto/android/os/kernelwake.proto",
827 "core/proto/android/os/pagetypeinfo.proto",
828 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800829 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800830 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800831 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700832 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700833 ],
834
835 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800836 cmd: "mkdir -p $(genDir) " +
837 "&& $(location aprotoc) " +
838 " --plugin=$(location protoc-gen-cppstream) " +
839 " --dependency_out=$(depfile) " +
840 " --cppstream_out=$(genDir) " +
841 " -Iexternal/protobuf/src " +
842 " -I . " +
843 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700844
Logan Chien71ddfea2018-02-27 16:43:50 +0800845 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700846}
847
Joe Onorato99598ee2019-02-11 15:55:13 +0000848
Dan Albert2a8d9c22016-09-23 15:55:49 -0700849subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700850 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600851 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800852 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700853 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700854 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500855 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700856 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700857 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700858]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800859
860optional_subdirs = [
861 "core/tests/utiltests/jni",
862]
Steven Morelandeddafe92017-10-02 16:58:41 -0700863
Colin Crossa2b78a72018-03-29 13:31:04 -0700864// TODO(b/77285514): remove this once the last few hidl interfaces have been
865// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700866java_library {
867 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100868 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700869
870 srcs: [
871 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800872 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800873 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700874 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800875 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800876 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800877 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000878 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800879 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700880 "core/java/android/os/HwBinder.java",
881 "core/java/android/os/HwBlob.java",
882 "core/java/android/os/HwParcel.java",
883 "core/java/android/os/IHwBinder.java",
884 "core/java/android/os/IHwInterface.java",
885 "core/java/android/os/DeadObjectException.java",
886 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700887 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700888 "core/java/android/os/RemoteException.java",
889 "core/java/android/util/AndroidException.java",
890 ],
891
892 dxflags: ["--core-library"],
893 installable: false,
894}
Nan Zhang2db709d2017-11-08 20:48:46 -0800895
896python_defaults {
897 name: "base_default",
898 version: {
899 py2: {
900 enabled: true,
901 embedded_launcher: true,
902 },
903 py3: {
904 enabled: false,
905 embedded_launcher: false,
906 },
907 },
908}
909
910python_binary_host {
911 name: "fontchain_linter",
912 defaults: ["base_default"],
913 main: "tools/fonts/fontchain_linter.py",
914 srcs: [
915 "tools/fonts/fontchain_linter.py",
916 ],
917 libs: [
918 "fontTools",
919 ],
920}
Nan Zhang172875b2018-02-27 11:24:03 -0800921
Paul Duffin0440e1f2019-02-11 16:13:25 +0000922// Make the api/current.txt file available for use by modules in other
923// directories.
924filegroup {
925 name: "frameworks-base-api-current.txt",
926 srcs: [
927 "api/current.txt",
928 ],
929}
930
Paul Duffincd35de32019-05-30 15:12:47 +0100931// Make the api/system-current.txt file available for use by modules in other
932// directories.
933filegroup {
934 name: "frameworks-base-api-system-current.txt",
935 srcs: [
936 "api/system-current.txt",
937 ],
938}
939
940// Make the api/system-removed.txt file available for use by modules in other
941// directories.
942filegroup {
943 name: "frameworks-base-api-system-removed.txt",
944 srcs: [
945 "api/system-removed.txt",
946 ],
947}
948
Nan Zhang7764a4b2018-08-22 11:27:31 -0700949framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100950 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
951 "-overview $(location core/java/overview.html) " +
952 // Federate Support Library references against local API file.
953 "-federate SupportLib https://developer.android.com " +
Charles Munger1b1c0ca2019-11-19 14:01:19 -0800954 "-federationapi SupportLib $(location :current-support-api) " +
955 // Federate Support Library references against local API file.
956 "-federate AndroidX https://developer.android.com " +
957 "-federationapi AndroidX $(location :current-androidx-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800958
Nan Zhang7764a4b2018-08-22 11:27:31 -0700959framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700960 "voip-common",
961 "android.test.mock",
962 "android-support-annotations",
963 "android-support-compat",
964 "android-support-core-ui",
965 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700966 "android-support-design",
967 "android-support-dynamic-animation",
968 "android-support-exifinterface",
969 "android-support-fragment",
970 "android-support-media-compat",
971 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700972 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700973 "android-support-v7-cardview",
974 "android-support-v7-gridlayout",
975 "android-support-v7-mediarouter",
976 "android-support-v7-palette",
977 "android-support-v7-preference",
978 "android-support-v13",
979 "android-support-v14-preference",
980 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700981 "android-support-vectordrawable",
982 "android-support-animatedvectordrawable",
983 "android-support-v7-appcompat",
984 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700985 "android-support-v8-renderscript",
986 "android-support-multidex",
987 "android-support-multidex-instrumentation",
988]
989
990metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +0100991 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +0000992 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +0100993 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700994 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +0100995 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700996 "--hide MissingPermission --hide BroadcastBehavior " +
997 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -0400998 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
999 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001000
Jiyong Parkae9972b2019-09-15 20:19:02 +09001001packages_to_document = [
1002 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001003 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001004 "java",
1005 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001006 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001007 "org.apache.http",
1008 "org.json",
1009 "org.w3c.dom",
1010 "org.xml.sax",
1011 "org.xmlpull",
1012]
1013
Nan Zhang7764a4b2018-08-22 11:27:31 -07001014stubs_defaults {
1015 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001016 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001017 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001018 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001019 "test-base/src/**/*.java",
1020 ":opt-telephony-srcs",
1021 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001022 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001023 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001024 ":updatable-media-srcs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001025 "test-mock/src/**/*.java",
1026 "test-runner/src/**/*.java",
1027 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001028 libs: framework_docs_only_libs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001029 create_doc_stubs: true,
1030 annotations_enabled: true,
1031 api_levels_annotations_enabled: true,
1032 api_levels_annotations_dirs: [
1033 "sdk-dir",
1034 "api-versions-jars-dir",
1035 ],
Jeff Gaston1b511422019-09-20 14:37:00 -04001036 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001037 merge_annotations_dirs: [
1038 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001039 ],
1040}
1041
1042doc_defaults {
1043 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001044 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001045 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001046 html_dirs: [
1047 "docs/html",
1048 ],
1049 knowntags: [
1050 "docs/knowntags.txt",
1051 ":known-oj-tags",
1052 ],
1053 custom_template: "droiddoc-templates-sdk",
1054 resourcesdir: "docs/html/reference/images/",
1055 resourcesoutdir: "reference/android/images/",
1056 hdf: [
1057 "dac true",
1058 "sdk.codename O",
1059 "sdk.preview.version 1",
1060 "sdk.version 7.0",
1061 "sdk.rel.id 1",
1062 "sdk.preview 0",
1063 ],
1064 arg_files: [
1065 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001066 "core/java/overview.html",
1067 ":current-support-api",
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001068 ":current-androidx-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001069 ],
1070 create_stubs: false,
1071}
1072
Tiem Song730c19b2019-08-26 11:27:27 -07001073doc_defaults {
1074 name: "framework-dokka-docs-default",
1075 create_stubs: false,
1076}
1077
Nan Zhang894c9ec2018-09-10 18:58:39 -07001078stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001079 name: "metalava-api-stubs-default",
1080 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001081 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001082 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001083 ":opt-telephony-srcs",
1084 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001085 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001086 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001087 ":updatable-media-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001088 ],
Jiyong Park20426532019-08-19 15:24:49 +09001089 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001090 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001091 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001092 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001093 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001094 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001095 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001096 api_levels_annotations_enabled: true,
1097 api_levels_annotations_dirs: [
1098 "sdk-dir",
1099 "api-versions-jars-dir",
1100 ],
Jiyong Park20426532019-08-19 15:24:49 +09001101 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001102 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001103}
1104
Nan Zhang7764a4b2018-08-22 11:27:31 -07001105droidstubs {
1106 name: "framework-doc-stubs",
1107 defaults: ["framework-doc-stubs-default"],
1108 arg_files: [
1109 "core/res/AndroidManifest.xml",
1110 ],
1111 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001112 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001113}
1114
1115droidstubs {
1116 name: "framework-doc-system-stubs",
1117 defaults: ["framework-doc-stubs-default"],
1118 arg_files: [
1119 "core/res/AndroidManifest.xml",
1120 ],
1121 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001122 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001123}
1124
Nan Zhang3e15ba82018-07-26 18:41:12 +00001125droiddoc {
1126 name: "doc-comment-check-docs",
1127 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001128 srcs: [
1129 ":framework-doc-stubs",
1130 ],
1131 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001132 installable: false,
1133}
1134
1135droiddoc {
1136 name: "offline-sdk-docs",
1137 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001138 srcs: [
1139 ":framework-doc-stubs",
1140 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001141 hdf: [
1142 "android.whichdoc offline",
1143 ],
1144 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001145 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001146 static_doc_index_redirect: "docs/docs-preview-index.html",
1147}
1148
1149droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001150 // Please sync with android-api-council@ before making any changes for the name property below.
1151 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1152 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001153 name: "offline-sdk-referenceonly-docs",
1154 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001155 srcs: [
1156 ":framework-doc-stubs",
1157 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001158 hdf: [
1159 "android.whichdoc offline",
1160 ],
1161 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001162 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001163 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1164 static_doc_properties: "docs/source.properties",
1165}
1166
1167droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001168 // Please sync with android-api-council@ before making any changes for the name property below.
1169 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1170 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001171 name: "offline-system-sdk-referenceonly-docs",
1172 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001173 srcs: [
1174 ":framework-doc-system-stubs",
1175 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001176 hdf: [
1177 "android.whichdoc offline",
1178 ],
1179 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001180 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1181 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001182 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1183 static_doc_properties: "docs/source.properties",
1184}
1185
1186droiddoc {
1187 name: "online-sdk-docs",
1188 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001189 srcs: [
1190 ":framework-doc-stubs",
1191 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001192 hdf: [
1193 "android.whichdoc online",
1194 "android.hasSamples true",
1195 ],
1196 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001197 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001198 " -toroot / -samplegroup Admin " +
1199 " -samplegroup Background " +
1200 " -samplegroup Connectivity " +
1201 " -samplegroup Content " +
1202 " -samplegroup Input " +
1203 " -samplegroup Media " +
1204 " -samplegroup Notification " +
1205 " -samplegroup RenderScript " +
1206 " -samplegroup Security " +
1207 " -samplegroup Sensors " +
1208 " -samplegroup System " +
1209 " -samplegroup Testing " +
1210 " -samplegroup UI " +
1211 " -samplegroup Views " +
1212 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1213}
1214
1215droiddoc {
1216 name: "online-system-api-sdk-docs",
1217 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001218 srcs: [
1219 ":framework-doc-system-stubs",
1220 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001221 hdf: [
1222 "android.whichdoc online",
1223 "android.hasSamples true",
1224 ],
1225 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001226 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001227 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001228 " -title \"Android SDK - Including system APIs.\" " +
1229 " -hide 101 " +
1230 " -hide 104 " +
1231 " -hide 108 " +
1232 " -toroot / -samplegroup Admin " +
1233 " -samplegroup Background " +
1234 " -samplegroup Connectivity " +
1235 " -samplegroup Content " +
1236 " -samplegroup Input " +
1237 " -samplegroup Media " +
1238 " -samplegroup Notification " +
1239 " -samplegroup RenderScript " +
1240 " -samplegroup Security " +
1241 " -samplegroup Sensors " +
1242 " -samplegroup System " +
1243 " -samplegroup Testing " +
1244 " -samplegroup UI " +
1245 " -samplegroup Views " +
1246 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1247 installable: false,
1248}
1249
1250droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001251 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001252 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001253 srcs: [
1254 ":framework-doc-stubs",
1255 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001256 hdf: [
1257 "android.whichdoc online",
1258 "android.hasSamples true",
1259 ],
1260 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001261 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001262 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001263 " -samplegroup Background " +
1264 " -samplegroup Connectivity " +
1265 " -samplegroup Content " +
1266 " -samplegroup Input " +
1267 " -samplegroup Media " +
1268 " -samplegroup Notification " +
1269 " -samplegroup RenderScript " +
1270 " -samplegroup Security " +
1271 " -samplegroup Sensors " +
1272 " -samplegroup System " +
1273 " -samplegroup Testing " +
1274 " -samplegroup UI " +
1275 " -samplegroup Views " +
1276 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1277}
1278
1279droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001280 name: "ds-docs-kt",
1281 defaults: ["framework-dokka-docs-default"],
1282 srcs: [
1283 ":framework-doc-stubs",
1284 ],
1285 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1286 "-noStdlibLink",
1287 proofread_file: "ds-dokka-proofread.txt",
1288 dokka_enabled: true,
1289}
1290
1291java_genrule {
1292 name: "ds-docs",
1293 tools: [
1294 "zip2zip",
1295 "merge_zips",
1296 ],
1297 srcs: [
1298 ":ds-docs-java{.docs.zip}",
1299 ":ds-docs-kt{.docs.zip}",
1300 ],
1301 out: ["ds-docs.zip"],
1302 dist: {
1303 targets: ["docs"],
1304 },
1305 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1306 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1307}
1308
1309java_genrule {
1310 name: "ds-docs-switched",
1311 tools: [
1312 "switcher4",
1313 "soong_zip",
1314 ],
1315 srcs: [
1316 ":ds-docs-java{.docs.zip}",
1317 ":ds-docs-kt{.docs.zip}",
1318 ],
1319 out: ["ds-docs-switched.zip"],
1320 dist: {
1321 targets: ["docs"],
1322 },
1323 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1324 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1325 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1326 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1327 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1328}
1329
1330
1331droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001332 name: "ds-static-docs",
1333 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001334 srcs: [
1335 ":framework-doc-stubs",
1336 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001337 hdf: [
1338 "android.whichdoc online",
1339 ],
1340 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001341 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001342 " -staticonly " +
1343 " -toroot / " +
1344 " -devsite " +
1345 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001346}
1347
1348droiddoc {
1349 name: "ds-ref-navtree-docs",
1350 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001351 srcs: [
1352 ":framework-doc-stubs",
1353 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001354 hdf: [
1355 "android.whichdoc online",
1356 ],
1357 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001358 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001359 " -toroot / " +
1360 " -atLinksNavtree " +
1361 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001362}
1363
1364droiddoc {
1365 name: "online-sdk-dev-docs",
1366 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001367 srcs: [
1368 ":framework-doc-stubs",
1369 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001370 hdf: [
1371 "android.whichdoc online",
1372 "android.hasSamples true",
1373 ],
1374 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001375 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001376 " -toroot / -samplegroup Admin " +
1377 " -samplegroup Background " +
1378 " -samplegroup Connectivity " +
1379 " -samplegroup Content " +
1380 " -samplegroup Input " +
1381 " -samplegroup Media " +
1382 " -samplegroup Notification " +
1383 " -samplegroup RenderScript " +
1384 " -samplegroup Security " +
1385 " -samplegroup Sensors " +
1386 " -samplegroup System " +
1387 " -samplegroup Testing " +
1388 " -samplegroup UI " +
1389 " -samplegroup Views " +
1390 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1391}
1392
1393droiddoc {
1394 name: "hidden-docs",
1395 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001396 srcs: [
1397 ":framework-doc-stubs",
1398 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001399 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001400 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001401 " -referenceonly " +
1402 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001403}
1404
Nan Zhang7764a4b2018-08-22 11:27:31 -07001405droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001406 name: "hwbinder-stubs-docs",
1407 srcs: [
1408 "core/java/android/os/HidlSupport.java",
1409 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001410 "core/java/android/annotation/IntRange.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001411 "core/java/android/annotation/NonNull.java",
1412 "core/java/android/annotation/SystemApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001413 "core/java/android/os/HidlMemory.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001414 "core/java/android/os/HwBinder.java",
1415 "core/java/android/os/HwBlob.java",
1416 "core/java/android/os/HwParcel.java",
1417 "core/java/android/os/IHwBinder.java",
1418 "core/java/android/os/IHwInterface.java",
1419 "core/java/android/os/DeadObjectException.java",
1420 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001421 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001422 "core/java/android/os/RemoteException.java",
1423 "core/java/android/util/AndroidException.java",
1424 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001425 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001426 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001427 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001428 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001429 merge_annotations_dirs: [
1430 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001431 ],
1432 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001433}
1434
1435java_library_static {
1436 name: "hwbinder.stubs",
1437 sdk_version: "core_current",
1438 srcs: [
1439 ":hwbinder-stubs-docs",
1440 ],
1441}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001442
Nan Zhang894c9ec2018-09-10 18:58:39 -07001443droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001444 name: "hiddenapi-lists-docs",
1445 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001446 arg_files: [
1447 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001448 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001449 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001450 private_dex_api_filename: "private-dex.txt",
1451 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001452 args: metalava_framework_docs_args +
1453 " --show-unannotated " +
1454 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001455 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001456}
1457
Nan Zhang7764a4b2018-08-22 11:27:31 -07001458droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001459 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001460 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001461 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001462 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001463 ],
Jiyong Park20426532019-08-19 15:24:49 +09001464
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001465 arg_files: [
1466 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001467 ],
1468 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001469 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001470 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001471 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001472 " --show-unannotated " +
1473 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001474 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001475}
1476
Nan Zhang894c9ec2018-09-10 18:58:39 -07001477droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001478 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001479 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001480 api_filename: "public_api.txt",
1481 private_api_filename: "private.txt",
1482 removed_api_filename: "removed.txt",
1483 arg_files: [
1484 "core/res/AndroidManifest.xml",
1485 ],
1486 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001487 check_api: {
1488 current: {
1489 api_file: "api/current.txt",
1490 removed_api_file: "api/removed.txt",
1491 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001492 last_released: {
1493 api_file: ":last-released-public-api",
1494 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001495 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001496 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001497 api_lint: {
1498 enabled: true,
1499 new_since: ":last-released-public-api",
1500 baseline_file: "api/lint-baseline.txt",
1501 },
Nan Zhange5612602018-08-16 16:16:00 -07001502 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001503 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001504}
1505
Nan Zhang894c9ec2018-09-10 18:58:39 -07001506droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001507 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001508 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001509 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001510 api_filename: "system-api.txt",
1511 private_api_filename: "system-private.txt",
1512 private_dex_api_filename: "system-private-dex.txt",
1513 removed_api_filename: "system-removed.txt",
1514 arg_files: [
1515 "core/res/AndroidManifest.xml",
1516 ],
1517 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001518 check_api: {
1519 current: {
1520 api_file: "api/system-current.txt",
1521 removed_api_file: "api/system-removed.txt",
1522 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001523 last_released: {
1524 api_file: ":last-released-system-api",
1525 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001526 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001527 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001528 api_lint: {
1529 enabled: true,
1530 new_since: ":last-released-system-api",
1531 baseline_file: "api/system-lint-baseline.txt",
1532 },
Nan Zhange5612602018-08-16 16:16:00 -07001533 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001534 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001535}
1536
Nan Zhang894c9ec2018-09-10 18:58:39 -07001537droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001538 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001539 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001540 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001541 api_filename: "test-api.txt",
1542 removed_api_filename: "test-removed.txt",
1543 arg_files: [
1544 "core/res/AndroidManifest.xml",
1545 ],
1546 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001547 check_api: {
1548 current: {
1549 api_file: "api/test-current.txt",
1550 removed_api_file: "api/test-removed.txt",
1551 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001552 api_lint: {
1553 enabled: true,
1554 baseline_file: "api/test-lint-baseline.txt",
1555 },
Nan Zhange5612602018-08-16 16:16:00 -07001556 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001557}
Nan Zhangaf251302018-08-30 10:59:51 -07001558
1559filegroup {
1560 name: "framework-annotation-nonnull-srcs",
1561 srcs: [
1562 "core/java/android/annotation/NonNull.java",
1563 ],
1564}
Insun Kang06b25ae2018-11-20 10:05:44 +09001565
1566filegroup {
1567 name: "framework-media-annotation-srcs",
1568 srcs: [
1569 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001570 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001571 "core/java/android/annotation/DrawableRes.java",
1572 "core/java/android/annotation/IntDef.java",
1573 "core/java/android/annotation/LongDef.java",
1574 "core/java/android/annotation/NonNull.java",
1575 "core/java/android/annotation/Nullable.java",
1576 "core/java/android/annotation/RequiresPermission.java",
1577 "core/java/android/annotation/SdkConstant.java",
1578 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001579 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001580 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001581 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001582 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001583 ],
1584}
1585
Andrei Onea7a2985c2019-02-18 15:28:35 +00001586// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1587// annotations to private apis
1588aidl_mapping {
1589 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001590 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001591 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001592}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001593
1594genrule {
1595 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001596 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001597 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1598 out: ["unsupportedappusage_index.csv"],
1599 dist: {
1600 targets: ["droidcore"],
1601 },
1602}
Chen Xu192bf1f2019-09-05 22:07:42 -07001603
1604// Avoid including Parcelable classes as we don't want to have two copies of
1605// Parcelable cross the process.
1606filegroup {
1607 name: "framework-telephony-stack-shared-srcs",
1608 srcs: [
1609 "core/java/android/os/RegistrantList.java",
1610 "core/java/android/os/Registrant.java",
1611 "core/java/android/util/LocalLog.java",
1612 "core/java/android/util/Slog.java",
1613 "core/java/android/util/TimeUtils.java",
1614 "core/java/com/android/internal/os/SomeArgs.java",
Michelebadc0212019-10-31 11:48:43 -07001615 "core/java/com/android/internal/util/ArrayUtils.java",
1616 "core/java/com/android/internal/util/DumpUtils.java",
1617 "core/java/com/android/internal/util/FastXmlSerializer.java",
1618 "core/java/com/android/internal/util/HexDump.java",
1619 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001620 "core/java/com/android/internal/util/Preconditions.java",
1621 "core/java/com/android/internal/util/State.java",
1622 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001623 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001624 "core/java/com/android/internal/util/XmlUtils.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001625 ],
1626}
1627
Chen Xu4fea79c2019-10-08 18:39:03 -07001628// Avoid including Parcelable classes as we don't want to have two copies of
1629// Parcelable cross the process.
1630filegroup {
1631 name: "framework-cellbroadcast-shared-srcs",
1632 srcs: [
1633 "core/java/android/util/LocalLog.java",
1634 "core/java/android/util/Slog.java",
1635 "core/java/com/android/internal/util/State.java",
1636 "core/java/com/android/internal/util/StateMachine.java",
1637 ],
atrostce84de02019-10-08 16:16:47 +01001638}
Roshan Pius09de13e2019-10-16 13:16:04 -07001639
1640filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001641 name: "framework-ims-common-shared-srcs",
1642 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001643 "core/java/android/os/RegistrantList.java",
1644 "core/java/android/os/Registrant.java",
1645 "core/java/com/android/internal/os/SomeArgs.java",
1646 "core/java/com/android/internal/util/Preconditions.java",
1647 ],
1648}
1649
1650filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001651 name: "framework-wifistack-shared-srcs",
1652 srcs: [
1653 ":framework-annotations",
Roshan Piusb0d9a242019-11-04 07:29:53 -08001654 "core/java/android/os/HandlerExecutor.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001655 "core/java/android/util/KeyValueListParser.java",
1656 "core/java/android/util/LocalLog.java",
1657 "core/java/android/util/Rational.java",
1658 "core/java/android/util/proto/ProtoStream.java",
1659 "core/java/android/util/proto/ProtoOutputStream.java",
1660 "core/java/com/android/internal/util/FastXmlSerializer.java",
1661 "core/java/com/android/internal/util/HexDump.java",
1662 "core/java/com/android/internal/util/IState.java",
1663 "core/java/com/android/internal/util/MessageUtils.java",
1664 "core/java/com/android/internal/util/Preconditions.java",
1665 "core/java/com/android/internal/util/State.java",
1666 "core/java/com/android/internal/util/StateMachine.java",
1667 "core/java/com/android/internal/util/WakeupMessage.java",
1668 "core/java/com/android/internal/util/XmlUtils.java",
1669 ],
1670}