blob: 457ecfce2c5c3de50bd6451484e72487e1c16830 [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 Parkae9972b2019-09-15 20:19:02 +0900203 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900204 srcs: [
205 // Java/AIDL sources under frameworks/base
Sudheer Shankaf5b36962019-10-04 16:16:13 -0700206 ":framework-blobstore-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900207 ":framework-core-sources",
208 ":framework-drm-sources",
209 ":framework-graphics-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900210 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +0900211 ":framework-keystore-sources",
212 ":framework-location-sources",
213 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900214 ":framework-mca-effect-sources",
215 ":framework-mca-filterfw-sources",
216 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +0900217 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700218 ":framework-mms-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900219 ":framework-opengl-sources",
220 ":framework-rs-sources",
221 ":framework-sax-sources",
222 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -0700223 ":framework-telephony-common-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900224 ":framework-telephony-sources",
David Su130441b2019-12-14 21:37:20 -0800225 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -0800226 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900227 ":PacProcessor-aidl-sources",
228 ":ProxyHandler-aidl-sources",
Jiyong Parkb3609312019-08-16 21:17:14 +0900229
atrost87488352019-10-10 19:27:31 +0100230 // AIDL from frameworks/base/native/
231 ":platform-compat-native-aidl",
232
Jiyong Park20426532019-08-19 15:24:49 +0900233 // AIDL sources from external directories
234 ":dumpstate_aidl",
235 ":framework_native_aidl",
236 ":gatekeeper_aidl",
237 ":gsiservice_aidl",
238 ":incidentcompanion_aidl",
239 ":installd_aidl",
240 ":keystore_aidl",
241 ":libaudioclient_aidl",
242 ":libbinder_aidl",
243 ":libbluetooth-binder-aidl",
244 ":libcamera_client_aidl",
245 ":libcamera_client_framework_aidl",
246 ":libupdate_engine_aidl",
Ruchir Rastogicd9dd942019-11-27 15:26:03 -0800247 // TODO: this needs to be removed when statsd-framework.jar is separated out
248 ":statsd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900249 ":storaged_aidl",
250 ":vold_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900251
Jiyong Park20426532019-08-19 15:24:49 +0900252 // For the generated R.java and Manifest.java
253 ":framework-res{.aapt.srcjar}",
254
255 // etc.
256 ":framework-javastream-protos",
257 ":framework-statslog-gen",
258 ],
259}
Jiyong Park1cc95662019-08-07 22:45:07 +0900260
Jiyong Parkae9972b2019-09-15 20:19:02 +0900261filegroup {
Anton Hanssonb4f35572019-12-02 16:30:22 +0000262 name: "framework-updatable-sources",
263 srcs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800264 ":framework-appsearch-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000265 ":framework-sdkext-sources",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800266 ":framework-statsd-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000267 ":updatable-media-srcs",
David Su754fcc22019-09-04 14:31:58 -0700268 ":framework-wifi-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000269 ]
270}
271
272filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900273 name: "framework-all-sources",
274 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +0000275 ":framework-mime-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900276 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +0000277 ":framework-updatable-sources",
Jiyong Parkae9972b2019-09-15 20:19:02 +0900278 ],
279}
280
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100281java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700282 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700283 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900284 export_include_dirs: [
285 "core/java",
286 "drm/java",
287 "graphics/java",
288 "keystore/java",
289 "location/java",
290 "lowpan/java",
291 "media/java",
292 "media/apex/java",
293 "media/mca/effect/java",
294 "media/mca/filterfw/java",
295 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700296 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900297 "opengl/java",
298 "rs/java",
299 "sax/java",
300 "telecomm/java",
301 "telephony/java",
302 "wifi/java",
303 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700304 },
Adam Pardyl50207032019-09-09 14:37:27 +0200305
306 required: [
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200307 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Adam Pardyl50207032019-09-09 14:37:27 +0200308 "gps_debug.conf",
Adam Pardyl0f1b3d42019-08-19 15:24:11 +0200309 "protolog.conf.json.gz",
Adam Pardyl50207032019-09-09 14:37:27 +0200310 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700311}
312
Jiyong Park20426532019-08-19 15:24:49 +0900313// Collection of classes that are generated from non-Java files that are not listed in
314// framework_srcs. These have no or very limited dependency to the framework.
315java_library {
316 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800317 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100318 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700319 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800320 "framework-protos",
Peiyong Lin9ca1dd82019-01-12 17:44:29 -0800321 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800322 "android.hidl.base-V1.0-java",
Henry Fang5215ac92019-02-01 19:24:55 +0000323 "android.hardware.cas-V1.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800324 "android.hardware.cas-V1.0-java",
325 "android.hardware.contexthub-V1.0-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800326 "android.hardware.gnss-V1.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800327 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800328 "android.hardware.radio-V1.0-java",
329 "android.hardware.radio-V1.1-java",
330 "android.hardware.radio-V1.2-java",
331 "android.hardware.radio-V1.3-java",
332 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800333 "android.hardware.radio-V1.5-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800334 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800335 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700336 "android.hardware.thermal-V1.1-java",
337 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800338 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700339 "android.hardware.tv.tuner-V1.0-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800340 "android.hardware.usb-V1.0-java-constants",
341 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800342 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800343 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000344 "android.hardware.vibrator-V1.0-java",
345 "android.hardware.vibrator-V1.1-java",
346 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900347 "android.hardware.vibrator-V1.3-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800348 "android.hardware.wifi-V1.0-java-constants",
arangelov1ab61492018-11-22 13:56:50 +0000349 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900350
351 "com.android.sysprop.apex",
352 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800353 ],
Etan Cohen73450f22019-12-12 23:29:25 -0800354 aidl: {
355 include_dirs: ["system/connectivity/wificond/aidl"],
356 },
Jiyong Park20426532019-08-19 15:24:49 +0900357 sdk_version: "core_platform",
358 installable: false,
359}
360
361java_defaults {
362 name: "framework-defaults",
363 defaults: ["framework-aidl-export-defaults"],
364 installable: true,
365
Jiyong Park20426532019-08-19 15:24:49 +0900366 aidl: {
367 generate_get_transaction_name: true,
368 },
369
Jiyong Parkae9972b2019-09-15 20:19:02 +0900370 srcs: ["core/java/**/*.logtags"],
371
Jiyong Park20426532019-08-19 15:24:49 +0900372 exclude_srcs: [
373 // See comment on framework-atb-backward-compatibility module below
Winson14ff7172019-10-23 10:42:27 -0700374 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Jiyong Park20426532019-08-19 15:24:49 +0900375 ],
376
377 sdk_version: "core_platform",
378 libs: [
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000379 "app-compat-annotations",
Jiyong Park20426532019-08-19 15:24:49 +0900380 "ext",
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000381 "unsupportedappusage",
Jiyong Park20426532019-08-19 15:24:49 +0900382 "updatable_media_stubs",
383 ],
384
385 jarjar_rules: ":framework-jarjar-rules",
386
Tobias Thierer878c77b2019-08-18 15:19:45 +0100387 static_libs: [
388 "framework-internal-utils",
Tobias Thierer878c77b2019-08-18 15:19:45 +0100389 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800390
Colin Crosscf3a0b52017-11-16 00:15:28 -0800391 dxflags: [
392 "--core-library",
393 "--multi-dex",
394 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100395
Eugene Susla3b2fe612019-08-06 18:47:14 -0700396 plugins: [
397 "view-inspector-annotation-processor",
398 "staledataclass-annotation-processor",
399 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100400}
401
Colin Crossbc2dc312018-10-26 22:34:06 -0700402filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800403 name: "framework-jarjar-rules",
David Su130441b2019-12-14 21:37:20 -0800404 srcs: ["framework-jarjar-rules.txt"],
Steven Moreland19e8d462019-03-08 10:44:22 -0800405}
406
407filegroup {
Colin Crossbc2dc312018-10-26 22:34:06 -0700408 name: "libincident_aidl",
409 srcs: [
410 "core/java/android/os/IIncidentManager.aidl",
411 "core/java/android/os/IIncidentReportStatusListener.aidl",
412 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700413 path: "core/java",
Colin Crossbc2dc312018-10-26 22:34:06 -0700414}
415
416filegroup {
Michael Wrightc390fbe2018-12-12 19:45:09 +0000417 name: "libvibrator_aidl",
418 srcs: [
419 "core/java/android/os/IExternalVibrationController.aidl",
420 "core/java/android/os/IExternalVibratorService.aidl",
421 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700422 path: "core/java",
Michael Wrightc390fbe2018-12-12 19:45:09 +0000423}
424
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100425java_library {
Makoto Onuki62242c42019-08-05 12:54:20 -0700426 name: "framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100427 defaults: ["framework-defaults"],
Jiyong Parkae9972b2019-09-15 20:19:02 +0900428 srcs: [":framework-non-updatable-sources"],
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800429 libs: [
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800430 "framework-appsearch-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800431 // TODO(b/146167933): Use framework-statsd-stubs
432 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700433 "framework-wifi-stubs",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800434 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700435 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900436 javac_shard_size: 150,
atrostaec9bc12019-08-16 18:14:09 +0100437 required: [
438 "framework-platform-compat-config",
439 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100440 "services-platform-compat-config",
atrost8bea6472019-10-10 19:33:22 +0100441 "media-provider-platform-compat-config",
atrostce84de02019-10-08 16:16:47 +0100442 "services-devicepolicy-platform-compat-config",
atrostc3c2e4d2019-11-29 11:27:27 +0000443 "services-core-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100444 ],
Tobias Thiererc0c06082019-11-22 16:33:18 +0000445 static_libs: [
Tobias Thierer82968532019-11-29 19:39:45 +0000446 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
447 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000448 "mimemap",
449 ],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900450 // For backwards compatibility.
451 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900452 apex_available: ["//apex_available:platform"],
Jiyong Park911cd4f2019-10-21 14:35:14 +0900453}
454
455// This "framework" module is NOT installed to the device. It's
456// "framework-minus-apex" that gets installed to the device. Note that
457// the filename is still framework.jar (via the stem property) for
458// compatibility reason. The purpose of this module is to provide
459// framework APIs (both public and private) for bundled apps.
460// "framework-minus-apex" can't be used for the purpose because 1)
461// many apps have already hardcoded the name "framework" and
462// 2) it lacks API symbols from updatable modules - as it's clear from
463// its suffix "-minus-apex".
464java_library {
465 name: "framework",
466 defaults: ["framework-aidl-export-defaults"],
467 installable: false, // this lib is a build-only library
468 static_libs: [
469 "framework-minus-apex",
Alexander Dorokhine04a05a82019-12-17 10:41:21 -0800470 "framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
Anton Hansson355000d2019-12-06 17:07:45 +0000471 "framework-sdkext-stubs-systemapi",
Muhammad Qureshi237c7742019-12-12 11:03:55 -0800472 // TODO(b/146167933): Use framework-statsd-stubs instead.
473 "framework-statsd",
David Su754fcc22019-09-04 14:31:58 -0700474 // TODO(b/140299412): should be framework-wifi-stubs
475 "framework-wifi",
Anton Hansson355000d2019-12-06 17:07:45 +0000476 // TODO(jiyong): add more stubs for APEXes here
Jiyong Park911cd4f2019-10-21 14:35:14 +0900477 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700478 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900479 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700480}
481
482java_library {
Jiyong Parkae9972b2019-09-15 20:19:02 +0900483 name: "framework-all",
484 defaults: ["framework-defaults"],
485 srcs: [":framework-all-sources"],
486 installable: false,
Jiyong Park352f9e22019-12-09 14:45:07 +0900487 static_libs: ["exoplayer2-core"],
488 apex_available: ["//apex_available:platform"],
Jiyong Park97183492019-11-14 03:07:36 +0000489}
490
491java_library {
492 name: "framework-annotation-proc",
493 defaults: ["framework-aidl-export-defaults"],
494 srcs: [":framework-all-sources"],
Artur Satayev6aa25ec2019-12-11 16:33:22 +0000495 libs: [
496 "app-compat-annotations",
497 "unsupportedappusage",
498 ],
Jiyong Park97183492019-11-14 03:07:36 +0000499 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100500 plugins: [
501 "unsupportedappusage-annotation-processor",
502 "compat-changeid-annotation-processor",
503 ],
Santiago Seifert5466a7d2019-11-11 19:27:04 +0000504 static_libs: [
505 "exoplayer2-core"
506 ]
atrostb9c34502019-08-05 12:22:18 +0100507}
508
509platform_compat_config {
510 name: "framework-platform-compat-config",
Jiyong Park97183492019-11-14 03:07:36 +0000511 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100512}
513
Paul Duffin521975802019-06-05 10:35:08 +0100514// A library including just UnsupportedAppUsage.java classes.
515//
516// Provided for target so that libraries can use it without depending on
517// the whole of framework or the core platform API.
518//
519// Built for host so that the annotation processor can also use this annotation.
520java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100521 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100522 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100523 srcs: [
524 "core/java/android/annotation/IntDef.java",
525 "core/java/android/annotation/UnsupportedAppUsage.java",
Paul Duffinc1308012019-10-10 16:33:42 +0100526 ],
527 static_libs: [
528 "art.module.api.annotations",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100529 ],
Paul Duffin521975802019-06-05 10:35:08 +0100530
531 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800532}
533
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000534// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000535// android.test.base library has been removed and which provides support for
536// maintaining backwards compatibility for APKs that target pre-P and depend on
537// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
538// specified on the build command line.
539java_library {
540 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000541 installable: true,
atrost1a945502019-11-04 17:03:54 +0000542 libs: ["app-compat-annotations"],
Paul Duffina3b69212018-01-25 09:58:32 +0000543 srcs: [
Winson14ff7172019-10-23 10:42:27 -0700544 "core/java/android/content/pm/parsing/library/AndroidTestBaseUpdater.java",
Paul Duffina3b69212018-01-25 09:58:32 +0000545 ],
546}
547
Colin Crosscf3a0b52017-11-16 00:15:28 -0800548genrule {
549 name: "framework-statslog-gen",
550 tools: ["stats-log-api-gen"],
551 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800552 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800553}
554
555gensrcs {
556 name: "framework-javastream-protos",
557 depfile: true,
558
559 tools: [
560 "aprotoc",
561 "protoc-gen-javastream",
562 "soong_zip",
563 ],
564
Anton Hanssond82b2f72019-11-18 13:34:56 +0000565 cmd: "mkdir -p $(genDir)/$(in) " +
566 "&& $(location aprotoc) " +
567 " --plugin=$(location protoc-gen-javastream) " +
568 " --dependency_out=$(depfile) " +
569 " --javastream_out=$(genDir)/$(in) " +
570 " -Iexternal/protobuf/src " +
571 " -I . " +
572 " $(in) " +
573 "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
574
Yi Jin437aa6e2018-01-10 11:34:26 -0800575 srcs: [
576 "core/proto/**/*.proto",
577 "libs/incident/**/*.proto",
578 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800579 output_extension: "srcjar",
580}
581
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900582filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900583 name: "framework-annotations",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900584 srcs: [
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900585 "core/java/android/annotation/NonNull.java",
586 "core/java/android/annotation/Nullable.java",
587 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900588 "core/java/android/annotation/IntRange.java",
Anton Hanssondc1e99b2019-12-06 17:07:28 +0000589 "core/java/android/annotation/SystemApi.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900590 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900591 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900592 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100593 ],
Chalard Jean95213512019-01-30 21:04:58 +0900594}
595
Anton Hansson4ec07fa2019-11-08 15:18:04 +0000596java_library {
597 name: "framework-annotations-lib",
598 srcs: [ ":framework-annotations" ],
599 sdk_version: "current",
600}
601
Chalard Jean95213512019-01-30 21:04:58 +0900602filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900603 name: "framework-networkstack-shared-srcs",
604 srcs: [
605 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900606 ":framework-annotations",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900607 "core/java/android/net/DhcpResults.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900608 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900609 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900610 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900611 "core/java/com/android/internal/util/IState.java",
612 "core/java/com/android/internal/util/MessageUtils.java",
613 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900614 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900615 "core/java/com/android/internal/util/State.java",
616 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean6a76b7e2019-04-09 11:16:56 +0900617 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900618 "core/java/com/android/internal/util/WakeupMessage.java",
619 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100620 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900621}
622
markchiena6ba54d2019-09-03 15:58:06 +0800623filegroup {
624 name: "framework-tethering-shared-srcs",
625 srcs: [
626 "core/java/android/util/LocalLog.java",
627 ],
628}
Colin Crossd8e02252017-10-02 17:14:22 -0700629// Build ext.jar
630// ============================================================
631java_library {
632 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700633 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100634 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700635 static_libs: [
636 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700637 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000638 "rappor",
Tony Mak64c4cb22018-09-25 13:38:28 +0100639 "libtextclassifier-java",
640 ],
641 required: [
642 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700643 ],
644 dxflags: ["--core-library"],
645}
646
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700647// ==== java proto host library ==============================
648java_library_host {
649 name: "platformprotos",
650 srcs: [
651 "cmds/am/proto/instrumentation_data.proto",
Howard Ro0546d542018-08-30 16:23:44 -0700652 "cmds/statsd/src/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700653 "core/proto/**/*.proto",
654 "libs/incident/proto/**/*.proto",
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700655 ],
656 proto: {
657 include_dirs: ["external/protobuf/src"],
658 type: "full",
659 },
660 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100661 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampeaf27bf662018-05-17 10:49:26 -0700662 },
663}
664
Colin Cross43214162018-08-20 13:57:24 -0700665// ==== java proto device library (for test only) ==============================
666java_library {
667 name: "platformprotosnano",
668 proto: {
669 type: "nano",
670 output_params: ["store_unknown_fields=true"],
671 include_dirs: ["external/protobuf/src"],
672 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000673 exclude_srcs: [
674 "core/proto/android/privacy.proto",
675 "core/proto/android/section.proto",
676 ],
Colin Cross43214162018-08-20 13:57:24 -0700677 sdk_version: "current",
678 srcs: [
679 "core/proto/**/*.proto",
680 "libs/incident/proto/android/os/**/*.proto",
681 ],
682}
683
684// ==== java proto device library (for test only) ==============================
685java_library {
686 name: "platformprotoslite",
687 proto: {
688 type: "lite",
689 include_dirs: ["external/protobuf/src"],
690 },
691
692 srcs: [
693 "core/proto/**/*.proto",
694 "libs/incident/proto/android/os/**/*.proto",
695 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000696 exclude_srcs: [
697 "core/proto/android/privacy.proto",
698 "core/proto/android/section.proto",
699 ],
Colin Cross43214162018-08-20 13:57:24 -0700700 // Protos have lots of MissingOverride and similar.
701 errorprone: {
702 javacflags: ["-XepDisableAllChecks"],
703 },
704}
705
Colin Crossaa0d4352017-05-02 14:14:56 -0700706// ==== c++ proto device library ==============================
Joe Onorato99598ee2019-02-11 15:55:13 +0000707cc_defaults {
708 name: "libplatformprotos-defaults",
709
Colin Crossaa0d4352017-05-02 14:14:56 -0700710 proto: {
711 export_proto_headers: true,
712 include_dirs: ["external/protobuf/src"],
713 },
714
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700715 cflags: [
716 "-Wall",
717 "-Werror",
718 "-Wno-unused-parameter",
719 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800720
721 srcs: [
722 "core/proto/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800723 ],
Joe Onorato99598ee2019-02-11 15:55:13 +0000724}
725
726cc_library {
727 name: "libplatformprotos",
728 defaults: ["libplatformprotos-defaults"],
729 host_supported: true,
Joe Onorato62c220b2017-11-18 20:32:56 -0800730
Colin Crossaa0d4352017-05-02 14:14:56 -0700731 target: {
732 host: {
733 proto: {
734 type: "full",
735 },
736 },
737 android: {
738 proto: {
739 type: "lite",
740 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000741 shared_libs: [
742 "libprotobuf-cpp-lite",
743 ],
Colin Crossaa0d4352017-05-02 14:14:56 -0700744 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700745 enabled: false,
746 },
747 },
748 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700749}
750
Joe Onorato9bd5db72019-04-03 18:19:43 -0700751// This library is meant for vendor code that needs to output protobuf. It links
752// against the static version of libprotobuf-cpp-lite, for which we can not guarantee
753// binary compatibility.
754cc_library {
755 name: "libplatformprotos-static",
756 defaults: ["libplatformprotos-defaults"],
757 host_supported: false,
758
759 // This is okay because this library is only built as a static library. The C++
760 // API is not guaranteed. The proto API is guaranteed to be stable via Metrics Council,
761 // but is not authorized to be used outside of debugging.
762 vendor_available: true,
763
764 target: {
765 android: {
766 proto: {
767 type: "lite",
768 },
769 static_libs: [
770 "libprotobuf-cpp-lite",
771 ],
772 shared: {
773 enabled: false,
774 },
775 },
776 },
777}
778
779
Joe Onorato99598ee2019-02-11 15:55:13 +0000780// This is the full proto version of libplatformprotos. It may only
781// be used by test code that is not shipped on the device.
782cc_library {
783 name: "libplatformprotos-test",
784 defaults: ["libplatformprotos-defaults"],
785 host_supported: false,
786
787 target: {
788 android: {
789 proto: {
790 type: "full",
791 },
792 shared: {
793 enabled: false,
794 },
795 },
796 },
797}
798
Songchun Fan0037c3f2019-10-30 15:20:59 -0700799filegroup {
800 name: "incremental_aidl",
801 srcs: [
Songchun Fan0037c3f2019-10-30 15:20:59 -0700802 "core/java/android/os/incremental/IncrementalFileSystemControlParcel.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700803 ],
804 path: "core/java",
805}
806
807filegroup {
Songchun Fan6dd47b52019-11-29 15:20:18 -0800808 name: "dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700809 srcs: [
Songchun Fan6dd47b52019-11-29 15:20:18 -0800810 "core/java/android/content/pm/IDataLoaderStatusListener.aidl",
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800811 "core/java/android/os/incremental/IncrementalDataLoaderParamsParcel.aidl",
812 "core/java/android/os/incremental/NamedParcelFileDescriptor.aidl",
813 ],
814 path: "core/java",
815}
816
817filegroup {
818 name: "incremental_manager_aidl",
819 srcs: [
820 "core/java/android/os/incremental/IIncrementalManager.aidl",
821 "core/java/android/os/incremental/IIncrementalManagerNative.aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700822 ],
823 path: "core/java",
824}
825
826aidl_interface {
827 name: "libincremental_aidl",
828 srcs: [
829 ":incremental_aidl",
Songchun Fan6dd47b52019-11-29 15:20:18 -0800830 ],
Songchun Fan6dd47b52019-11-29 15:20:18 -0800831 backend: {
832 java: {
833 sdk_version: "28",
834 },
835 cpp: {
836 enabled: true,
837 },
838 ndk: {
839 enabled: true,
840 },
841 },
842}
843
844aidl_interface {
845 name: "libdataloader_aidl",
846 srcs: [
847 ":dataloader_aidl",
Songchun Fan0037c3f2019-10-30 15:20:59 -0700848 ],
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800849 imports: [
850 "libincremental_aidl",
851 ],
Songchun Fan0037c3f2019-10-30 15:20:59 -0700852 backend: {
853 java: {
854 sdk_version: "28",
855 },
856 cpp: {
857 enabled: true,
858 },
859 ndk: {
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800860 enabled: false,
861 },
862 },
863}
864
865aidl_interface {
866 name: "libincremental_manager_aidl",
867 srcs: [
868 ":incremental_manager_aidl",
869 ],
870 imports: [
871 "libincremental_aidl",
872 "libdataloader_aidl",
873 ],
874 backend: {
875 java: {
876 sdk_version: "28",
877 },
878 cpp: {
Songchun Fan0037c3f2019-10-30 15:20:59 -0700879 enabled: true,
880 },
Alex Buynytskyy5b0c7fa2019-12-17 21:48:16 -0800881 ndk: {
882 enabled: false,
883 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700884 },
Songchun Fan0037c3f2019-10-30 15:20:59 -0700885}
Joe Onorato99598ee2019-02-11 15:55:13 +0000886
Yi Jin04625ad2017-10-17 18:29:33 -0700887gensrcs {
888 name: "gen-platform-proto-constants",
889 depfile: true,
890
891 tools: [
892 "aprotoc",
893 "protoc-gen-cppstream",
894 ],
895
896 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800897 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800898 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800899 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700900 "core/proto/android/os/cpuinfo.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700901 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700902 "core/proto/android/os/kernelwake.proto",
903 "core/proto/android/os/pagetypeinfo.proto",
904 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800905 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800906 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800907 "core/proto/android/util/event_log_tags.proto",
Colin Crossbc2dc312018-10-26 22:34:06 -0700908 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700909 ],
910
911 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800912 cmd: "mkdir -p $(genDir) " +
913 "&& $(location aprotoc) " +
914 " --plugin=$(location protoc-gen-cppstream) " +
915 " --dependency_out=$(depfile) " +
916 " --cppstream_out=$(genDir) " +
917 " -Iexternal/protobuf/src " +
918 " -I . " +
919 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700920
Logan Chien71ddfea2018-02-27 16:43:50 +0800921 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700922}
923
Joe Onorato99598ee2019-02-11 15:55:13 +0000924
Dan Albert2a8d9c22016-09-23 15:55:49 -0700925subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700926 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600927 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800928 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700929 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700930 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500931 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700932 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700933 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700934]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800935
936optional_subdirs = [
937 "core/tests/utiltests/jni",
938]
Steven Morelandeddafe92017-10-02 16:58:41 -0700939
Colin Crossa2b78a72018-03-29 13:31:04 -0700940// TODO(b/77285514): remove this once the last few hidl interfaces have been
941// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700942java_library {
943 name: "hwbinder",
Paul Duffin8fcace42019-06-12 13:47:18 +0100944 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700945
946 srcs: [
947 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800948 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800949 "core/java/android/annotation/IntRange.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700950 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800951 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800952 "core/java/android/annotation/SystemApi.java",
Steven Morelandcbba4c72019-01-11 10:19:51 -0800953 "core/java/android/annotation/TestApi.java",
Andrei Onea24ec3212019-03-15 17:35:05 +0000954 "core/java/android/annotation/UnsupportedAppUsage.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -0800955 "core/java/android/os/HidlMemory.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700956 "core/java/android/os/HwBinder.java",
957 "core/java/android/os/HwBlob.java",
958 "core/java/android/os/HwParcel.java",
959 "core/java/android/os/IHwBinder.java",
960 "core/java/android/os/IHwInterface.java",
961 "core/java/android/os/DeadObjectException.java",
962 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700963 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700964 "core/java/android/os/RemoteException.java",
965 "core/java/android/util/AndroidException.java",
966 ],
Artur Satayevafdb23a2019-12-10 17:47:53 +0000967 libs: [ "unsupportedappusage" ],
Steven Morelandeddafe92017-10-02 16:58:41 -0700968
969 dxflags: ["--core-library"],
970 installable: false,
971}
Nan Zhang2db709d2017-11-08 20:48:46 -0800972
973python_defaults {
974 name: "base_default",
975 version: {
976 py2: {
977 enabled: true,
978 embedded_launcher: true,
979 },
980 py3: {
981 enabled: false,
982 embedded_launcher: false,
983 },
984 },
985}
986
987python_binary_host {
988 name: "fontchain_linter",
989 defaults: ["base_default"],
990 main: "tools/fonts/fontchain_linter.py",
991 srcs: [
992 "tools/fonts/fontchain_linter.py",
993 ],
994 libs: [
995 "fontTools",
996 ],
997}
Nan Zhang172875b2018-02-27 11:24:03 -0800998
Paul Duffin0440e1f2019-02-11 16:13:25 +0000999// Make the api/current.txt file available for use by modules in other
1000// directories.
1001filegroup {
1002 name: "frameworks-base-api-current.txt",
1003 srcs: [
1004 "api/current.txt",
1005 ],
1006}
1007
Paul Duffincd35de32019-05-30 15:12:47 +01001008// Make the api/system-current.txt file available for use by modules in other
1009// directories.
1010filegroup {
1011 name: "frameworks-base-api-system-current.txt",
1012 srcs: [
1013 "api/system-current.txt",
1014 ],
1015}
1016
1017// Make the api/system-removed.txt file available for use by modules in other
1018// directories.
1019filegroup {
1020 name: "frameworks-base-api-system-removed.txt",
1021 srcs: [
1022 "api/system-removed.txt",
1023 ],
1024}
1025
Nan Zhang7764a4b2018-08-22 11:27:31 -07001026framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001027 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
1028 "-overview $(location core/java/overview.html) " +
1029 // Federate Support Library references against local API file.
1030 "-federate SupportLib https://developer.android.com " +
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001031 "-federationapi SupportLib $(location :current-support-api) " +
1032 // Federate Support Library references against local API file.
1033 "-federate AndroidX https://developer.android.com " +
1034 "-federationapi AndroidX $(location :current-androidx-api) "
Nan Zhang172875b2018-02-27 11:24:03 -08001035
Nan Zhang7764a4b2018-08-22 11:27:31 -07001036framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -07001037 "voip-common",
1038 "android.test.mock",
1039 "android-support-annotations",
1040 "android-support-compat",
1041 "android-support-core-ui",
1042 "android-support-core-utils",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001043 "android-support-design",
1044 "android-support-dynamic-animation",
1045 "android-support-exifinterface",
1046 "android-support-fragment",
1047 "android-support-media-compat",
1048 "android-support-percent",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001049 "android-support-transition",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001050 "android-support-v7-cardview",
1051 "android-support-v7-gridlayout",
1052 "android-support-v7-mediarouter",
1053 "android-support-v7-palette",
1054 "android-support-v7-preference",
1055 "android-support-v13",
1056 "android-support-v14-preference",
1057 "android-support-v17-leanback",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001058 "android-support-vectordrawable",
1059 "android-support-animatedvectordrawable",
1060 "android-support-v7-appcompat",
1061 "android-support-v7-recyclerview",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001062 "android-support-v8-renderscript",
1063 "android-support-multidex",
1064 "android-support-multidex-instrumentation",
1065]
1066
1067metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Paul Duffin179d9702019-10-18 13:57:19 +01001068 "--ignore-classes-on-classpath " +
Paul Duffin7fb76962019-11-06 14:18:38 +00001069 "--hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001070 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001071 "--hide RequiresPermission " +
Adrian Roosa90de2e2019-11-01 18:35:53 +01001072 "--hide CallbackInterface " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001073 "--hide MissingPermission --hide BroadcastBehavior " +
1074 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Jeff Gaston86766732019-10-22 16:30:38 -04001075 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
1076 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
Tobias Thierer8f559412019-05-22 20:17:49 +01001077
Jiyong Parkae9972b2019-09-15 20:19:02 +09001078packages_to_document = [
1079 "android",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001080 "dalvik",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001081 "java",
1082 "javax",
Jiyong Parkb1d27012019-09-17 14:51:28 +09001083 "junit",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001084 "org.apache.http",
1085 "org.json",
1086 "org.w3c.dom",
1087 "org.xml.sax",
1088 "org.xmlpull",
1089]
1090
Nan Zhang7764a4b2018-08-22 11:27:31 -07001091stubs_defaults {
1092 name: "framework-doc-stubs-default",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001093 srcs: [
Tobias Thiererc0c06082019-11-22 16:33:18 +00001094 ":framework-mime-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001095 ":framework-non-updatable-sources",
1096 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001097 "core/java/**/*.logtags",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001098 "test-base/src/**/*.java",
1099 ":opt-telephony-srcs",
1100 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001101 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001102 ":core_public_api_files",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001103 "test-mock/src/**/*.java",
1104 "test-runner/src/**/*.java",
1105 ],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001106 libs: framework_docs_only_libs,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001107 create_doc_stubs: true,
1108 annotations_enabled: true,
1109 api_levels_annotations_enabled: true,
1110 api_levels_annotations_dirs: [
1111 "sdk-dir",
1112 "api-versions-jars-dir",
1113 ],
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001114 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001115 merge_annotations_dirs: [
1116 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001117 ],
1118}
1119
1120doc_defaults {
1121 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -07001122 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001123 ["stub-annotations"],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001124 html_dirs: [
1125 "docs/html",
1126 ],
1127 knowntags: [
1128 "docs/knowntags.txt",
1129 ":known-oj-tags",
1130 ],
1131 custom_template: "droiddoc-templates-sdk",
1132 resourcesdir: "docs/html/reference/images/",
1133 resourcesoutdir: "reference/android/images/",
1134 hdf: [
1135 "dac true",
1136 "sdk.codename O",
1137 "sdk.preview.version 1",
1138 "sdk.version 7.0",
1139 "sdk.rel.id 1",
1140 "sdk.preview 0",
1141 ],
1142 arg_files: [
1143 "core/res/AndroidManifest.xml",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001144 "core/java/overview.html",
1145 ":current-support-api",
Charles Munger1b1c0ca2019-11-19 14:01:19 -08001146 ":current-androidx-api",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001147 ],
1148 create_stubs: false,
1149}
1150
Tiem Song730c19b2019-08-26 11:27:27 -07001151doc_defaults {
1152 name: "framework-dokka-docs-default",
1153 create_stubs: false,
1154}
1155
Nan Zhang894c9ec2018-09-10 18:58:39 -07001156stubs_defaults {
Nan Zhangd25ad462018-08-22 10:48:15 -07001157 name: "metalava-api-stubs-default",
1158 srcs: [
Jiyong Parkae9972b2019-09-15 20:19:02 +09001159 ":framework-non-updatable-sources",
Anton Hanssonb4f35572019-12-02 16:30:22 +00001160 ":framework-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +09001161 "core/java/**/*.logtags",
Nan Zhangd25ad462018-08-22 10:48:15 -07001162 ":opt-telephony-srcs",
1163 ":opt-net-voip-srcs",
Paul Duffine86cc6f2019-10-04 10:10:58 +01001164 ":core-current-stubs-source",
Neil Fuller3b1b7032019-02-26 12:00:38 +00001165 ":core_public_api_files",
evitayan69d77da2019-10-30 19:58:48 -07001166 ":ike-api-srcs",
Nan Zhangd25ad462018-08-22 10:48:15 -07001167 ],
Jiyong Park20426532019-08-19 15:24:49 +09001168 libs: ["framework-internal-utils"],
Nan Zhangd25ad462018-08-22 10:48:15 -07001169 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -07001170 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001171 previous_api: ":last-released-public-api",
Nan Zhang894c9ec2018-09-10 18:58:39 -07001172 merge_annotations_dirs: [
Nan Zhangd25ad462018-08-22 10:48:15 -07001173 "metalava-manual",
Nan Zhangd25ad462018-08-22 10:48:15 -07001174 ],
Nan Zhang91cc7662018-09-18 10:46:10 -07001175 api_levels_annotations_enabled: true,
1176 api_levels_annotations_dirs: [
1177 "sdk-dir",
1178 "api-versions-jars-dir",
1179 ],
Jiyong Park20426532019-08-19 15:24:49 +09001180 sdk_version: "core_platform",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001181 filter_packages: packages_to_document,
Nan Zhangd25ad462018-08-22 10:48:15 -07001182}
1183
Nan Zhang7764a4b2018-08-22 11:27:31 -07001184droidstubs {
1185 name: "framework-doc-stubs",
1186 defaults: ["framework-doc-stubs-default"],
1187 arg_files: [
1188 "core/res/AndroidManifest.xml",
1189 ],
1190 args: metalava_framework_docs_args,
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001191 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001192}
1193
1194droidstubs {
1195 name: "framework-doc-system-stubs",
1196 defaults: ["framework-doc-stubs-default"],
1197 arg_files: [
1198 "core/res/AndroidManifest.xml",
1199 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001200 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) ",
Jerome Gaillardb59a1cd2019-10-10 19:09:21 +01001201 write_sdk_values: true,
Nan Zhang7764a4b2018-08-22 11:27:31 -07001202}
1203
Nan Zhang3e15ba82018-07-26 18:41:12 +00001204droiddoc {
1205 name: "doc-comment-check-docs",
1206 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001207 srcs: [
1208 ":framework-doc-stubs",
1209 ],
1210 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001211 installable: false,
1212}
1213
1214droiddoc {
1215 name: "offline-sdk-docs",
1216 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001217 srcs: [
1218 ":framework-doc-stubs",
1219 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001220 hdf: [
1221 "android.whichdoc offline",
1222 ],
1223 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001224 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001225 static_doc_index_redirect: "docs/docs-preview-index.html",
1226}
1227
1228droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001229 // Please sync with android-api-council@ before making any changes for the name property below.
1230 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
1231 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001232 name: "offline-sdk-referenceonly-docs",
1233 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001234 srcs: [
1235 ":framework-doc-stubs",
1236 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001237 hdf: [
1238 "android.whichdoc offline",
1239 ],
1240 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001241 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001242 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1243 static_doc_properties: "docs/source.properties",
1244}
1245
1246droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -07001247 // Please sync with android-api-council@ before making any changes for the name property below.
1248 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
1249 // See b/116221385 for reference.
Nan Zhang3e15ba82018-07-26 18:41:12 +00001250 name: "offline-system-sdk-referenceonly-docs",
1251 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001252 srcs: [
1253 ":framework-doc-system-stubs",
1254 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001255 hdf: [
1256 "android.whichdoc offline",
1257 ],
1258 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001259 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
1260 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001261 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
1262 static_doc_properties: "docs/source.properties",
1263}
1264
1265droiddoc {
1266 name: "online-sdk-docs",
1267 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001268 srcs: [
1269 ":framework-doc-stubs",
1270 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001271 hdf: [
1272 "android.whichdoc online",
1273 "android.hasSamples true",
1274 ],
1275 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001276 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001277 " -toroot / -samplegroup Admin " +
1278 " -samplegroup Background " +
1279 " -samplegroup Connectivity " +
1280 " -samplegroup Content " +
1281 " -samplegroup Input " +
1282 " -samplegroup Media " +
1283 " -samplegroup Notification " +
1284 " -samplegroup RenderScript " +
1285 " -samplegroup Security " +
1286 " -samplegroup Sensors " +
1287 " -samplegroup System " +
1288 " -samplegroup Testing " +
1289 " -samplegroup UI " +
1290 " -samplegroup Views " +
1291 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1292}
1293
1294droiddoc {
1295 name: "online-system-api-sdk-docs",
1296 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001297 srcs: [
1298 ":framework-doc-system-stubs",
1299 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001300 hdf: [
1301 "android.whichdoc online",
1302 "android.hasSamples true",
1303 ],
1304 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001305 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001306 " -referenceonly " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001307 " -title \"Android SDK - Including system APIs.\" " +
1308 " -hide 101 " +
1309 " -hide 104 " +
1310 " -hide 108 " +
1311 " -toroot / -samplegroup Admin " +
1312 " -samplegroup Background " +
1313 " -samplegroup Connectivity " +
1314 " -samplegroup Content " +
1315 " -samplegroup Input " +
1316 " -samplegroup Media " +
1317 " -samplegroup Notification " +
1318 " -samplegroup RenderScript " +
1319 " -samplegroup Security " +
1320 " -samplegroup Sensors " +
1321 " -samplegroup System " +
1322 " -samplegroup Testing " +
1323 " -samplegroup UI " +
1324 " -samplegroup Views " +
1325 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1326 installable: false,
1327}
1328
1329droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001330 name: "ds-docs-java",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001331 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001332 srcs: [
1333 ":framework-doc-stubs",
1334 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001335 hdf: [
1336 "android.whichdoc online",
1337 "android.hasSamples true",
1338 ],
1339 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001340 args: framework_docs_only_args +
Dirk Dougherty14b05b12019-02-22 20:36:41 -08001341 " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001342 " -samplegroup Background " +
1343 " -samplegroup Connectivity " +
1344 " -samplegroup Content " +
1345 " -samplegroup Input " +
1346 " -samplegroup Media " +
1347 " -samplegroup Notification " +
1348 " -samplegroup RenderScript " +
1349 " -samplegroup Security " +
1350 " -samplegroup Sensors " +
1351 " -samplegroup System " +
1352 " -samplegroup Testing " +
1353 " -samplegroup UI " +
1354 " -samplegroup Views " +
1355 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1356}
1357
1358droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001359 name: "ds-docs-kt",
1360 defaults: ["framework-dokka-docs-default"],
1361 srcs: [
1362 ":framework-doc-stubs",
1363 ],
1364 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1365 "-noStdlibLink",
1366 proofread_file: "ds-dokka-proofread.txt",
1367 dokka_enabled: true,
1368}
1369
1370java_genrule {
1371 name: "ds-docs",
1372 tools: [
1373 "zip2zip",
1374 "merge_zips",
1375 ],
1376 srcs: [
1377 ":ds-docs-java{.docs.zip}",
1378 ":ds-docs-kt{.docs.zip}",
1379 ],
1380 out: ["ds-docs.zip"],
1381 dist: {
1382 targets: ["docs"],
1383 },
1384 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1385 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1386}
1387
1388java_genrule {
1389 name: "ds-docs-switched",
1390 tools: [
1391 "switcher4",
1392 "soong_zip",
1393 ],
1394 srcs: [
1395 ":ds-docs-java{.docs.zip}",
1396 ":ds-docs-kt{.docs.zip}",
1397 ],
1398 out: ["ds-docs-switched.zip"],
1399 dist: {
1400 targets: ["docs"],
1401 },
1402 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1403 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1404 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1405 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1406 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1407}
1408
1409
1410droiddoc {
Nan Zhang3e15ba82018-07-26 18:41:12 +00001411 name: "ds-static-docs",
1412 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001413 srcs: [
1414 ":framework-doc-stubs",
1415 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001416 hdf: [
1417 "android.whichdoc online",
1418 ],
1419 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001420 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001421 " -staticonly " +
1422 " -toroot / " +
1423 " -devsite " +
1424 " -ignoreJdLinks ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001425}
1426
1427droiddoc {
1428 name: "ds-ref-navtree-docs",
1429 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001430 srcs: [
1431 ":framework-doc-stubs",
1432 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001433 hdf: [
1434 "android.whichdoc online",
1435 ],
1436 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001437 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001438 " -toroot / " +
1439 " -atLinksNavtree " +
1440 " -navtreeonly ",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001441}
1442
1443droiddoc {
1444 name: "online-sdk-dev-docs",
1445 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001446 srcs: [
1447 ":framework-doc-stubs",
1448 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001449 hdf: [
1450 "android.whichdoc online",
1451 "android.hasSamples true",
1452 ],
1453 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001454 args: framework_docs_only_args +
Nan Zhang3e15ba82018-07-26 18:41:12 +00001455 " -toroot / -samplegroup Admin " +
1456 " -samplegroup Background " +
1457 " -samplegroup Connectivity " +
1458 " -samplegroup Content " +
1459 " -samplegroup Input " +
1460 " -samplegroup Media " +
1461 " -samplegroup Notification " +
1462 " -samplegroup RenderScript " +
1463 " -samplegroup Security " +
1464 " -samplegroup Sensors " +
1465 " -samplegroup System " +
1466 " -samplegroup Testing " +
1467 " -samplegroup UI " +
1468 " -samplegroup Views " +
1469 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1470}
1471
1472droiddoc {
1473 name: "hidden-docs",
1474 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001475 srcs: [
1476 ":framework-doc-stubs",
1477 ],
Nan Zhang3e15ba82018-07-26 18:41:12 +00001478 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001479 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001480 " -referenceonly " +
1481 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001482}
1483
Nan Zhang7764a4b2018-08-22 11:27:31 -07001484droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001485 name: "hwbinder-stubs-docs",
1486 srcs: [
1487 "core/java/android/os/HidlSupport.java",
1488 "core/java/android/annotation/IntDef.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001489 "core/java/android/annotation/IntRange.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001490 "core/java/android/annotation/NonNull.java",
1491 "core/java/android/annotation/SystemApi.java",
Ytai Ben-Tsvi4659e182019-11-06 09:53:34 -08001492 "core/java/android/os/HidlMemory.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001493 "core/java/android/os/HwBinder.java",
1494 "core/java/android/os/HwBlob.java",
1495 "core/java/android/os/HwParcel.java",
1496 "core/java/android/os/IHwBinder.java",
1497 "core/java/android/os/IHwInterface.java",
1498 "core/java/android/os/DeadObjectException.java",
1499 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001500 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001501 "core/java/android/os/RemoteException.java",
1502 "core/java/android/util/AndroidException.java",
1503 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001504 installable: false,
Paul Duffin8fcace42019-06-12 13:47:18 +01001505 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001506 annotations_enabled: true,
Jeff Gaston6855f1d2019-10-09 18:37:18 -04001507 previous_api: ":last-released-public-api",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001508 merge_annotations_dirs: [
1509 "metalava-manual",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001510 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001511 args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
Colin Crossa2b78a72018-03-29 13:31:04 -07001512}
1513
1514java_library_static {
1515 name: "hwbinder.stubs",
1516 sdk_version: "core_current",
1517 srcs: [
1518 ":hwbinder-stubs-docs",
1519 ],
1520}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001521
Nan Zhang894c9ec2018-09-10 18:58:39 -07001522droidstubs {
Nan Zhangd25ad462018-08-22 10:48:15 -07001523 name: "hiddenapi-lists-docs",
1524 defaults: ["metalava-api-stubs-default"],
David Brazdil4f9d4d52018-04-26 14:05:13 +01001525 arg_files: [
1526 "core/res/AndroidManifest.xml",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001527 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001528 dex_api_filename: "public-dex.txt",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001529 private_dex_api_filename: "private-dex.txt",
1530 removed_dex_api_filename: "removed-dex.txt",
Nan Zhangd25ad462018-08-22 10:48:15 -07001531 args: metalava_framework_docs_args +
1532 " --show-unannotated " +
Jiyong Park119afc02019-12-04 17:17:48 +09001533 " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001534 " --show-annotation android.annotation.TestApi ",
David Brazdil4f9d4d52018-04-26 14:05:13 +01001535}
1536
Nan Zhang7764a4b2018-08-22 11:27:31 -07001537droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001538 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001539 defaults: ["metalava-api-stubs-default"],
Jiyong Park68020f82019-08-23 20:36:58 +09001540 srcs: [
Andrei Onea6dd843a2019-03-13 15:27:23 +00001541 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001542 ],
Jiyong Park20426532019-08-19 15:24:49 +09001543
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001544 arg_files: [
1545 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001546 ],
1547 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001548 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001549 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001550 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001551 " --show-unannotated " +
Jiyong Park119afc02019-12-04 17:17:48 +09001552 " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001553 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001554}
1555
Nan Zhang894c9ec2018-09-10 18:58:39 -07001556droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001557 name: "api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001558 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001559 api_filename: "public_api.txt",
1560 private_api_filename: "private.txt",
1561 removed_api_filename: "removed.txt",
1562 arg_files: [
1563 "core/res/AndroidManifest.xml",
1564 ],
1565 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001566 check_api: {
1567 current: {
1568 api_file: "api/current.txt",
1569 removed_api_file: "api/removed.txt",
1570 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001571 last_released: {
1572 api_file: ":last-released-public-api",
1573 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001574 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001575 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001576 api_lint: {
1577 enabled: true,
1578 new_since: ":last-released-public-api",
1579 baseline_file: "api/lint-baseline.txt",
1580 },
Nan Zhange5612602018-08-16 16:16:00 -07001581 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001582 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001583}
1584
Nan Zhang894c9ec2018-09-10 18:58:39 -07001585droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001586 name: "system-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001587 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001588 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001589 api_filename: "system-api.txt",
1590 private_api_filename: "system-private.txt",
1591 private_dex_api_filename: "system-private-dex.txt",
1592 removed_api_filename: "system-removed.txt",
1593 arg_files: [
1594 "core/res/AndroidManifest.xml",
1595 ],
Jiyong Park119afc02019-12-04 17:17:48 +09001596 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS,process=android.annotation.SystemApi.Process.ALL\\)",
Nan Zhange5612602018-08-16 16:16:00 -07001597 check_api: {
1598 current: {
1599 api_file: "api/system-current.txt",
1600 removed_api_file: "api/system-removed.txt",
1601 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001602 last_released: {
1603 api_file: ":last-released-system-api",
1604 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001605 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001606 },
Adrian Roos51c34e82019-10-12 17:46:15 +02001607 api_lint: {
1608 enabled: true,
1609 new_since: ":last-released-system-api",
1610 baseline_file: "api/system-lint-baseline.txt",
1611 },
Nan Zhange5612602018-08-16 16:16:00 -07001612 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001613 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001614}
1615
Nan Zhang894c9ec2018-09-10 18:58:39 -07001616droidstubs {
Nan Zhang4d3f5012018-08-07 13:40:33 -07001617 name: "test-api-stubs-docs",
Nan Zhang3e15ba82018-07-26 18:41:12 +00001618 defaults: ["metalava-api-stubs-default"],
Nan Zhang4d3f5012018-08-07 13:40:33 -07001619 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001620 api_filename: "test-api.txt",
1621 removed_api_filename: "test-removed.txt",
1622 arg_files: [
1623 "core/res/AndroidManifest.xml",
1624 ],
1625 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001626 check_api: {
1627 current: {
1628 api_file: "api/test-current.txt",
1629 removed_api_file: "api/test-removed.txt",
1630 },
Adrian Roos7c68a4022019-10-31 16:54:47 +01001631 api_lint: {
1632 enabled: true,
1633 baseline_file: "api/test-lint-baseline.txt",
1634 },
Nan Zhange5612602018-08-16 16:16:00 -07001635 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001636}
Nan Zhangaf251302018-08-30 10:59:51 -07001637
1638filegroup {
1639 name: "framework-annotation-nonnull-srcs",
1640 srcs: [
1641 "core/java/android/annotation/NonNull.java",
1642 ],
1643}
Insun Kang06b25ae2018-11-20 10:05:44 +09001644
1645filegroup {
1646 name: "framework-media-annotation-srcs",
1647 srcs: [
1648 "core/java/android/annotation/CallbackExecutor.java",
Insun Kangf86a56c2019-01-22 17:16:07 +09001649 "core/java/android/annotation/CallSuper.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001650 "core/java/android/annotation/DrawableRes.java",
1651 "core/java/android/annotation/IntDef.java",
1652 "core/java/android/annotation/LongDef.java",
1653 "core/java/android/annotation/NonNull.java",
1654 "core/java/android/annotation/Nullable.java",
1655 "core/java/android/annotation/RequiresPermission.java",
1656 "core/java/android/annotation/SdkConstant.java",
1657 "core/java/android/annotation/StringDef.java",
Sungsoo Limbb3b4012019-01-23 13:17:53 +09001658 "core/java/android/annotation/SystemApi.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001659 "core/java/android/annotation/TestApi.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001660 "core/java/android/annotation/UnsupportedAppUsage.java",
Dongwon Kang3584c662018-11-27 11:14:08 -08001661 "core/java/com/android/internal/annotations/GuardedBy.java",
Insun Kang06b25ae2018-11-20 10:05:44 +09001662 ],
1663}
1664
Andrei Onea7a2985c2019-02-18 15:28:35 +00001665// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1666// annotations to private apis
1667aidl_mapping {
1668 name: "framework-aidl-mappings",
Jiyong Parkae9972b2019-09-15 20:19:02 +09001669 srcs: [":framework-all-sources"],
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001670 output: "framework-aidl-mappings.txt",
Kyunglyul Hyund51666d2019-04-11 04:08:40 +00001671}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001672
1673genrule {
1674 name: "framework-annotation-proc-index",
Jiyong Park97183492019-11-14 03:07:36 +00001675 srcs: [":framework-annotation-proc"],
Anna Trostanetski97088e92019-06-26 14:47:58 +01001676 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1677 out: ["unsupportedappusage_index.csv"],
1678 dist: {
1679 targets: ["droidcore"],
1680 },
1681}
Chen Xu192bf1f2019-09-05 22:07:42 -07001682
1683// Avoid including Parcelable classes as we don't want to have two copies of
1684// Parcelable cross the process.
1685filegroup {
1686 name: "framework-telephony-stack-shared-srcs",
1687 srcs: [
1688 "core/java/android/os/RegistrantList.java",
1689 "core/java/android/os/Registrant.java",
1690 "core/java/android/util/LocalLog.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001691 "core/java/android/util/TimeUtils.java",
1692 "core/java/com/android/internal/os/SomeArgs.java",
Meng Wang9c2a8e02019-12-13 16:45:34 -08001693 "core/java/com/android/internal/util/AsyncChannel.java",
1694 "core/java/com/android/internal/util/BitwiseInputStream.java",
Michelebadc0212019-10-31 11:48:43 -07001695 "core/java/com/android/internal/util/FastXmlSerializer.java",
1696 "core/java/com/android/internal/util/HexDump.java",
Meng Wang64fffb92019-12-02 10:42:20 -08001697 "core/java/com/android/internal/util/IState.java",
Michelebadc0212019-10-31 11:48:43 -07001698 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001699 "core/java/com/android/internal/util/Preconditions.java",
1700 "core/java/com/android/internal/util/State.java",
1701 "core/java/com/android/internal/util/StateMachine.java",
Michelebadc0212019-10-31 11:48:43 -07001702 "core/java/com/android/internal/util/UserIcons.java",
Chen Xu192bf1f2019-09-05 22:07:42 -07001703 ],
1704}
1705
Chen Xu4fea79c2019-10-08 18:39:03 -07001706// Avoid including Parcelable classes as we don't want to have two copies of
1707// Parcelable cross the process.
1708filegroup {
1709 name: "framework-cellbroadcast-shared-srcs",
1710 srcs: [
Jordan Liu15a72742019-11-20 13:55:18 -08001711 "core/java/android/os/HandlerExecutor.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001712 "core/java/android/util/LocalLog.java",
Jordan Liu15a72742019-11-20 13:55:18 -08001713 "core/java/com/android/internal/util/IState.java",
1714 "core/java/com/android/internal/util/Preconditions.java",
Chen Xu4fea79c2019-10-08 18:39:03 -07001715 "core/java/com/android/internal/util/State.java",
1716 "core/java/com/android/internal/util/StateMachine.java",
1717 ],
atrostce84de02019-10-08 16:16:47 +01001718}
Roshan Pius09de13e2019-10-16 13:16:04 -07001719
1720filegroup {
Jayachandran Ceeffa012019-10-23 18:06:33 -07001721 name: "framework-ims-common-shared-srcs",
1722 srcs: [
Jayachandran Ceeffa012019-10-23 18:06:33 -07001723 "core/java/android/os/RegistrantList.java",
1724 "core/java/android/os/Registrant.java",
1725 "core/java/com/android/internal/os/SomeArgs.java",
1726 "core/java/com/android/internal/util/Preconditions.java",
1727 ],
1728}
1729
1730filegroup {
Roshan Pius62eb61c2019-12-06 13:49:47 -08001731 name: "framework-wifi-service-shared-srcs",
Roshan Pius09de13e2019-10-16 13:16:04 -07001732 srcs: [
1733 ":framework-annotations",
Roshan Piusc93cd7a2019-12-09 07:39:41 -08001734 "core/java/android/net/InterfaceConfiguration.java",
1735 "core/java/android/os/HandlerExecutor.java",
Roshan Pius04769a52019-12-04 13:03:47 -08001736 "core/java/android/util/BackupUtils.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001737 "core/java/android/util/LocalLog.java",
1738 "core/java/android/util/Rational.java",
Roshan Pius09de13e2019-10-16 13:16:04 -07001739 "core/java/com/android/internal/util/FastXmlSerializer.java",
1740 "core/java/com/android/internal/util/HexDump.java",
1741 "core/java/com/android/internal/util/IState.java",
1742 "core/java/com/android/internal/util/MessageUtils.java",
1743 "core/java/com/android/internal/util/Preconditions.java",
1744 "core/java/com/android/internal/util/State.java",
1745 "core/java/com/android/internal/util/StateMachine.java",
1746 "core/java/com/android/internal/util/WakeupMessage.java",
1747 "core/java/com/android/internal/util/XmlUtils.java",
1748 ],
1749}