blob: e0c3f96b73e8840ed3a94fafd62f3412b070ebb2 [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 Parkb3609312019-08-16 21:17:14 +090037filegroup {
38 name: "framework-drm-sources",
39 srcs: [
40 "drm/java/**/*.java",
41 ],
42 path: "drm/java",
43}
Jiyong Park1cc95662019-08-07 22:45:07 +090044
Jiyong Parkb3609312019-08-16 21:17:14 +090045filegroup {
46 name: "framework-graphics-sources",
47 srcs: [
48 "graphics/java/**/*.java",
49 "graphics/java/**/*.aidl",
50 ],
51 path: "graphics/java",
52}
53
54filegroup {
55 name: "framework-keystore-sources",
56 srcs: [
57 "keystore/java/**/*.java",
58 "keystore/java/**/*.aidl",
59 ],
60 path: "keystore/java",
61}
62
63filegroup {
64 name: "framework-location-sources",
65 srcs: [
66 "location/java/**/*.java",
67 "location/java/**/*.aidl",
68 ],
69 path: "location/java",
70}
71
72filegroup {
73 name: "framework-lowpan-sources",
74 srcs: [
75 "lowpan/java/**/*.java",
76 "lowpan/java/**/*.aidl",
77 ],
78 path: "lowpan/java",
79}
80
81filegroup {
82 name: "framework-media-sources",
83 srcs: [
84 "media/java/**/*.java",
85 "media/java/**/*.aidl",
86 ],
87 path: "media/java",
88}
89
90filegroup {
91 name: "framework-mca-effect-sources",
92 srcs: [
93 "media/mca/effect/java/**/*.java",
94 ],
95 path: "media/mca/effect/java",
96}
97
98filegroup {
99 name: "framework-mca-filterfw-sources",
100 srcs: [
101 "media/mca/filterfw/java/**/*.java",
102 ],
103 path: "media/mca/filterfw/java",
104}
105
106filegroup {
107 name: "framework-mca-filterpacks-sources",
108 srcs: [
109 "media/mca/filterpacks/java/**/*.java",
110 ],
111 path: "media/mca/filterpacks/java",
112}
113
114filegroup {
Tobias Thierer878c77b2019-08-18 15:19:45 +0100115 name: "framework-mime-sources",
116 srcs: [
117 "mime/java/**/*.java",
118 ],
119 path: "mime/java",
120}
121
122filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900123 name: "framework-opengl-sources",
124 srcs: [
125 "opengl/java/**/*.java",
126 ],
127 path: "opengl/java",
128}
129
130filegroup {
131 name: "framework-rs-sources",
132 srcs: [
133 "rs/java/**/*.java",
134 ],
135 path: "rs/java",
136}
137
138filegroup {
139 name: "framework-sax-sources",
140 srcs: [
141 "sax/java/**/*.java",
142 ],
143 path: "sax/java",
144}
145
146filegroup {
147 name: "framework-telecomm-sources",
148 srcs: [
149 "telecomm/java/**/*.java",
150 "telecomm/java/**/*.aidl",
151 ],
152 path: "telecomm/java",
153}
154
155filegroup {
156 name: "framework-telephony-sources",
157 srcs: [
158 "telephony/java/**/*.java",
159 "telephony/java/**/*.aidl",
160 ],
161 path: "telephony/java",
162}
163
164filegroup {
Amit Mahajand3551532019-09-23 17:59:57 -0700165 name: "framework-telephony-common-sources",
166 srcs: [
167 "telephony/common/**/*.java",
168 ],
169 path: "telephony/common",
170}
171
172filegroup {
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700173 name: "framework-mms-sources",
174 srcs: [
175 "mms/java/**/*.java",
176 "mms/java/**/*.aidl",
177 ],
178 path: "mms/java",
179}
180
181filegroup {
Jiyong Parkb3609312019-08-16 21:17:14 +0900182 name: "framework-wifi-sources",
183 srcs: [
184 "wifi/java/**/*.java",
185 "wifi/java/**/*.aidl",
186 ],
187 path: "wifi/java",
188}
189
Jiyong Park20426532019-08-19 15:24:49 +0900190filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900191 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900192 srcs: [
193 // Java/AIDL sources under frameworks/base
194 ":framework-core-sources",
195 ":framework-drm-sources",
196 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900197 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900198 ":framework-keystore-sources",
199 ":framework-location-sources",
200 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900201 ":framework-mca-effect-sources",
202 ":framework-mca-filterfw-sources",
203 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900204 ":framework-media-sources",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100205 ":framework-mime-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700206 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900207 ":framework-opengl-sources",
208 ":framework-rs-sources",
209 ":framework-sax-sources",
210 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700211 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900212 ":framework-telephony-sources",
213 ":framework-wifi-sources",
214 ":PacProcessor-aidl-sources",
215 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900216
atrost87488352019-10-10 19:27:31 +0100217 // AIDL from frameworks/base/native/
218 ":platform-compat-native-aidl",
219
Jiyong Park20426532019-08-19 15:24:49 +0900220 // AIDL sources from external directories
221 ":dumpstate_aidl",
222 ":framework_native_aidl",
223 ":gatekeeper_aidl",
224 ":gsiservice_aidl",
225 ":incidentcompanion_aidl",
226 ":installd_aidl",
227 ":keystore_aidl",
228 ":libaudioclient_aidl",
229 ":libbinder_aidl",
230 ":libbluetooth-binder-aidl",
231 ":libcamera_client_aidl",
232 ":libcamera_client_framework_aidl",
233 ":libupdate_engine_aidl",
234 ":storaged_aidl",
235 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900236
Jiyong Park20426532019-08-19 15:24:49 +0900237 // For the generated R.java and Manifest.java
238 ":framework-res{.aapt.srcjar}",
239
240 // etc.
241 ":framework-javastream-protos",
242 ":framework-statslog-gen",
243 ],
244}
Jiyong Park1cc95662019-08-07 22:45:07 +0900245
Jiyong Parkae9972b2019-09-15 20:19:02 +0900246filegroup {
247 name: "framework-all-sources",
248 srcs: [
249 ":framework-non-updatable-sources",
250 ":updatable-media-srcs",
251 ],
252}
253
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100254java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700255 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700256 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900257 export_include_dirs: [
258 "core/java",
259 "drm/java",
260 "graphics/java",
261 "keystore/java",
262 "location/java",
263 "lowpan/java",
264 "media/java",
265 "media/apex/java",
266 "media/mca/effect/java",
267 "media/mca/filterfw/java",
268 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700269 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900270 "opengl/java",
271 "rs/java",
272 "sax/java",
273 "telecomm/java",
274 "telephony/java",
275 "wifi/java",
276 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700277 },
Adam Pardyl50207032019-09-09 14:37:27 +0200278
279 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200280 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200281 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200282 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200283 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700284}
285
Jiyong Park20426532019-08-19 15:24:49 +0900286// Collection of classes that are generated from non-Java files that are not listed in
287// framework_srcs. These have no or very limited dependency to the framework.
288java_library {
289 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800290 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100291 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700292 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800293 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800294 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800295 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000296 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800297 "android.hardware.cas-V1.0-java",
298 "android.hardware.contexthub-V1.0-java",
299 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800300 "android.hardware.radio-V1.0-java",
301 "android.hardware.radio-V1.1-java",
302 "android.hardware.radio-V1.2-java",
303 "android.hardware.radio-V1.3-java",
304 "android.hardware.radio-V1.4-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800305 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800306 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700307 "android.hardware.thermal-V1.1-java",
308 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800309 "android.hardware.tv.input-V1.0-java-constants",
310 "android.hardware.usb-V1.0-java-constants",
311 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800312 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800313 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000314 "android.hardware.vibrator-V1.0-java",
315 "android.hardware.vibrator-V1.1-java",
316 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900317 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800318 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000319 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900320
321 "com.android.sysprop.apex",
322 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800323 ],
Jiyong Park20426532019-08-19 15:24:49 +0900324 sdk_version: "core_platform",
325 installable: false,
326}
327
328java_defaults {
329 name: "framework-defaults",
330 defaults: ["framework-aidl-export-defaults"],
331 installable: true,
332
Jiyong Park20426532019-08-19 15:24:49 +0900333 aidl: {
334 generate_get_transaction_name: true,
335 },
336
Jiyong Parkae9972b2019-09-15 20:19:02 +0900337 srcs: ["core/java/**/*.logtags"],
338
Jiyong Park20426532019-08-19 15:24:49 +0900339 exclude_srcs: [
340 // See comment on framework-atb-backward-compatibility module below
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000341 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900342 ],
343
344 sdk_version: "core_platform",
345 libs: [
346 "ext",
347 "updatable_media_stubs",
348 ],
349
350 jarjar_rules: ":framework-jarjar-rules",
351
Tobias Thierer878c77b2019-08-18 15:19:45 +0100352 static_libs: [
353 "framework-internal-utils",
354 "mimemap",
355 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800356
Colin Crosscf3a0b52017-11-16 00:15:28 -0800357 dxflags: [
358 "--core-library",
359 "--multi-dex",
360 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100361
Eugene Susla3b2fe612019-08-06 18:47:14 -0700362 plugins: [
363 "view-inspector-annotation-processor",
364 "staledataclass-annotation-processor",
365 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100366}
367
Colin Crossbc2dc312018-10-26 22:34:06 -0700368filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800369 name: "framework-jarjar-rules",
370 srcs: ["jarjar_rules_hidl.txt"],
371}
372
373filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700374 name: "libincident_aidl",
375 srcs: [
376 "core/java/android/os/IIncidentManager.aidl",
377 "core/java/android/os/IIncidentReportStatusListener.aidl",
378 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700379 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700380}
381
382filegroup {
383 name: "statsd_aidl",
384 srcs: [
385 "core/java/android/os/IStatsCompanionService.aidl",
386 "core/java/android/os/IStatsManager.aidl",
Tej Singha0c89dd2019-01-25 16:39:18 -0800387 "core/java/android/os/IStatsPullerCallback.aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -0700388 ],
Dan Willemsena38ff9f2019-06-11 10:56:01 -0700389 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700390}
391
Michael Wrightc390fbe2018-12-12 19:45:09 +0000392filegroup {
393 name: "libvibrator_aidl",
394 srcs: [
395 "core/java/android/os/IExternalVibrationController.aidl",
396 "core/java/android/os/IExternalVibratorService.aidl",
397 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700398 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000399}
400
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100401java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700402 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100403 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900404 srcs: [":framework-non-updatable-sources"],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100405 javac_shard_size: 150,
406}
407
408java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700409 name: "framework",
410 defaults: ["framework-aidl-export-defaults"],
411 installable: true,
412 static_libs: [
413 "framework-minus-apex",
Makoto Onuki62242c42019-08-05 12:54:20 -0700414 ],
atrostaec9bc12019-08-16 18:14:09 +0100415 required: [
416 "framework-platform-compat-config",
417 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100418 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100419 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100420 "services-devicepolicy-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100421 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700422 sdk_version: "core_platform",
423}
424
425java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900426 name: "framework-all",
427 defaults: ["framework-defaults"],
428 srcs: [":framework-all-sources"],
429 installable: false,
430}
431
432java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100433 name: "framework-annotation-proc",
atroste4d912f2019-10-01 13:33:03 +0100434 defaults: ["framework-aidl-export-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900435 srcs: [":framework-all-sources"],
Anna Trostanetski97088e92019-06-26 14:47:58 +0100436 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100437 plugins: [
438 "unsupportedappusage-annotation-processor",
439 "compat-changeid-annotation-processor",
440 ],
441}
442
443platform_compat_config {
444 name: "framework-platform-compat-config",
atrostb9c34502019-08-05 12:22:18 +0100445 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100446}
447
Paul Duffin521975802019-06-05 10:35:08 +0100448// A library including just UnsupportedAppUsage.java classes.
449//
450// Provided for target so that libraries can use it without depending on
451// the whole of framework or the core platform API.
452//
453// Built for host so that the annotation processor can also use this annotation.
454java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100455 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100456 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100457 srcs: [
458 "core/java/android/annotation/IntDef.java",
459 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100460 ],
461 static_libs: [
462 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100463 ],
Paul Duffin521975802019-06-05 10:35:08 +0100464
465 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800466}
467
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000468// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000469// android.test.base library has been removed and which provides support for
470// maintaining backwards compatibility for APKs that target pre-P and depend on
471// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
472// specified on the build command line.
473java_library {
474 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000475 installable: true,
Paul Duffina3b69212018-01-25 09:58:32 +0000476 srcs: [
Winson Chiu8e18a0a2019-09-30 20:37:25 +0000477 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000478 ],
479}
480
Colin Crosscf3a0b52017-11-16 00:15:28 -0800481genrule {
482 name: "framework-statslog-gen",
483 tools: ["stats-log-api-gen"],
484 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800485 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800486}
487
488gensrcs {
489 name: "framework-javastream-protos",
490 depfile: true,
491
Tobias Thiererbc050342019-05-23 16:20:12 +0100492 tool_files: ["tools/genprotos.sh"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800493 tools: [
494 "aprotoc",
495 "protoc-gen-javastream",
496 "soong_zip",
497 ],
498
Alex Light159799d2018-08-08 07:05:19 -0700499 // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
500 // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
501 // the way sbox rewrites the command. See b/70221552.
502 cmd: "$(location tools/genprotos.sh) " +
Tobias Thiererbc050342019-05-23 16:20:12 +0100503 " $(location aprotoc) " +
504 " $(location protoc-gen-javastream) " +
505 " $(location soong_zip) " +
506 " $(genDir) " +
507 " $(depfile) " +
508 " $(in) " +
509 " $(out)",
Yi Jin437aa6e2018-01-10 11:34:26 -0800510 srcs: [
511 "core/proto/**/*.proto",
512 "libs/incident/**/*.proto",
513 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800514 output_extension: "srcjar",
515}
516
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900517filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900518 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900519 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900520 "core/java/android/annotation/NonNull.java",
521 "core/java/android/annotation/Nullable.java",
522 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900523 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900524 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900525 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900526 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100527 ],
Chalard Jean95213512019-01-30 21:04:58 +0900528}
529
530filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900531 name: "framework-networkstack-shared-srcs",
532 srcs: [
533 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900534 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900535 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900536 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900537 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900538 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900539 "core/java/com/android/internal/util/IState.java",
540 "core/java/com/android/internal/util/MessageUtils.java",
541 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900542 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900543 "core/java/com/android/internal/util/State.java",
544 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900545 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900546 "core/java/com/android/internal/util/WakeupMessage.java",
547 "core/java/android/net/shared/*.java",
Tobias Thiererbc050342019-05-23 16:20:12 +0100548 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900549}
550
markchiena6ba54d2019-09-03 15:58:06 +0800551filegroup {
552 name: "framework-tethering-shared-srcs",
553 srcs: [
554 "core/java/android/util/LocalLog.java",
555 ],
556}
Colin Crossd8e02252017-10-02 17:14:22 -0700557// Build ext.jar
558// ============================================================
559java_library {
560 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700561 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100562 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700563 static_libs: [
564 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700565 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000566 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100567 "libtextclassifier-java",
568 ],
569 required: [
570 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700571 ],
572 dxflags: ["--core-library"],
573}
574
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700575// ==== java proto host library ==============================
576java_library_host {
577 name: "platformprotos",
578 srcs: [
579 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700580 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700581 "core/proto/**/*.proto",
582 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700583 ],
584 proto: {
585 include_dirs: ["external/protobuf/src"],
586 type: "full",
587 },
588 errorprone: {
Tobias Thiererbc050342019-05-23 16:20:12 +0100589 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700590 },
591}
592
Colin Cross43214162018-08-20 13:57:24 -0700593// ==== java proto device library (for test only) ==============================
594java_library {
595 name: "platformprotosnano",
596 proto: {
597 type: "nano",
598 output_params: ["store_unknown_fields=true"],
599 include_dirs: ["external/protobuf/src"],
600 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000601 exclude_srcs: [
602 "core/proto/android/privacy.proto",
603 "core/proto/android/section.proto",
604 ],
Colin Cross43214162018-08-20 13:57:24 -0700605 sdk_version: "current",
606 srcs: [
607 "core/proto/**/*.proto",
608 "libs/incident/proto/android/os/**/*.proto",
609 ],
610}
611
612// ==== java proto device library (for test only) ==============================
613java_library {
614 name: "platformprotoslite",
615 proto: {
616 type: "lite",
617 include_dirs: ["external/protobuf/src"],
618 },
619
620 srcs: [
621 "core/proto/**/*.proto",
622 "libs/incident/proto/android/os/**/*.proto",
623 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000624 exclude_srcs: [
625 "core/proto/android/privacy.proto",
626 "core/proto/android/section.proto",
627 ],
Colin Cross43214162018-08-20 13:57:24 -0700628 // Protos have lots of MissingOverride and similar.
629 errorprone: {
630 javacflags: ["-XepDisableAllChecks"],
631 },
632}
633
Colin Crossaa0d4352017-05-02 14:14:56 -0700634// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000635cc_defaults {
636 name: "libplatformprotos-defaults",
637
Colin Crossaa0d4352017-05-02 14:14:56 -0700638 proto: {
639 export_proto_headers: true,
640 include_dirs: ["external/protobuf/src"],
641 },
642
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700643 cflags: [
644 "-Wall",
645 "-Werror",
646 "-Wno-unused-parameter",
647 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800648
649 srcs: [
650 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800651 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000652}
653
654cc_library {
655 name: "libplatformprotos",
656 defaults: ["libplatformprotos-defaults"],
657 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800658
Colin Crossaa0d4352017-05-02 14:14:56 -0700659 target: {
660 host: {
661 proto: {
662 type: "full",
663 },
664 },
665 android: {
666 proto: {
667 type: "lite",
668 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000669 shared_libs: [
670 "libprotobuf-cpp-lite",
671 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700672 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700673 enabled: false,
674 },
675 },
676 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700677}
678
Joe Onorato9bd5db72019-04-03 18:19:43 -0700679// This library is meant for vendor code that needs to output protobuf. It links
680// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
681// binary compatibility.
682cc_library {
683 name: "libplatformprotos-static",
684 defaults: ["libplatformprotos-defaults"],
685 host_supported: false,
686
687 // This is okay because this library is only built as a static library. The C++
688 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
689 // but is not authorized to be used outside of debugging.
690 vendor_available: true,
691
692 target: {
693 android: {
694 proto: {
695 type: "lite",
696 },
697 static_libs: [
698 "libprotobuf-cpp-lite",
699 ],
700 shared: {
701 enabled: false,
702 },
703 },
704 },
705}
706
707
Joe Onorato99598ee2019-02-11 15:55:13 +0000708// This is the full proto version of libplatformprotos. It may only
709// be used by test code that is not shipped on the device.
710cc_library {
711 name: "libplatformprotos-test",
712 defaults: ["libplatformprotos-defaults"],
713 host_supported: false,
714
715 target: {
716 android: {
717 proto: {
718 type: "full",
719 },
720 shared: {
721 enabled: false,
722 },
723 },
724 },
725}
726
727
Yi Jin04625ad2017-10-17 18:29:33 -0700728gensrcs {
729 name: "gen-platform-proto-constants",
730 depfile: true,
731
732 tools: [
733 "aprotoc",
734 "protoc-gen-cppstream",
735 ],
736
737 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800738 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800739 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800740 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700741 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700742 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700743 "core/proto/android/os/kernelwake.proto",
744 "core/proto/android/os/pagetypeinfo.proto",
745 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800746 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800747 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800748 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700749 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700750 ],
751
752 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800753 cmd: "mkdir -p $(genDir) " +
754 "&& $(location aprotoc) " +
755 " --plugin=$(location protoc-gen-cppstream) " +
756 " --dependency_out=$(depfile) " +
757 " --cppstream_out=$(genDir) " +
758 " -Iexternal/protobuf/src " +
759 " -I . " +
760 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700761
Logan Chien71ddfea2018-02-27 16:43:50 +0800762 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700763}
764
Joe Onorato99598ee2019-02-11 15:55:13 +0000765
Dan Albert2a8d9c22016-09-23 15:55:49 -0700766subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700767 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600768 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800769 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700770 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700771 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500772 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700773 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700774 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700775]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800776
777optional_subdirs = [
778 "core/tests/utiltests/jni",
779]
Steven Morelandeddafe92017-10-02 16:58:41 -0700780
Colin Crossa2b78a72018-03-29 13:31:04 -0700781// TODO(b/77285514): remove this once the last few hidl interfaces have been
782// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700783java_library {
784 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100785 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700786
787 srcs: [
788 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800789 "core/java/android/annotation/IntDef.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700790 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800791 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800792 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800793 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000794 "core/java/android/annotation/UnsupportedAppUsage.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700795 "core/java/android/os/HwBinder.java",
796 "core/java/android/os/HwBlob.java",
797 "core/java/android/os/HwParcel.java",
798 "core/java/android/os/IHwBinder.java",
799 "core/java/android/os/IHwInterface.java",
800 "core/java/android/os/DeadObjectException.java",
801 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700802 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700803 "core/java/android/os/RemoteException.java",
804 "core/java/android/util/AndroidException.java",
805 ],
806
807 dxflags: ["--core-library"],
808 installable: false,
809}
Nan Zhang2db709d2017-11-08 20:48:46 -0800810
811python_defaults {
812 name: "base_default",
813 version: {
814 py2: {
815 enabled: true,
816 embedded_launcher: true,
817 },
818 py3: {
819 enabled: false,
820 embedded_launcher: false,
821 },
822 },
823}
824
825python_binary_host {
826 name: "fontchain_linter",
827 defaults: ["base_default"],
828 main: "tools/fonts/fontchain_linter.py",
829 srcs: [
830 "tools/fonts/fontchain_linter.py",
831 ],
832 libs: [
833 "fontTools",
834 ],
835}
Nan Zhang172875b2018-02-27 11:24:03 -0800836
Jiyong Park20426532019-08-19 15:24:49 +0900837// TODO: Don't rely on this list by switching package.html into package-info.java
Nan Zhang172875b2018-02-27 11:24:03 -0800838frameworks_base_subdirs = [
839 "core/java",
840 "graphics/java",
841 "location/java",
842 "media/java",
843 "media/mca/effect/java",
844 "media/mca/filterfw/java",
845 "media/mca/filterpacks/java",
846 "drm/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700847 "mms/java",
Nan Zhang172875b2018-02-27 11:24:03 -0800848 "opengl/java",
849 "sax/java",
850 "telecomm/java",
Amit Mahajand3551532019-09-23 17:59:57 -0700851 "telephony/common",
Nan Zhang172875b2018-02-27 11:24:03 -0800852 "telephony/java",
853 "wifi/java",
854 "lowpan/java",
855 "keystore/java",
856 "rs/java",
857]
858
Paul Duffin0440e1f2019-02-11 16:13:25 +0000859// Make the api/current.txt file available for use by modules in other
860// directories.
861filegroup {
862 name: "frameworks-base-api-current.txt",
863 srcs: [
864 "api/current.txt",
865 ],
866}
867
Paul Duffincd35de32019-05-30 15:12:47 +0100868// Make the api/system-current.txt file available for use by modules in other
869// directories.
870filegroup {
871 name: "frameworks-base-api-system-current.txt",
872 srcs: [
873 "api/system-current.txt",
874 ],
875}
876
877// Make the api/system-removed.txt file available for use by modules in other
878// directories.
879filegroup {
880 name: "frameworks-base-api-system-removed.txt",
881 srcs: [
882 "api/system-removed.txt",
883 ],
884}
885
Nan Zhang7764a4b2018-08-22 11:27:31 -0700886framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc050342019-05-23 16:20:12 +0100887 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
888 "-overview $(location core/java/overview.html) " +
889 // Federate Support Library references against local API file.
890 "-federate SupportLib https://developer.android.com " +
891 "-federationapi SupportLib $(location :current-support-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800892
Nan Zhang7764a4b2018-08-22 11:27:31 -0700893framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700894 "voip-common",
895 "android.test.mock",
896 "android-support-annotations",
897 "android-support-compat",
898 "android-support-core-ui",
899 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700900 "android-support-design",
901 "android-support-dynamic-animation",
902 "android-support-exifinterface",
903 "android-support-fragment",
904 "android-support-media-compat",
905 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700906 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700907 "android-support-v7-cardview",
908 "android-support-v7-gridlayout",
909 "android-support-v7-mediarouter",
910 "android-support-v7-palette",
911 "android-support-v7-preference",
912 "android-support-v13",
913 "android-support-v14-preference",
914 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700915 "android-support-vectordrawable",
916 "android-support-animatedvectordrawable",
917 "android-support-v7-appcompat",
918 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700919 "android-support-v8-renderscript",
920 "android-support-multidex",
921 "android-support-multidex-instrumentation",
922]
923
924metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
925 "--hide-package com.android.okhttp " +
926 "--hide-package com.android.org.conscrypt --hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +0100927 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700928 "--hide RequiresPermission " +
929 "--hide MissingPermission --hide BroadcastBehavior " +
930 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Tobias Thierer8f559412019-05-22 20:17:49 +0100931 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo "
932
933// http://b/129765390 Rewrite links to "platform" or "technotes" folders
934// which are siblings (and thus outside of) {@docRoot}.
935//
936// We have to escape \ as \\ and $ as $$ here because they get resolved by
937// different layers of the build tooling. The arguments are wrapped in '' so
938// that the shell doesn't add yet another level of escaping.
939metalava_framework_docs_args += " --replace-documentation " +
940 // packages whose descendants to apply replacement to (all packages from
941 // libcore/ojluni/src/main/java that contribute to documentation).
942 "com.sun:java:javax:jdk.net:sun " +
943 // regex of the string to replace
944 "'(<a\\s+href\\s?=[\\*\\s]*\")(?:(?:\\{@docRoot\\}/\\.\\./)|(?:(?:\\.\\./)+))((?:platform|technotes).+)\">' " +
945 // replacement (with $1, $2 backreferences to the regex groups)
946 "'$$1https://docs.oracle.com/javase/8/docs/$$2\">' "
Nan Zhang7764a4b2018-08-22 11:27:31 -0700947
Jiyong Parkae9972b2019-09-15 20:19:02 +0900948packages_to_document = [
949 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +0900950 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900951 "java",
952 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +0900953 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900954 "org.apache.http",
955 "org.json",
956 "org.w3c.dom",
957 "org.xml.sax",
958 "org.xmlpull",
959]
960
Nan Zhang7764a4b2018-08-22 11:27:31 -0700961stubs_defaults {
962 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +0000963 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +0900964 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900965 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +0000966 "test-base/src/**/*.java",
967 ":opt-telephony-srcs",
968 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +0100969 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +0000970 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +0900971 ":updatable-media-srcs",
Nan Zhang3e15ba82018-07-26 18:41:12 +0000972 "test-mock/src/**/*.java",
973 "test-runner/src/**/*.java",
974 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700975 libs: framework_docs_only_libs,
Nan Zhang3e15ba82018-07-26 18:41:12 +0000976 local_sourcepaths: frameworks_base_subdirs,
Nan Zhang7764a4b2018-08-22 11:27:31 -0700977 create_doc_stubs: true,
978 annotations_enabled: true,
979 api_levels_annotations_enabled: true,
980 api_levels_annotations_dirs: [
981 "sdk-dir",
982 "api-versions-jars-dir",
983 ],
Jeff Gaston1b511422019-09-20 14:37:00 -0400984 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700985 merge_annotations_dirs: [
986 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +0100987 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700988 ],
989}
990
991doc_defaults {
992 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -0700993 libs: framework_docs_only_libs +
Tobias Thiererbc050342019-05-23 16:20:12 +0100994 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +0000995 html_dirs: [
996 "docs/html",
997 ],
998 knowntags: [
999 "docs/knowntags.txt",
1000 ":known-oj-tags",
1001 ],
1002 custom_template: "droiddoc-templates-sdk",
1003 resourcesdir: "docs/html/reference/images/",
1004 resourcesoutdir: "reference/android/images/",
1005 hdf: [
1006 "dac true",
1007 "sdk.codename O",
1008 "sdk.preview.version 1",
1009 "sdk.version 7.0",
1010 "sdk.rel.id 1",
1011 "sdk.preview 0",
1012 ],
1013 arg_files: [
1014 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001015 "core/java/overview.html",
1016 ":current-support-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001017 ],
1018 create_stubs: false,
1019}
1020
Tiem Song730c19b2019-08-26 11:27:27 -07001021doc_defaults {
1022 name: "framework-dokka-docs-default",
1023 create_stubs: false,
1024}
1025
Nan Zhang894c9ec2018-09-10 18:58:39 -07001026stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001027 name: "metalava-api-stubs-default",
1028 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001029 ":framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001030 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001031 ":opt-telephony-srcs",
1032 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001033 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001034 ":core_public_api_files",
Jiyong Parkd2411f72019-08-20 20:48:47 +09001035 ":updatable-media-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001036 ],
Jiyong Park20426532019-08-19 15:24:49 +09001037 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001038 local_sourcepaths: frameworks_base_subdirs,
1039 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001040 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001041 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001042 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001043 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001044 "ojluni-annotated-sdk-stubs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001045 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001046 api_levels_annotations_enabled: true,
1047 api_levels_annotations_dirs: [
1048 "sdk-dir",
1049 "api-versions-jars-dir",
1050 ],
Jiyong Park20426532019-08-19 15:24:49 +09001051 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001052 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001053}
1054
Nan Zhang7764a4b2018-08-22 11:27:31 -07001055droidstubs {
1056 name: "framework-doc-stubs",
1057 defaults: ["framework-doc-stubs-default"],
1058 arg_files: [
1059 "core/res/AndroidManifest.xml",
1060 ],
1061 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001062 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001063}
1064
1065droidstubs {
1066 name: "framework-doc-system-stubs",
1067 defaults: ["framework-doc-stubs-default"],
1068 arg_files: [
1069 "core/res/AndroidManifest.xml",
1070 ],
1071 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001072 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001073}
1074
Nan Zhang3e15ba82018-07-26 18:41:12 +00001075droiddoc {
1076 name: "doc-comment-check-docs",
1077 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001078 srcs: [
1079 ":framework-doc-stubs",
1080 ],
1081 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001082 installable: false,
1083}
1084
1085droiddoc {
1086 name: "offline-sdk-docs",
1087 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001088 srcs: [
1089 ":framework-doc-stubs",
1090 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001091 hdf: [
1092 "android.whichdoc offline",
1093 ],
1094 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001095 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001096 static_doc_index_redirect: "docs/docs-preview-index.html",
1097}
1098
1099droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001100 // Please sync with android-api-council@ before making any changes for the name property below.
1101 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1102 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001103 name: "offline-sdk-referenceonly-docs",
1104 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001105 srcs: [
1106 ":framework-doc-stubs",
1107 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001108 hdf: [
1109 "android.whichdoc offline",
1110 ],
1111 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001112 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001113 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1114 static_doc_properties: "docs/source.properties",
1115}
1116
1117droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001118 // Please sync with android-api-council@ before making any changes for the name property below.
1119 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1120 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001121 name: "offline-system-sdk-referenceonly-docs",
1122 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001123 srcs: [
1124 ":framework-doc-system-stubs",
1125 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001126 hdf: [
1127 "android.whichdoc offline",
1128 ],
1129 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001130 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1131 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001132 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1133 static_doc_properties: "docs/source.properties",
1134}
1135
1136droiddoc {
1137 name: "online-sdk-docs",
1138 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001139 srcs: [
1140 ":framework-doc-stubs",
1141 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001142 hdf: [
1143 "android.whichdoc online",
1144 "android.hasSamples true",
1145 ],
1146 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc050342019-05-23 16:20:12 +01001147 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001148 " -toroot / -samplegroup Admin " +
1149 " -samplegroup Background " +
1150 " -samplegroup Connectivity " +
1151 " -samplegroup Content " +
1152 " -samplegroup Input " +
1153 " -samplegroup Media " +
1154 " -samplegroup Notification " +
1155 " -samplegroup RenderScript " +
1156 " -samplegroup Security " +
1157 " -samplegroup Sensors " +
1158 " -samplegroup System " +
1159 " -samplegroup Testing " +
1160 " -samplegroup UI " +
1161 " -samplegroup Views " +
1162 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1163}
1164
1165droiddoc {
1166 name: "online-system-api-sdk-docs",
1167 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001168 srcs: [
1169 ":framework-doc-system-stubs",
1170 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001171 hdf: [
1172 "android.whichdoc online",
1173 "android.hasSamples true",
1174 ],
1175 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001176 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001177 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001178 " -title \"Android SDK - Including system APIs.\" " +
1179 " -hide 101 " +
1180 " -hide 104 " +
1181 " -hide 108 " +
1182 " -toroot / -samplegroup Admin " +
1183 " -samplegroup Background " +
1184 " -samplegroup Connectivity " +
1185 " -samplegroup Content " +
1186 " -samplegroup Input " +
1187 " -samplegroup Media " +
1188 " -samplegroup Notification " +
1189 " -samplegroup RenderScript " +
1190 " -samplegroup Security " +
1191 " -samplegroup Sensors " +
1192 " -samplegroup System " +
1193 " -samplegroup Testing " +
1194 " -samplegroup UI " +
1195 " -samplegroup Views " +
1196 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1197 installable: false,
1198}
1199
1200droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001201 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001202 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001203 srcs: [
1204 ":framework-doc-stubs",
1205 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001206 hdf: [
1207 "android.whichdoc online",
1208 "android.hasSamples true",
1209 ],
1210 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001211 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001212 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001213 " -samplegroup Background " +
1214 " -samplegroup Connectivity " +
1215 " -samplegroup Content " +
1216 " -samplegroup Input " +
1217 " -samplegroup Media " +
1218 " -samplegroup Notification " +
1219 " -samplegroup RenderScript " +
1220 " -samplegroup Security " +
1221 " -samplegroup Sensors " +
1222 " -samplegroup System " +
1223 " -samplegroup Testing " +
1224 " -samplegroup UI " +
1225 " -samplegroup Views " +
1226 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1227}
1228
1229droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001230 name: "ds-docs-kt",
1231 defaults: ["framework-dokka-docs-default"],
1232 srcs: [
1233 ":framework-doc-stubs",
1234 ],
1235 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1236 "-noStdlibLink",
1237 proofread_file: "ds-dokka-proofread.txt",
1238 dokka_enabled: true,
1239}
1240
1241java_genrule {
1242 name: "ds-docs",
1243 tools: [
1244 "zip2zip",
1245 "merge_zips",
1246 ],
1247 srcs: [
1248 ":ds-docs-java{.docs.zip}",
1249 ":ds-docs-kt{.docs.zip}",
1250 ],
1251 out: ["ds-docs.zip"],
1252 dist: {
1253 targets: ["docs"],
1254 },
1255 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1256 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1257}
1258
1259java_genrule {
1260 name: "ds-docs-switched",
1261 tools: [
1262 "switcher4",
1263 "soong_zip",
1264 ],
1265 srcs: [
1266 ":ds-docs-java{.docs.zip}",
1267 ":ds-docs-kt{.docs.zip}",
1268 ],
1269 out: ["ds-docs-switched.zip"],
1270 dist: {
1271 targets: ["docs"],
1272 },
1273 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1274 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1275 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1276 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1277 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1278}
1279
1280
1281droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001282 name: "ds-static-docs",
1283 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001284 srcs: [
1285 ":framework-doc-stubs",
1286 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001287 hdf: [
1288 "android.whichdoc online",
1289 ],
1290 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001291 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001292 " -staticonly " +
1293 " -toroot / " +
1294 " -devsite " +
1295 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001296}
1297
1298droiddoc {
1299 name: "ds-ref-navtree-docs",
1300 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001301 srcs: [
1302 ":framework-doc-stubs",
1303 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001304 hdf: [
1305 "android.whichdoc online",
1306 ],
1307 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001308 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001309 " -toroot / " +
1310 " -atLinksNavtree " +
1311 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001312}
1313
1314droiddoc {
1315 name: "online-sdk-dev-docs",
1316 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001317 srcs: [
1318 ":framework-doc-stubs",
1319 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001320 hdf: [
1321 "android.whichdoc online",
1322 "android.hasSamples true",
1323 ],
1324 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001325 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001326 " -toroot / -samplegroup Admin " +
1327 " -samplegroup Background " +
1328 " -samplegroup Connectivity " +
1329 " -samplegroup Content " +
1330 " -samplegroup Input " +
1331 " -samplegroup Media " +
1332 " -samplegroup Notification " +
1333 " -samplegroup RenderScript " +
1334 " -samplegroup Security " +
1335 " -samplegroup Sensors " +
1336 " -samplegroup System " +
1337 " -samplegroup Testing " +
1338 " -samplegroup UI " +
1339 " -samplegroup Views " +
1340 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1341}
1342
1343droiddoc {
1344 name: "hidden-docs",
1345 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001346 srcs: [
1347 ":framework-doc-stubs",
1348 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001349 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001350 args: framework_docs_only_args +
Tobias Thiererbc050342019-05-23 16:20:12 +01001351 " -referenceonly " +
1352 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001353}
1354
Nan Zhang7764a4b2018-08-22 11:27:31 -07001355droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001356 name: "hwbinder-stubs-docs",
1357 srcs: [
1358 "core/java/android/os/HidlSupport.java",
1359 "core/java/android/annotation/IntDef.java",
1360 "core/java/android/annotation/NonNull.java",
1361 "core/java/android/annotation/SystemApi.java",
1362 "core/java/android/os/HwBinder.java",
1363 "core/java/android/os/HwBlob.java",
1364 "core/java/android/os/HwParcel.java",
1365 "core/java/android/os/IHwBinder.java",
1366 "core/java/android/os/IHwInterface.java",
1367 "core/java/android/os/DeadObjectException.java",
1368 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001369 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001370 "core/java/android/os/RemoteException.java",
1371 "core/java/android/util/AndroidException.java",
1372 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001373 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001374 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001375 annotations_enabled: true,
Jeff Gaston1b511422019-09-20 14:37:00 -04001376 previous_api: ":last-released-public-api-for-metalava-annotations",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001377 merge_annotations_dirs: [
1378 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001379 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001380 ],
1381 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001382}
1383
1384java_library_static {
1385 name: "hwbinder.stubs",
1386 sdk_version: "core_current",
1387 srcs: [
1388 ":hwbinder-stubs-docs",
1389 ],
1390}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001391
Nan Zhang894c9ec2018-09-10 18:58:39 -07001392droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001393 name: "hiddenapi-lists-docs",
1394 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001395 arg_files: [
1396 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001397 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001398 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001399 private_dex_api_filename: "private-dex.txt",
1400 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001401 args: metalava_framework_docs_args +
1402 " --show-unannotated " +
1403 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001404 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001405}
1406
Nan Zhang7764a4b2018-08-22 11:27:31 -07001407droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001408 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001409 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001410 srcs: [
Paul Duffina0cb5382018-10-31 10:34:51 +00001411 ":non_openjdk_java_files",
Artur Satayev3cc3fa42019-08-02 16:42:07 +01001412 ":openjdk_java_files",
Andrei Onea6dd843a2019-03-13 15:27:23 +00001413 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001414 ],
Jiyong Park20426532019-08-19 15:24:49 +09001415
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001416 arg_files: [
1417 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001418 ],
1419 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001420 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001421 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001422 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001423 " --show-unannotated " +
1424 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc050342019-05-23 16:20:12 +01001425 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001426}
1427
Nan Zhanga0f91af2018-04-09 17:41:51 -07001428filegroup {
1429 name: "apache-http-stubs-sources",
1430 srcs: [
1431 "core/java/org/apache/http/conn/ConnectTimeoutException.java",
1432 "core/java/org/apache/http/conn/scheme/HostNameResolver.java",
1433 "core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java",
1434 "core/java/org/apache/http/conn/scheme/SocketFactory.java",
1435 "core/java/org/apache/http/conn/ssl/AbstractVerifier.java",
1436 "core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java",
1437 "core/java/org/apache/http/conn/ssl/AndroidDistinguishedNameParser.java",
1438 "core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java",
1439 "core/java/org/apache/http/conn/ssl/SSLSocketFactory.java",
1440 "core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java",
1441 "core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java",
1442 "core/java/org/apache/http/params/CoreConnectionPNames.java",
1443 "core/java/org/apache/http/params/HttpConnectionParams.java",
1444 "core/java/org/apache/http/params/HttpParams.java",
Nan Zhanga0f91af2018-04-09 17:41:51 -07001445 "core/java/android/net/http/SslCertificate.java",
1446 "core/java/android/net/http/SslError.java",
1447 "core/java/com/android/internal/util/HexDump.java",
1448 ],
1449}
Nan Zhang4212eb12018-04-25 17:23:33 -07001450
Nan Zhang894c9ec2018-09-10 18:58:39 -07001451droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001452 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001453 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001454 api_filename: "public_api.txt",
1455 private_api_filename: "private.txt",
1456 removed_api_filename: "removed.txt",
1457 arg_files: [
1458 "core/res/AndroidManifest.xml",
1459 ],
1460 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001461 check_api: {
1462 current: {
1463 api_file: "api/current.txt",
1464 removed_api_file: "api/removed.txt",
1465 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001466 last_released: {
1467 api_file: ":last-released-public-api",
1468 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001469 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001470 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001471 api_lint: {
1472 enabled: true,
1473 new_since: ":last-released-public-api",
1474 baseline_file: "api/lint-baseline.txt",
1475 },
Nan Zhange5612602018-08-16 16:16:00 -07001476 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001477 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001478}
1479
Nan Zhang894c9ec2018-09-10 18:58:39 -07001480droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001481 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001482 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001483 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001484 api_filename: "system-api.txt",
1485 private_api_filename: "system-private.txt",
1486 private_dex_api_filename: "system-private-dex.txt",
1487 removed_api_filename: "system-removed.txt",
1488 arg_files: [
1489 "core/res/AndroidManifest.xml",
1490 ],
1491 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001492 check_api: {
1493 current: {
1494 api_file: "api/system-current.txt",
1495 removed_api_file: "api/system-removed.txt",
1496 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001497 last_released: {
1498 api_file: ":last-released-system-api",
1499 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001500 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001501 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001502 api_lint: {
1503 enabled: true,
1504 new_since: ":last-released-system-api",
1505 baseline_file: "api/system-lint-baseline.txt",
1506 },
Nan Zhange5612602018-08-16 16:16:00 -07001507 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001508 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001509}
1510
Nan Zhang894c9ec2018-09-10 18:58:39 -07001511droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001512 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001513 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001514 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001515 api_filename: "test-api.txt",
1516 removed_api_filename: "test-removed.txt",
1517 arg_files: [
1518 "core/res/AndroidManifest.xml",
1519 ],
1520 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001521 check_api: {
1522 current: {
1523 api_file: "api/test-current.txt",
1524 removed_api_file: "api/test-removed.txt",
1525 },
1526 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001527}
Nan Zhangaf251302018-08-30 10:59:51 -07001528
1529filegroup {
1530 name: "framework-annotation-nonnull-srcs",
1531 srcs: [
1532 "core/java/android/annotation/NonNull.java",
1533 ],
1534}
Insun Kang06b25ae2018-11-20 10:05:44 +09001535
1536filegroup {
1537 name: "framework-media-annotation-srcs",
1538 srcs: [
1539 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001540 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001541 "core/java/android/annotation/DrawableRes.java",
1542 "core/java/android/annotation/IntDef.java",
1543 "core/java/android/annotation/LongDef.java",
1544 "core/java/android/annotation/NonNull.java",
1545 "core/java/android/annotation/Nullable.java",
1546 "core/java/android/annotation/RequiresPermission.java",
1547 "core/java/android/annotation/SdkConstant.java",
1548 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001549 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001550 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001551 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001552 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001553 ],
1554}
1555
Andrei Onea7a2985c2019-02-18 15:28:35 +00001556// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1557// annotations to private apis
1558aidl_mapping {
1559 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001560 srcs: [":framework-all-sources"],
Tobias Thiererbc050342019-05-23 16:20:12 +01001561 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001562}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001563
1564genrule {
1565 name: "framework-annotation-proc-index",
1566 srcs: [":framework-annotation-proc"],
1567 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1568 out: ["unsupportedappusage_index.csv"],
1569 dist: {
1570 targets: ["droidcore"],
1571 },
1572}
Chen Xu192bf1f2019-09-05 22:07:42 -07001573
1574// Avoid including Parcelable classes as we don't want to have two copies of
1575// Parcelable cross the process.
1576filegroup {
1577 name: "framework-telephony-stack-shared-srcs",
1578 srcs: [
1579 "core/java/android/os/RegistrantList.java",
1580 "core/java/android/os/Registrant.java",
1581 "core/java/android/util/LocalLog.java",
1582 "core/java/android/util/Slog.java",
1583 "core/java/android/util/TimeUtils.java",
1584 "core/java/com/android/internal/os/SomeArgs.java",
1585 "core/java/com/android/internal/util/Preconditions.java",
1586 "core/java/com/android/internal/util/State.java",
1587 "core/java/com/android/internal/util/StateMachine.java",
1588 "core/java/com/android/internal/util/XmlUtils.java",
1589 "core/java/com/android/internal/util/HexDump.java",
1590 "core/java/com/android/internal/util/IndentingPrintWriter.java",
1591 "core/java/com/android/internal/util/DumpUtils.java"
1592 ],
1593}
1594
Chen Xu4fea79c2019-10-08 18:39:03 -07001595// Avoid including Parcelable classes as we don't want to have two copies of
1596// Parcelable cross the process.
1597filegroup {
1598 name: "framework-cellbroadcast-shared-srcs",
1599 srcs: [
1600 "core/java/android/util/LocalLog.java",
1601 "core/java/android/util/Slog.java",
1602 "core/java/com/android/internal/util/State.java",
1603 "core/java/com/android/internal/util/StateMachine.java",
1604 ],
atrostce84de02019-10-08 16:16:47 +01001605}
Roshan Pius09de13e2019-10-16 13:16:04 -07001606
1607filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001608 name: "framework-ims-common-shared-srcs",
1609 srcs: [
1610 "core/java/android/os/AsyncResult.java",
1611 "core/java/android/os/RegistrantList.java",
1612 "core/java/android/os/Registrant.java",
1613 "core/java/com/android/internal/os/SomeArgs.java",
1614 "core/java/com/android/internal/util/Preconditions.java",
1615 ],
1616}
1617
1618filegroup {
Roshan Pius09de13e2019-10-16 13:16:04 -07001619 name: "framework-wifistack-shared-srcs",
1620 srcs: [
1621 ":framework-annotations",
1622 "core/java/android/util/KeyValueListParser.java",
1623 "core/java/android/util/LocalLog.java",
1624 "core/java/android/util/Rational.java",
1625 "core/java/android/util/proto/ProtoStream.java",
1626 "core/java/android/util/proto/ProtoOutputStream.java",
1627 "core/java/com/android/internal/util/FastXmlSerializer.java",
1628 "core/java/com/android/internal/util/HexDump.java",
1629 "core/java/com/android/internal/util/IState.java",
1630 "core/java/com/android/internal/util/MessageUtils.java",
1631 "core/java/com/android/internal/util/Preconditions.java",
1632 "core/java/com/android/internal/util/State.java",
1633 "core/java/com/android/internal/util/StateMachine.java",
1634 "core/java/com/android/internal/util/WakeupMessage.java",
1635 "core/java/com/android/internal/util/XmlUtils.java",
1636 ],
1637}