blob: a7ce9172bc9512633ff8cd77c0ca42d2cd7cd4d3 [file] [log] [blame]
Dan Albert2a8d9c22016-09-23 15:55:49 -07001// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Colin Crosscf3a0b52017-11-16 00:15:28 -080015// Build the master framework library.
16
17// READ ME: ########################################################
18//
19// When updating this list of aidl files, consider if that aidl is
20// part of the SDK API. If it is, also add it to the list in Android.mk
21// that is preprocessed and distributed with the SDK. This list should
22// not contain any aidl files for parcelables, but the one below should
23// if you intend for 3rd parties to be able to send those objects
24// across process boundaries.
25//
26// READ ME: ########################################################
27
Artur Satayev3cc3fa42019-08-02 16:42:07 +010028filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +090029 name: "framework-core-sources",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010030 srcs: [
Artur Satayev3cc3fa42019-08-02 16:42:07 +010031 "core/java/**/*.java",
Jiyong Parkb3609312019-08-16 21:17:14 +090032 "core/java/**/*.aidl",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010033 ],
Jiyong Parkb3609312019-08-16 21:17:14 +090034 path: "core/java",
Artur Satayev3cc3fa42019-08-02 16:42:07 +010035}
36
Jiyong Park00ea0b12019-10-31 20:38:47 +090037// These are subset of framework-core-sources that are needed by the
38// android.test.mock library. Ideally, the library should use public APIs only,
39// but unfortunately its API signature has some references to these private APIs.
40filegroup {
41 name: "framework-core-sources-for-test-mock",
42 srcs: [
43 "core/java/android/app/IApplicationThread.aidl",
44 "core/java/android/app/IServiceConnection.aidl",
45 "core/java/android/content/IContentProvider.java",
46 "core/java/android/content/pm/IPackageDataObserver.aidl",
47 "core/java/android/content/pm/InstantAppInfo.java",
48 "core/java/android/content/pm/KeySet.java",
49 "core/java/android/content/pm/PackageManager.java",
50 "core/java/android/content/pm/VerifierDeviceIdentity.java",
51 "core/java/android/content/res/Resources.java",
52 "core/java/android/os/storage/VolumeInfo.java",
53 "core/java/android/view/DisplayAdjustments.java",
54 ],
55 path: "core/java",
56}
57
Jiyong Parkb3609312019-08-16 21:17:14 +090058filegroup {
59 name: "framework-drm-sources",
60 srcs: [
61 "drm/java/**/*.java",
62 ],
63 path: "drm/java",
64}
Jiyong Park1cc95662019-08-07 22:45:07 +090065
Jiyong Parkb3609312019-08-16 21:17:14 +090066filegroup {
67 name: "framework-graphics-sources",
68 srcs: [
69 "graphics/java/**/*.java",
70 "graphics/java/**/*.aidl",
71 ],
72 path: "graphics/java",
73}
74
75filegroup {
76 name: "framework-keystore-sources",
77 srcs: [
78 "keystore/java/**/*.java",
79 "keystore/java/**/*.aidl",
80 ],
81 path: "keystore/java",
82}
83
84filegroup {
85 name: "framework-location-sources",
86 srcs: [
87 "location/java/**/*.java",
88 "location/java/**/*.aidl",
89 ],
90 path: "location/java",
91}
92
93filegroup {
94 name: "framework-lowpan-sources",
95 srcs: [
96 "lowpan/java/**/*.java",
97 "lowpan/java/**/*.aidl",
98 ],
99 path: "lowpan/java",
100}
101
102filegroup {
103 name: "framework-media-sources",
104 srcs: [
105 "media/java/**/*.java",
106 "media/java/**/*.aidl",
107 ],
108 path: "media/java",
109}
110
111filegroup {
112 name: "framework-mca-effect-sources",
113 srcs: [
114 "media/mca/effect/java/**/*.java",
115 ],
116 path: "media/mca/effect/java",
117}
118
119filegroup {
120 name: "framework-mca-filterfw-sources",
121 srcs: [
122 "media/mca/filterfw/java/**/*.java",
123 ],
124 path: "media/mca/filterfw/java",
125}
126
127filegroup {
128 name: "framework-mca-filterpacks-sources",
129 srcs: [
130 "media/mca/filterpacks/java/**/*.java",
131 ],
132 path: "media/mca/filterpacks/java",
133}
134
135filegroup {
Tobias Thierer878c77b2019-08-18 15:19:45 +0100136 name: "framework-mime-sources",
137 srcs: [
138 "mime/java/**/*.java",
139 ],
140 path: "mime/java",
141}
142
143filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900144 name: "framework-opengl-sources",
145 srcs: [
146 "opengl/java/**/*.java",
147 ],
148 path: "opengl/java",
149}
150
151filegroup {
152 name: "framework-rs-sources",
153 srcs: [
154 "rs/java/**/*.java",
155 ],
156 path: "rs/java",
157}
158
159filegroup {
160 name: "framework-sax-sources",
161 srcs: [
162 "sax/java/**/*.java",
163 ],
164 path: "sax/java",
165}
166
167filegroup {
168 name: "framework-telecomm-sources",
169 srcs: [
170 "telecomm/java/**/*.java",
171 "telecomm/java/**/*.aidl",
172 ],
173 path: "telecomm/java",
174}
175
176filegroup {
177 name: "framework-telephony-sources",
178 srcs: [
179 "telephony/java/**/*.java",
180 "telephony/java/**/*.aidl",
181 ],
182 path: "telephony/java",
183}
184
185filegroup {
Amit Mahajand3551532019-09-23 17:59:57 -0700186 name: "framework-telephony-common-sources",
187 srcs: [
188 "telephony/common/**/*.java",
189 ],
190 path: "telephony/common",
191}
192
193filegroup {
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700194 name: "framework-mms-sources",
195 srcs: [
196 "mms/java/**/*.java",
197 "mms/java/**/*.aidl",
198 ],
199 path: "mms/java",
200}
201
202filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900203 name: "framework-wifi-sources",
204 srcs: [
205 "wifi/java/**/*.java",
206 "wifi/java/**/*.aidl",
207 ],
208 path: "wifi/java",
209}
210
Jiyong Park20426532019-08-19 15:24:49 +0900211filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900212 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900213 srcs: [
214 // Java/AIDL sources under frameworks/base
Terry Wangecc0d1b2019-10-17 17:05:18 -0700215 ":framework-appsearch-sources",
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700216 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900217 ":framework-core-sources",
218 ":framework-drm-sources",
219 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900220 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900221 ":framework-keystore-sources",
222 ":framework-location-sources",
223 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-mca-effect-sources",
225 ":framework-mca-filterfw-sources",
226 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900227 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700228 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900229 ":framework-opengl-sources",
230 ":framework-rs-sources",
231 ":framework-sax-sources",
232 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700233 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900234 ":framework-telephony-sources",
235 ":framework-wifi-sources",
236 ":PacProcessor-aidl-sources",
237 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900238
atrost87488352019-10-10 19:27:31 +0100239 // AIDL from frameworks/base/native/
240 ":platform-compat-native-aidl",
241
Jiyong Park20426532019-08-19 15:24:49 +0900242 // AIDL sources from external directories
243 ":dumpstate_aidl",
244 ":framework_native_aidl",
245 ":gatekeeper_aidl",
246 ":gsiservice_aidl",
247 ":incidentcompanion_aidl",
248 ":installd_aidl",
249 ":keystore_aidl",
250 ":libaudioclient_aidl",
251 ":libbinder_aidl",
252 ":libbluetooth-binder-aidl",
253 ":libcamera_client_aidl",
254 ":libcamera_client_framework_aidl",
255 ":libupdate_engine_aidl",
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 {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000269 name: "framework-updatable-sources",
270 srcs: [
271 ":framework-sdkext-sources",
272 ":updatable-media-srcs",
273 ]
274}
275
276filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900277 name: "framework-all-sources",
278 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000279 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900280 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000281 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900282 ],
283}
284
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100285java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700286 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700287 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900288 export_include_dirs: [
289 "core/java",
290 "drm/java",
291 "graphics/java",
292 "keystore/java",
293 "location/java",
294 "lowpan/java",
295 "media/java",
296 "media/apex/java",
297 "media/mca/effect/java",
298 "media/mca/filterfw/java",
299 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700300 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900301 "opengl/java",
302 "rs/java",
303 "sax/java",
304 "telecomm/java",
305 "telephony/java",
306 "wifi/java",
307 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700308 },
Adam Pardyl50207032019-09-09 14:37:27 +0200309
310 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200311 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200312 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200313 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200314 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700315}
316
Jiyong Park20426532019-08-19 15:24:49 +0900317// Collection of classes that are generated from non-Java files that are not listed in
318// framework_srcs. These have no or very limited dependency to the framework.
319java_library {
320 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800321 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100322 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700323 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800324 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800325 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800326 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000327 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800328 "android.hardware.cas-V1.0-java",
329 "android.hardware.contexthub-V1.0-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800330 "android.hardware.gnss-V1.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800331 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800332 "android.hardware.radio-V1.0-java",
333 "android.hardware.radio-V1.1-java",
334 "android.hardware.radio-V1.2-java",
335 "android.hardware.radio-V1.3-java",
336 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800337 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800338 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800339 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700340 "android.hardware.thermal-V1.1-java",
341 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800342 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700343 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800344 "android.hardware.usb-V1.0-java-constants",
345 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800346 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800347 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000348 "android.hardware.vibrator-V1.0-java",
349 "android.hardware.vibrator-V1.1-java",
350 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900351 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800352 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000353 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900354
355 "com.android.sysprop.apex",
356 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800357 ],
Jiyong Park20426532019-08-19 15:24:49 +0900358 sdk_version: "core_platform",
359 installable: false,
360}
361
362java_defaults {
363 name: "framework-defaults",
364 defaults: ["framework-aidl-export-defaults"],
365 installable: true,
366
Jiyong Park20426532019-08-19 15:24:49 +0900367 aidl: {
368 generate_get_transaction_name: true,
369 },
370
Jiyong Parkae9972b2019-09-15 20:19:02 +0900371 srcs: ["core/java/**/*.logtags"],
372
Jiyong Park20426532019-08-19 15:24:49 +0900373 exclude_srcs: [
374 // See comment on framework-atb-backward-compatibility module below
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000375 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900376 ],
377
378 sdk_version: "core_platform",
379 libs: [
380 "ext",
381 "updatable_media_stubs",
382 ],
383
384 jarjar_rules: ":framework-jarjar-rules",
385
Tobias Thierer878c77b2019-08-18 15:19:45 +0100386 static_libs: [
387 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100388 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800389
Colin Crosscf3a0b52017-11-16 00:15:28 -0800390 dxflags: [
391 "--core-library",
392 "--multi-dex",
393 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100394
Eugene Susla3b2fe612019-08-06 18:47:14 -0700395 plugins: [
396 "view-inspector-annotation-processor",
397 "staledataclass-annotation-processor",
398 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100399}
400
Colin Crossbc2dc312018-10-26 22:34:06 -0700401filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800402 name: "framework-jarjar-rules",
Santiago Seifert7094b762019-11-20 20:51:43 +0000403 srcs: ["jarjar_rules_hidl.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800404}
405
406filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700407 name: "libincident_aidl",
408 srcs: [
409 "core/java/android/os/IIncidentManager.aidl",
410 "core/java/android/os/IIncidentReportStatusListener.aidl",
411 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700412 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700413}
414
415filegroup {
416 name: "statsd_aidl",
417 srcs: [
Tej Singh59184292019-10-11 11:07:06 -0700418 "core/java/android/os/IPullAtomCallback.aidl",
419 "core/java/android/os/IPullAtomResultReceiver.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700420 "core/java/android/os/IStatsCompanionService.aidl",
421 "core/java/android/os/IStatsManager.aidl",
Tej Singha0c89dd2019-01-25 16:39:18 -0800422 "core/java/android/os/IStatsPullerCallback.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700423 ],
Dan Willemsena38ff9f2019-06-11 10:56:01 -0700424 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700425}
426
Michael Wrightc390fbe2018-12-12 19:45:09 +0000427filegroup {
428 name: "libvibrator_aidl",
429 srcs: [
430 "core/java/android/os/IExternalVibrationController.aidl",
431 "core/java/android/os/IExternalVibratorService.aidl",
432 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700433 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000434}
435
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100436java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700437 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100438 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900439 srcs: [":framework-non-updatable-sources"],
atrost1a945502019-11-04 17:03:54 +0000440 libs: ["app-compat-annotations"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700441 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900442 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100443 required: [
444 "framework-platform-compat-config",
445 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100446 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100447 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100448 "services-devicepolicy-platform-compat-config",
atrostc3c2e4d2019-11-29 11:27:27 +0000449 "services-core-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100450 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000451 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000452 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
453 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000454 "mimemap",
455 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900456 // For backwards compatibility.
457 stem: "framework",
458}
459
460// This "framework" module is NOT installed to the device. It's
461// "framework-minus-apex" that gets installed to the device. Note that
462// the filename is still framework.jar (via the stem property) for
463// compatibility reason. The purpose of this module is to provide
464// framework APIs (both public and private) for bundled apps.
465// "framework-minus-apex" can't be used for the purpose because 1)
466// many apps have already hardcoded the name "framework" and
467// 2) it lacks API symbols from updatable modules - as it's clear from
468// its suffix "-minus-apex".
469java_library {
470 name: "framework",
471 defaults: ["framework-aidl-export-defaults"],
472 installable: false, // this lib is a build-only library
473 static_libs: [
474 "framework-minus-apex",
475 // TODO(jiyong): add stubs for APEXes here
476 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700477 sdk_version: "core_platform",
478}
479
480java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900481 name: "framework-all",
482 defaults: ["framework-defaults"],
483 srcs: [":framework-all-sources"],
484 installable: false,
atrost1a945502019-11-04 17:03:54 +0000485 libs: ["app-compat-annotations"],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000486 static_libs: ["exoplayer2-core"]
Jiyong Park97183492019-11-14 03:07:36 +0000487}
488
489java_library {
490 name: "framework-annotation-proc",
491 defaults: ["framework-aidl-export-defaults"],
492 srcs: [":framework-all-sources"],
493 libs: ["app-compat-annotations"],
494 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100495 plugins: [
496 "unsupportedappusage-annotation-processor",
497 "compat-changeid-annotation-processor",
498 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000499 static_libs: [
500 "exoplayer2-core"
501 ]
atrostb9c34502019-08-05 12:22:18 +0100502}
503
504platform_compat_config {
505 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000506 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100507}
508
Paul Duffin521975802019-06-05 10:35:08 +0100509// A library including just UnsupportedAppUsage.java classes.
510//
511// Provided for target so that libraries can use it without depending on
512// the whole of framework or the core platform API.
513//
514// Built for host so that the annotation processor can also use this annotation.
515java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100516 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100517 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100518 srcs: [
519 "core/java/android/annotation/IntDef.java",
520 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100521 ],
522 static_libs: [
523 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100524 ],
Paul Duffin521975802019-06-05 10:35:08 +0100525
526 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800527}
528
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000529// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000530// android.test.base library has been removed and which provides support for
531// maintaining backwards compatibility for APKs that target pre-P and depend on
532// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
533// specified on the build command line.
534java_library {
535 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000536 installable: true,
atrost1a945502019-11-04 17:03:54 +0000537 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000538 srcs: [
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000539 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000540 ],
541}
542
Colin Crosscf3a0b52017-11-16 00:15:28 -0800543genrule {
544 name: "framework-statslog-gen",
545 tools: ["stats-log-api-gen"],
546 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800547 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800548}
549
550gensrcs {
551 name: "framework-javastream-protos",
552 depfile: true,
553
554 tools: [
555 "aprotoc",
556 "protoc-gen-javastream",
557 "soong_zip",
558 ],
559
Anton Hanssond82b2f72019-11-18 13:34:56 +0000560 cmd: "mkdir -p $(genDir)/$(in) " +
561 "&& $(location aprotoc) " +
562 " --plugin=$(location protoc-gen-javastream) " +
563 " --dependency_out=$(depfile) " +
564 " --javastream_out=$(genDir)/$(in) " +
565 " -Iexternal/protobuf/src " +
566 " -I . " +
567 " $(in) " +
568 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
569
Yi Jin437aa6e2018-01-10 11:34:26 -0800570 srcs: [
571 "core/proto/**/*.proto",
572 "libs/incident/**/*.proto",
573 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800574 output_extension: "srcjar",
575}
576
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900577filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900578 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900579 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900580 "core/java/android/annotation/NonNull.java",
581 "core/java/android/annotation/Nullable.java",
582 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900583 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900584 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900585 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900586 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100587 ],
Chalard Jean95213512019-01-30 21:04:58 +0900588}
589
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000590java_library {
591 name: "framework-annotations-lib",
592 srcs: [ ":framework-annotations" ],
593 sdk_version: "current",
594}
595
Chalard Jean95213512019-01-30 21:04:58 +0900596filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900597 name: "framework-networkstack-shared-srcs",
598 srcs: [
599 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900600 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900601 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900602 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900603 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900604 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900605 "core/java/com/android/internal/util/IState.java",
606 "core/java/com/android/internal/util/MessageUtils.java",
607 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900608 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900609 "core/java/com/android/internal/util/State.java",
610 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900611 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900612 "core/java/com/android/internal/util/WakeupMessage.java",
613 "core/java/android/net/shared/*.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100614 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900615}
616
markchiena6ba54d2019-09-03 15:58:06 +0800617filegroup {
618 name: "framework-tethering-shared-srcs",
619 srcs: [
620 "core/java/android/util/LocalLog.java",
621 ],
622}
Colin Crossd8e02252017-10-02 17:14:22 -0700623// Build ext.jar
624// ============================================================
625java_library {
626 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700627 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100628 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700629 static_libs: [
630 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700631 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000632 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100633 "libtextclassifier-java",
634 ],
635 required: [
636 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700637 ],
638 dxflags: ["--core-library"],
639}
640
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700641// ==== java proto host library ==============================
642java_library_host {
643 name: "platformprotos",
644 srcs: [
645 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700646 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700647 "core/proto/**/*.proto",
648 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700649 ],
650 proto: {
651 include_dirs: ["external/protobuf/src"],
652 type: "full",
653 },
654 errorprone: {
Tobias Thiererbc050342019-05-23 16:20:12 +0100655 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700656 },
657}
658
Colin Cross43214162018-08-20 13:57:24 -0700659// ==== java proto device library (for test only) ==============================
660java_library {
661 name: "platformprotosnano",
662 proto: {
663 type: "nano",
664 output_params: ["store_unknown_fields=true"],
665 include_dirs: ["external/protobuf/src"],
666 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000667 exclude_srcs: [
668 "core/proto/android/privacy.proto",
669 "core/proto/android/section.proto",
670 ],
Colin Cross43214162018-08-20 13:57:24 -0700671 sdk_version: "current",
672 srcs: [
673 "core/proto/**/*.proto",
674 "libs/incident/proto/android/os/**/*.proto",
675 ],
676}
677
678// ==== java proto device library (for test only) ==============================
679java_library {
680 name: "platformprotoslite",
681 proto: {
682 type: "lite",
683 include_dirs: ["external/protobuf/src"],
684 },
685
686 srcs: [
687 "core/proto/**/*.proto",
688 "libs/incident/proto/android/os/**/*.proto",
689 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000690 exclude_srcs: [
691 "core/proto/android/privacy.proto",
692 "core/proto/android/section.proto",
693 ],
Colin Cross43214162018-08-20 13:57:24 -0700694 // Protos have lots of MissingOverride and similar.
695 errorprone: {
696 javacflags: ["-XepDisableAllChecks"],
697 },
698}
699
Colin Crossaa0d4352017-05-02 14:14:56 -0700700// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000701cc_defaults {
702 name: "libplatformprotos-defaults",
703
Colin Crossaa0d4352017-05-02 14:14:56 -0700704 proto: {
705 export_proto_headers: true,
706 include_dirs: ["external/protobuf/src"],
707 },
708
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700709 cflags: [
710 "-Wall",
711 "-Werror",
712 "-Wno-unused-parameter",
713 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800714
715 srcs: [
716 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800717 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000718}
719
720cc_library {
721 name: "libplatformprotos",
722 defaults: ["libplatformprotos-defaults"],
723 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800724
Colin Crossaa0d4352017-05-02 14:14:56 -0700725 target: {
726 host: {
727 proto: {
728 type: "full",
729 },
730 },
731 android: {
732 proto: {
733 type: "lite",
734 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000735 shared_libs: [
736 "libprotobuf-cpp-lite",
737 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700738 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700739 enabled: false,
740 },
741 },
742 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700743}
744
Joe Onorato9bd5db72019-04-03 18:19:43 -0700745// This library is meant for vendor code that needs to output protobuf. It links
746// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
747// binary compatibility.
748cc_library {
749 name: "libplatformprotos-static",
750 defaults: ["libplatformprotos-defaults"],
751 host_supported: false,
752
753 // This is okay because this library is only built as a static library. The C++
754 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
755 // but is not authorized to be used outside of debugging.
756 vendor_available: true,
757
758 target: {
759 android: {
760 proto: {
761 type: "lite",
762 },
763 static_libs: [
764 "libprotobuf-cpp-lite",
765 ],
766 shared: {
767 enabled: false,
768 },
769 },
770 },
771}
772
773
Joe Onorato99598ee2019-02-11 15:55:13 +0000774// This is the full proto version of libplatformprotos. It may only
775// be used by test code that is not shipped on the device.
776cc_library {
777 name: "libplatformprotos-test",
778 defaults: ["libplatformprotos-defaults"],
779 host_supported: false,
780
781 target: {
782 android: {
783 proto: {
784 type: "full",
785 },
786 shared: {
787 enabled: false,
788 },
789 },
790 },
791}
792
Songchun Fan0037c3f2019-10-30 15:20:59 -0700793filegroup {
794 name: "incremental_aidl",
795 srcs: [
Songchun Fand1b41d42019-11-12 17:09:53 -0800796 "core/java/android/os/incremental/IIncrementalManager.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700797 "core/java/android/os/incremental/IIncrementalServiceProxy.aidl",
798 "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
799 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
800 "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
801 ],
802 path: "core/java",
803}
804
805filegroup {
806 name: "incremental_data_loader_aidl",
807 srcs: [
808 "core/java/android/service/incremental/IIncrementalDataLoaderStatusListener.aidl",
809 "core/java/android/service/incremental/IIncrementalDataLoaderService.aidl",
810 ],
811 path: "core/java",
812}
813
814aidl_interface {
815 name: "libincremental_aidl",
816 srcs: [
817 ":incremental_aidl",
818 ":incremental_data_loader_aidl",
819 ],
820 backend: {
821 java: {
822 sdk_version: "28",
823 },
824 cpp: {
825 enabled: true,
826 },
827 ndk: {
828 enabled: true,
829 },
830 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700831}
Joe Onorato99598ee2019-02-11 15:55:13 +0000832
Yi Jin04625ad2017-10-17 18:29:33 -0700833gensrcs {
834 name: "gen-platform-proto-constants",
835 depfile: true,
836
837 tools: [
838 "aprotoc",
839 "protoc-gen-cppstream",
840 ],
841
842 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800843 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800844 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800845 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700846 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700847 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700848 "core/proto/android/os/kernelwake.proto",
849 "core/proto/android/os/pagetypeinfo.proto",
850 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800851 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800852 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800853 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700854 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700855 ],
856
857 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800858 cmd: "mkdir -p $(genDir) " +
859 "&& $(location aprotoc) " +
860 " --plugin=$(location protoc-gen-cppstream) " +
861 " --dependency_out=$(depfile) " +
862 " --cppstream_out=$(genDir) " +
863 " -Iexternal/protobuf/src " +
864 " -I . " +
865 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700866
Logan Chien71ddfea2018-02-27 16:43:50 +0800867 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700868}
869
Joe Onorato99598ee2019-02-11 15:55:13 +0000870
Dan Albert2a8d9c22016-09-23 15:55:49 -0700871subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700872 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600873 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800874 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700875 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700876 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500877 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700878 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700879 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700880]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800881
882optional_subdirs = [
883 "core/tests/utiltests/jni",
884]
Steven Morelandeddafe92017-10-02 16:58:41 -0700885
Colin Crossa2b78a72018-03-29 13:31:04 -0700886// TODO(b/77285514): remove this once the last few hidl interfaces have been
887// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700888java_library {
889 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100890 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700891
892 srcs: [
893 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800894 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800895 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700896 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800897 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800898 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800899 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000900 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800901 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700902 "core/java/android/os/HwBinder.java",
903 "core/java/android/os/HwBlob.java",
904 "core/java/android/os/HwParcel.java",
905 "core/java/android/os/IHwBinder.java",
906 "core/java/android/os/IHwInterface.java",
907 "core/java/android/os/DeadObjectException.java",
908 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700909 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700910 "core/java/android/os/RemoteException.java",
911 "core/java/android/util/AndroidException.java",
912 ],
913
914 dxflags: ["--core-library"],
915 installable: false,
916}
Nan Zhang2db709d2017-11-08 20:48:46 -0800917
918python_defaults {
919 name: "base_default",
920 version: {
921 py2: {
922 enabled: true,
923 embedded_launcher: true,
924 },
925 py3: {
926 enabled: false,
927 embedded_launcher: false,
928 },
929 },
930}
931
932python_binary_host {
933 name: "fontchain_linter",
934 defaults: ["base_default"],
935 main: "tools/fonts/fontchain_linter.py",
936 srcs: [
937 "tools/fonts/fontchain_linter.py",
938 ],
939 libs: [
940 "fontTools",
941 ],
942}
Nan Zhang172875b2018-02-27 11:24:03 -0800943
Paul Duffin0440e1f2019-02-11 16:13:25 +0000944// Make the api/current.txt file available for use by modules in other
945// directories.
946filegroup {
947 name: "frameworks-base-api-current.txt",
948 srcs: [
949 "api/current.txt",
950 ],
951}
952
Paul Duffincd35de32019-05-30 15:12:47 +0100953// Make the api/system-current.txt file available for use by modules in other
954// directories.
955filegroup {
956 name: "frameworks-base-api-system-current.txt",
957 srcs: [
958 "api/system-current.txt",
959 ],
960}
961
962// Make the api/system-removed.txt file available for use by modules in other
963// directories.
964filegroup {
965 name: "frameworks-base-api-system-removed.txt",
966 srcs: [
967 "api/system-removed.txt",
968 ],
969}
970
Nan Zhang7764a4b2018-08-22 11:27:31 -0700971framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc050342019-05-23 16:20:12 +0100972 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
973 "-overview $(location core/java/overview.html) " +
974 // Federate Support Library references against local API file.
975 "-federate SupportLib https://developer.android.com " +
Charles Munger1b1c0ca2019-11-19 14:01:19 -0800976 "-federationapi SupportLib $(location :current-support-api) " +
977 // Federate Support Library references against local API file.
978 "-federate AndroidX https://developer.android.com " +
979 "-federationapi AndroidX $(location :current-androidx-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800980
Nan Zhang7764a4b2018-08-22 11:27:31 -0700981framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700982 "voip-common",
983 "android.test.mock",
984 "android-support-annotations",
985 "android-support-compat",
986 "android-support-core-ui",
987 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700988 "android-support-design",
989 "android-support-dynamic-animation",
990 "android-support-exifinterface",
991 "android-support-fragment",
992 "android-support-media-compat",
993 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700994 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700995 "android-support-v7-cardview",
996 "android-support-v7-gridlayout",
997 "android-support-v7-mediarouter",
998 "android-support-v7-palette",
999 "android-support-v7-preference",
1000 "android-support-v13",
1001 "android-support-v14-preference",
1002 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001003 "android-support-vectordrawable",
1004 "android-support-animatedvectordrawable",
1005 "android-support-v7-appcompat",
1006 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001007 "android-support-v8-renderscript",
1008 "android-support-multidex",
1009 "android-support-multidex-instrumentation",
1010]
1011
1012metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +01001013 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +00001014 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001015 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001016 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +01001017 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001018 "--hide MissingPermission --hide BroadcastBehavior " +
1019 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -04001020 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1021 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001022
Jiyong Parkae9972b2019-09-15 20:19:02 +09001023packages_to_document = [
1024 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001025 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001026 "java",
1027 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001028 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001029 "org.apache.http",
1030 "org.json",
1031 "org.w3c.dom",
1032 "org.xml.sax",
1033 "org.xmlpull",
1034]
1035
Nan Zhang7764a4b2018-08-22 11:27:31 -07001036stubs_defaults {
1037 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001038 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +00001039 ":framework-mime-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001040 ":framework-non-updatable-sources",
1041 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001042 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001043 "test-base/src/**/*.java",
1044 ":opt-telephony-srcs",
1045 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001046 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001047 ":core_public_api_files",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001048 "test-mock/src/**/*.java",
1049 "test-runner/src/**/*.java",
1050 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001051 libs: framework_docs_only_libs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001052 create_doc_stubs: true,
1053 annotations_enabled: true,
1054 api_levels_annotations_enabled: true,
1055 api_levels_annotations_dirs: [
1056 "sdk-dir",
1057 "api-versions-jars-dir",
1058 ],
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001059 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001060 merge_annotations_dirs: [
1061 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001062 ],
1063}
1064
1065doc_defaults {
1066 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001067 libs: framework_docs_only_libs +
Tobias Thiererbc050342019-05-23 16:20:12 +01001068 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001069 html_dirs: [
1070 "docs/html",
1071 ],
1072 knowntags: [
1073 "docs/knowntags.txt",
1074 ":known-oj-tags",
1075 ],
1076 custom_template: "droiddoc-templates-sdk",
1077 resourcesdir: "docs/html/reference/images/",
1078 resourcesoutdir: "reference/android/images/",
1079 hdf: [
1080 "dac true",
1081 "sdk.codename O",
1082 "sdk.preview.version 1",
1083 "sdk.version 7.0",
1084 "sdk.rel.id 1",
1085 "sdk.preview 0",
1086 ],
1087 arg_files: [
1088 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001089 "core/java/overview.html",
1090 ":current-support-api",
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001091 ":current-androidx-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001092 ],
1093 create_stubs: false,
1094}
1095
Tiem Song730c19b2019-08-26 11:27:27 -07001096doc_defaults {
1097 name: "framework-dokka-docs-default",
1098 create_stubs: false,
1099}
1100
Nan Zhang894c9ec2018-09-10 18:58:39 -07001101stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001102 name: "metalava-api-stubs-default",
1103 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001104 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001105 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001106 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001107 ":opt-telephony-srcs",
1108 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001109 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001110 ":core_public_api_files",
evitayan69d77da2019-10-30 19:58:48 -07001111 ":ike-api-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001112 ],
Jiyong Park20426532019-08-19 15:24:49 +09001113 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001114 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001115 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001116 previous_api: ":last-released-public-api",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001117 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001118 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001119 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001120 api_levels_annotations_enabled: true,
1121 api_levels_annotations_dirs: [
1122 "sdk-dir",
1123 "api-versions-jars-dir",
1124 ],
Jiyong Park20426532019-08-19 15:24:49 +09001125 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001126 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001127}
1128
Nan Zhang7764a4b2018-08-22 11:27:31 -07001129droidstubs {
1130 name: "framework-doc-stubs",
1131 defaults: ["framework-doc-stubs-default"],
1132 arg_files: [
1133 "core/res/AndroidManifest.xml",
1134 ],
1135 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001136 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001137}
1138
1139droidstubs {
1140 name: "framework-doc-system-stubs",
1141 defaults: ["framework-doc-stubs-default"],
1142 arg_files: [
1143 "core/res/AndroidManifest.xml",
1144 ],
1145 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001146 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001147}
1148
Nan Zhang3e15ba82018-07-26 18:41:12 +00001149droiddoc {
1150 name: "doc-comment-check-docs",
1151 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001152 srcs: [
1153 ":framework-doc-stubs",
1154 ],
1155 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001156 installable: false,
1157}
1158
1159droiddoc {
1160 name: "offline-sdk-docs",
1161 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001162 srcs: [
1163 ":framework-doc-stubs",
1164 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001165 hdf: [
1166 "android.whichdoc offline",
1167 ],
1168 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001169 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001170 static_doc_index_redirect: "docs/docs-preview-index.html",
1171}
1172
1173droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001174 // Please sync with android-api-council@ before making any changes for the name property below.
1175 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1176 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001177 name: "offline-sdk-referenceonly-docs",
1178 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001179 srcs: [
1180 ":framework-doc-stubs",
1181 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001182 hdf: [
1183 "android.whichdoc offline",
1184 ],
1185 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001186 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001187 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1188 static_doc_properties: "docs/source.properties",
1189}
1190
1191droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001192 // Please sync with android-api-council@ before making any changes for the name property below.
1193 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1194 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001195 name: "offline-system-sdk-referenceonly-docs",
1196 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001197 srcs: [
1198 ":framework-doc-system-stubs",
1199 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001200 hdf: [
1201 "android.whichdoc offline",
1202 ],
1203 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001204 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1205 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001206 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1207 static_doc_properties: "docs/source.properties",
1208}
1209
1210droiddoc {
1211 name: "online-sdk-docs",
1212 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001213 srcs: [
1214 ":framework-doc-stubs",
1215 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001216 hdf: [
1217 "android.whichdoc online",
1218 "android.hasSamples true",
1219 ],
1220 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001221 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001222 " -toroot / -samplegroup Admin " +
1223 " -samplegroup Background " +
1224 " -samplegroup Connectivity " +
1225 " -samplegroup Content " +
1226 " -samplegroup Input " +
1227 " -samplegroup Media " +
1228 " -samplegroup Notification " +
1229 " -samplegroup RenderScript " +
1230 " -samplegroup Security " +
1231 " -samplegroup Sensors " +
1232 " -samplegroup System " +
1233 " -samplegroup Testing " +
1234 " -samplegroup UI " +
1235 " -samplegroup Views " +
1236 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1237}
1238
1239droiddoc {
1240 name: "online-system-api-sdk-docs",
1241 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001242 srcs: [
1243 ":framework-doc-system-stubs",
1244 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001245 hdf: [
1246 "android.whichdoc online",
1247 "android.hasSamples true",
1248 ],
1249 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001250 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001251 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001252 " -title \"Android SDK - Including system APIs.\" " +
1253 " -hide 101 " +
1254 " -hide 104 " +
1255 " -hide 108 " +
1256 " -toroot / -samplegroup Admin " +
1257 " -samplegroup Background " +
1258 " -samplegroup Connectivity " +
1259 " -samplegroup Content " +
1260 " -samplegroup Input " +
1261 " -samplegroup Media " +
1262 " -samplegroup Notification " +
1263 " -samplegroup RenderScript " +
1264 " -samplegroup Security " +
1265 " -samplegroup Sensors " +
1266 " -samplegroup System " +
1267 " -samplegroup Testing " +
1268 " -samplegroup UI " +
1269 " -samplegroup Views " +
1270 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1271 installable: false,
1272}
1273
1274droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001275 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001276 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001277 srcs: [
1278 ":framework-doc-stubs",
1279 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001280 hdf: [
1281 "android.whichdoc online",
1282 "android.hasSamples true",
1283 ],
1284 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001285 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001286 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001287 " -samplegroup Background " +
1288 " -samplegroup Connectivity " +
1289 " -samplegroup Content " +
1290 " -samplegroup Input " +
1291 " -samplegroup Media " +
1292 " -samplegroup Notification " +
1293 " -samplegroup RenderScript " +
1294 " -samplegroup Security " +
1295 " -samplegroup Sensors " +
1296 " -samplegroup System " +
1297 " -samplegroup Testing " +
1298 " -samplegroup UI " +
1299 " -samplegroup Views " +
1300 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1301}
1302
1303droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001304 name: "ds-docs-kt",
1305 defaults: ["framework-dokka-docs-default"],
1306 srcs: [
1307 ":framework-doc-stubs",
1308 ],
1309 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1310 "-noStdlibLink",
1311 proofread_file: "ds-dokka-proofread.txt",
1312 dokka_enabled: true,
1313}
1314
1315java_genrule {
1316 name: "ds-docs",
1317 tools: [
1318 "zip2zip",
1319 "merge_zips",
1320 ],
1321 srcs: [
1322 ":ds-docs-java{.docs.zip}",
1323 ":ds-docs-kt{.docs.zip}",
1324 ],
1325 out: ["ds-docs.zip"],
1326 dist: {
1327 targets: ["docs"],
1328 },
1329 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1330 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1331}
1332
1333java_genrule {
1334 name: "ds-docs-switched",
1335 tools: [
1336 "switcher4",
1337 "soong_zip",
1338 ],
1339 srcs: [
1340 ":ds-docs-java{.docs.zip}",
1341 ":ds-docs-kt{.docs.zip}",
1342 ],
1343 out: ["ds-docs-switched.zip"],
1344 dist: {
1345 targets: ["docs"],
1346 },
1347 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1348 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1349 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1350 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1351 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1352}
1353
1354
1355droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001356 name: "ds-static-docs",
1357 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001358 srcs: [
1359 ":framework-doc-stubs",
1360 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001361 hdf: [
1362 "android.whichdoc online",
1363 ],
1364 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001365 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001366 " -staticonly " +
1367 " -toroot / " +
1368 " -devsite " +
1369 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001370}
1371
1372droiddoc {
1373 name: "ds-ref-navtree-docs",
1374 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001375 srcs: [
1376 ":framework-doc-stubs",
1377 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001378 hdf: [
1379 "android.whichdoc online",
1380 ],
1381 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001382 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001383 " -toroot / " +
1384 " -atLinksNavtree " +
1385 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001386}
1387
1388droiddoc {
1389 name: "online-sdk-dev-docs",
1390 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001391 srcs: [
1392 ":framework-doc-stubs",
1393 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001394 hdf: [
1395 "android.whichdoc online",
1396 "android.hasSamples true",
1397 ],
1398 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001399 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001400 " -toroot / -samplegroup Admin " +
1401 " -samplegroup Background " +
1402 " -samplegroup Connectivity " +
1403 " -samplegroup Content " +
1404 " -samplegroup Input " +
1405 " -samplegroup Media " +
1406 " -samplegroup Notification " +
1407 " -samplegroup RenderScript " +
1408 " -samplegroup Security " +
1409 " -samplegroup Sensors " +
1410 " -samplegroup System " +
1411 " -samplegroup Testing " +
1412 " -samplegroup UI " +
1413 " -samplegroup Views " +
1414 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1415}
1416
1417droiddoc {
1418 name: "hidden-docs",
1419 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001420 srcs: [
1421 ":framework-doc-stubs",
1422 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001423 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001424 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001425 " -referenceonly " +
1426 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001427}
1428
Nan Zhang7764a4b2018-08-22 11:27:31 -07001429droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001430 name: "hwbinder-stubs-docs",
1431 srcs: [
1432 "core/java/android/os/HidlSupport.java",
1433 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001434 "core/java/android/annotation/IntRange.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001435 "core/java/android/annotation/NonNull.java",
1436 "core/java/android/annotation/SystemApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001437 "core/java/android/os/HidlMemory.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001438 "core/java/android/os/HwBinder.java",
1439 "core/java/android/os/HwBlob.java",
1440 "core/java/android/os/HwParcel.java",
1441 "core/java/android/os/IHwBinder.java",
1442 "core/java/android/os/IHwInterface.java",
1443 "core/java/android/os/DeadObjectException.java",
1444 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001445 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001446 "core/java/android/os/RemoteException.java",
1447 "core/java/android/util/AndroidException.java",
1448 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001449 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001450 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001451 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001452 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001453 merge_annotations_dirs: [
1454 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001455 ],
1456 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001457}
1458
1459java_library_static {
1460 name: "hwbinder.stubs",
1461 sdk_version: "core_current",
1462 srcs: [
1463 ":hwbinder-stubs-docs",
1464 ],
1465}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001466
Nan Zhang894c9ec2018-09-10 18:58:39 -07001467droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001468 name: "hiddenapi-lists-docs",
1469 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001470 arg_files: [
1471 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001472 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001473 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001474 private_dex_api_filename: "private-dex.txt",
1475 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001476 args: metalava_framework_docs_args +
1477 " --show-unannotated " +
1478 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001479 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001480}
1481
Nan Zhang7764a4b2018-08-22 11:27:31 -07001482droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001483 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001484 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001485 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001486 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001487 ],
Jiyong Park20426532019-08-19 15:24:49 +09001488
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001489 arg_files: [
1490 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001491 ],
1492 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001493 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001494 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001495 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001496 " --show-unannotated " +
1497 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001498 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001499}
1500
Nan Zhang894c9ec2018-09-10 18:58:39 -07001501droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001502 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001503 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001504 api_filename: "public_api.txt",
1505 private_api_filename: "private.txt",
1506 removed_api_filename: "removed.txt",
1507 arg_files: [
1508 "core/res/AndroidManifest.xml",
1509 ],
1510 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001511 check_api: {
1512 current: {
1513 api_file: "api/current.txt",
1514 removed_api_file: "api/removed.txt",
1515 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001516 last_released: {
1517 api_file: ":last-released-public-api",
1518 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001519 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001520 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001521 api_lint: {
1522 enabled: true,
1523 new_since: ":last-released-public-api",
1524 baseline_file: "api/lint-baseline.txt",
1525 },
Nan Zhange5612602018-08-16 16:16:00 -07001526 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001527 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001528}
1529
Nan Zhang894c9ec2018-09-10 18:58:39 -07001530droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001531 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001532 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001533 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001534 api_filename: "system-api.txt",
1535 private_api_filename: "system-private.txt",
1536 private_dex_api_filename: "system-private-dex.txt",
1537 removed_api_filename: "system-removed.txt",
1538 arg_files: [
1539 "core/res/AndroidManifest.xml",
1540 ],
1541 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001542 check_api: {
1543 current: {
1544 api_file: "api/system-current.txt",
1545 removed_api_file: "api/system-removed.txt",
1546 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001547 last_released: {
1548 api_file: ":last-released-system-api",
1549 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001550 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001551 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001552 api_lint: {
1553 enabled: true,
1554 new_since: ":last-released-system-api",
1555 baseline_file: "api/system-lint-baseline.txt",
1556 },
Nan Zhange5612602018-08-16 16:16:00 -07001557 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001558 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001559}
1560
Nan Zhang894c9ec2018-09-10 18:58:39 -07001561droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001562 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001563 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001564 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001565 api_filename: "test-api.txt",
1566 removed_api_filename: "test-removed.txt",
1567 arg_files: [
1568 "core/res/AndroidManifest.xml",
1569 ],
1570 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001571 check_api: {
1572 current: {
1573 api_file: "api/test-current.txt",
1574 removed_api_file: "api/test-removed.txt",
1575 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001576 api_lint: {
1577 enabled: true,
1578 baseline_file: "api/test-lint-baseline.txt",
1579 },
Nan Zhange5612602018-08-16 16:16:00 -07001580 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001581}
Nan Zhangaf251302018-08-30 10:59:51 -07001582
1583filegroup {
1584 name: "framework-annotation-nonnull-srcs",
1585 srcs: [
1586 "core/java/android/annotation/NonNull.java",
1587 ],
1588}
Insun Kang06b25ae2018-11-20 10:05:44 +09001589
1590filegroup {
1591 name: "framework-media-annotation-srcs",
1592 srcs: [
1593 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001594 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001595 "core/java/android/annotation/DrawableRes.java",
1596 "core/java/android/annotation/IntDef.java",
1597 "core/java/android/annotation/LongDef.java",
1598 "core/java/android/annotation/NonNull.java",
1599 "core/java/android/annotation/Nullable.java",
1600 "core/java/android/annotation/RequiresPermission.java",
1601 "core/java/android/annotation/SdkConstant.java",
1602 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001603 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001604 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001605 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001606 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001607 ],
1608}
1609
Andrei Onea7a2985c2019-02-18 15:28:35 +00001610// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1611// annotations to private apis
1612aidl_mapping {
1613 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001614 srcs: [":framework-all-sources"],
Tobias Thiererbc050342019-05-23 16:20:12 +01001615 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001616}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001617
1618genrule {
1619 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001620 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001621 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1622 out: ["unsupportedappusage_index.csv"],
1623 dist: {
1624 targets: ["droidcore"],
1625 },
1626}
Chen Xu192bf1f2019-09-05 22:07:42 -07001627
1628// Avoid including Parcelable classes as we don't want to have two copies of
1629// Parcelable cross the process.
1630filegroup {
1631 name: "framework-telephony-stack-shared-srcs",
1632 srcs: [
1633 "core/java/android/os/RegistrantList.java",
1634 "core/java/android/os/Registrant.java",
1635 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001636 "core/java/android/util/TimeUtils.java",
1637 "core/java/com/android/internal/os/SomeArgs.java",
Michelebadc0212019-10-31 11:48:43 -07001638 "core/java/com/android/internal/util/FastXmlSerializer.java",
1639 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001640 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001641 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001642 "core/java/com/android/internal/util/Preconditions.java",
1643 "core/java/com/android/internal/util/State.java",
1644 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001645 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001646 ],
1647}
1648
Chen Xu4fea79c2019-10-08 18:39:03 -07001649// Avoid including Parcelable classes as we don't want to have two copies of
1650// Parcelable cross the process.
1651filegroup {
1652 name: "framework-cellbroadcast-shared-srcs",
1653 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001654 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001655 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001656 "core/java/com/android/internal/util/IState.java",
1657 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001658 "core/java/com/android/internal/util/State.java",
1659 "core/java/com/android/internal/util/StateMachine.java",
1660 ],
atrostce84de02019-10-08 16:16:47 +01001661}
Roshan Pius09de13e2019-10-16 13:16:04 -07001662
1663filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001664 name: "framework-ims-common-shared-srcs",
1665 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001666 "core/java/android/os/RegistrantList.java",
1667 "core/java/android/os/Registrant.java",
1668 "core/java/com/android/internal/os/SomeArgs.java",
1669 "core/java/com/android/internal/util/Preconditions.java",
1670 ],
1671}
1672
1673filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001674 name: "framework-wifistack-shared-srcs",
1675 srcs: [
1676 ":framework-annotations",
Roshan Piusb0d9a2402019-11-04 07:29:53 -08001677 "core/java/android/os/HandlerExecutor.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001678 "core/java/android/util/KeyValueListParser.java",
1679 "core/java/android/util/LocalLog.java",
1680 "core/java/android/util/Rational.java",
1681 "core/java/android/util/proto/ProtoStream.java",
1682 "core/java/android/util/proto/ProtoOutputStream.java",
1683 "core/java/com/android/internal/util/FastXmlSerializer.java",
1684 "core/java/com/android/internal/util/HexDump.java",
1685 "core/java/com/android/internal/util/IState.java",
1686 "core/java/com/android/internal/util/MessageUtils.java",
1687 "core/java/com/android/internal/util/Preconditions.java",
1688 "core/java/com/android/internal/util/State.java",
1689 "core/java/com/android/internal/util/StateMachine.java",
1690 "core/java/com/android/internal/util/WakeupMessage.java",
1691 "core/java/com/android/internal/util/XmlUtils.java",
1692 ],
1693}