blob: 3c96bc811261e4024c108aad2fee7c0306c89ce9 [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 Satayev005d7352019-08-02 16:42:07 +010028filegroup {
Jiyong Parkd6be5792019-08-16 21:17:14 +090029 name: "framework-core-sources",
Colin Crosscf3a0b52017-11-16 00:15:28 -080030 srcs: [
Colin Crosscf3a0b52017-11-16 00:15:28 -080031 "core/java/**/*.java",
Jiyong Parkd6be5792019-08-16 21:17:14 +090032 "core/java/**/*.aidl",
Artur Satayev005d7352019-08-02 16:42:07 +010033 ],
Jiyong Parkd6be5792019-08-16 21:17:14 +090034 path: "core/java",
Artur Satayev005d7352019-08-02 16:42:07 +010035}
Colin Crosscf3a0b52017-11-16 00:15:28 -080036
Jiyong Parkd6be5792019-08-16 21:17:14 +090037filegroup {
38 name: "framework-drm-sources",
39 srcs: [
40 "drm/java/**/*.java",
41 ],
42 path: "drm/java",
43}
44
45filegroup {
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 {
115 name: "framework-opengl-sources",
116 srcs: [
117 "opengl/java/**/*.java",
118 ],
119 path: "opengl/java",
120}
121
122filegroup {
123 name: "framework-rs-sources",
124 srcs: [
125 "rs/java/**/*.java",
126 ],
127 path: "rs/java",
128}
129
130filegroup {
131 name: "framework-sax-sources",
132 srcs: [
133 "sax/java/**/*.java",
134 ],
135 path: "sax/java",
136}
137
138filegroup {
139 name: "framework-telecomm-sources",
140 srcs: [
141 "telecomm/java/**/*.java",
142 "telecomm/java/**/*.aidl",
143 ],
144 path: "telecomm/java",
145}
146
147filegroup {
148 name: "framework-telephony-sources",
149 srcs: [
150 "telephony/java/**/*.java",
151 "telephony/java/**/*.aidl",
152 ],
153 path: "telephony/java",
154}
155
156filegroup {
157 name: "framework-wifi-sources",
158 srcs: [
159 "wifi/java/**/*.java",
160 "wifi/java/**/*.aidl",
161 ],
162 path: "wifi/java",
163}
164
Jiyong Park90625f12019-08-07 22:45:07 +0900165framework_srcs = [
Jiyong Parkd6be5792019-08-16 21:17:14 +0900166 // Java/AIDL sources under frameworks/base
167 ":framework-core-sources",
168 ":framework-drm-sources",
169 ":framework-graphics-sources",
170 ":framework-keystore-sources",
171 ":framework-location-sources",
172 ":framework-lowpan-sources",
173 ":framework-media-sources",
174 ":framework-mca-effect-sources",
175 ":framework-mca-filterfw-sources",
176 ":framework-mca-filterpacks-sources",
177 ":framework-opengl-sources",
178 ":framework-rs-sources",
179 ":framework-sax-sources",
180 ":framework-telecomm-sources",
181 ":framework-telephony-sources",
182 ":framework-wifi-sources",
183 ":PacProcessor-aidl-sources",
184 ":ProxyHandler-aidl-sources",
Jiyong Park90625f12019-08-07 22:45:07 +0900185
Jiyong Parkd6be5792019-08-16 21:17:14 +0900186 // AIDL sources from external directories
Jiyong Park90625f12019-08-07 22:45:07 +0900187 ":dumpstate_aidl",
188 ":gatekeeper_aidl",
189 ":gsiservice_aidl",
190 ":incidentcompanion_aidl",
191 ":installd_aidl",
192 ":keystore_aidl",
193 ":libaudioclient_aidl",
194 ":libbinder_aidl",
195 ":libbluetooth-binder-aidl",
196 ":libcamera_client_aidl",
197 ":libcamera_client_framework_aidl",
198 ":libupdate_engine_aidl",
199 ":storaged_aidl",
200 ":vold_aidl",
201
202 // etc.
203 "core/java/**/*.logtags",
204 ":framework-javastream-protos",
205 ":framework-statslog-gen",
Jiyong Park90625f12019-08-07 22:45:07 +0900206]
207
Artur Satayev005d7352019-08-02 16:42:07 +0100208java_defaults {
Jiyong Park90625f12019-08-07 22:45:07 +0900209 name: "framework-aidl-export-defaults",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800210 aidl: {
Jiyong Parkd6be5792019-08-16 21:17:14 +0900211 export_include_dirs: [
212 "core/java",
213 "drm/java",
214 "graphics/java",
215 "keystore/java",
216 "location/java",
217 "lowpan/java",
218 "media/java",
219 "media/mca/effect/java",
220 "media/mca/filterfw/java",
221 "media/mca/filterpacks/java",
222 "opengl/java",
223 "rs/java",
224 "sax/java",
225 "telecomm/java",
226 "telephony/java",
227 "wifi/java",
228 ],
Jiyong Park90625f12019-08-07 22:45:07 +0900229 },
230}
Colin Crosscf3a0b52017-11-16 00:15:28 -0800231
Jiyong Park90625f12019-08-07 22:45:07 +0900232java_defaults {
233 name: "framework-defaults",
234 defaults: ["framework-aidl-export-defaults"],
235 installable: true,
Olivier Gaillardb0ea4212018-07-26 11:52:37 +0100236
Jiyong Park90625f12019-08-07 22:45:07 +0900237 srcs: framework_srcs,
238
239 aidl: {
Jiyong Parkd6be5792019-08-16 21:17:14 +0900240 // TODO(b/70046217) remove this by moving the AIDL files into frameworks/base
241 // so that they are referenced via framework-core-sources
242 include_dirs: [
243 "frameworks/native/aidl/binder",
244 "frameworks/native/aidl/gui",
245 ],
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100246 generate_get_transaction_name: true,
Colin Crosscf3a0b52017-11-16 00:15:28 -0800247 },
248
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000249 exclude_srcs: [
Paul Duffina3b69212018-01-25 09:58:32 +0000250 // See comment on framework-atb-backward-compatibility module below
251 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000252 ],
253
Paul Duffin56a34d92019-06-12 13:47:18 +0100254 sdk_version: "core_platform",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800255 libs: [
Colin Crosscf3a0b52017-11-16 00:15:28 -0800256 "ext",
257 ],
258
Steven Moreland19e8d462019-03-08 10:44:22 -0800259 jarjar_rules: ":framework-jarjar-rules",
Steven Moreland20a18482019-01-17 12:24:54 -0800260
Colin Crosscf3a0b52017-11-16 00:15:28 -0800261 static_libs: [
Tobias Thierer53f15f32019-08-18 15:19:45 +0100262 "mimemap",
Dario Frenie186f992018-08-31 14:18:04 +0100263 "apex_aidl_interface-java",
Kalesh Singh759af322019-06-19 12:17:43 -0700264 "suspend_control_aidl_interface-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800265 "framework-protos",
Peiyong Linac74bc82019-01-12 17:44:29 -0800266 "game-driver-protos",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800267 "android.hidl.base-V1.0-java",
268 "android.hardware.cas-V1.0-java",
269 "android.hardware.contexthub-V1.0-java",
270 "android.hardware.health-V1.0-java-constants",
Steven Moreland2f5d7d82019-01-24 12:03:26 -0800271 "android.hardware.radio-V1.0-java",
272 "android.hardware.radio-V1.1-java",
273 "android.hardware.radio-V1.2-java",
274 "android.hardware.radio-V1.3-java",
275 "android.hardware.radio-V1.4-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800276 "android.hardware.thermal-V1.0-java-constants",
277 "android.hardware.tv.input-V1.0-java-constants",
278 "android.hardware.usb-V1.0-java-constants",
279 "android.hardware.usb-V1.1-java-constants",
Steven Moreland2f5d7d82019-01-24 12:03:26 -0800280 "android.hardware.usb.gadget-V1.0-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000281 "android.hardware.vibrator-V1.0-java",
282 "android.hardware.vibrator-V1.1-java",
283 "android.hardware.vibrator-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800284 "android.hardware.wifi-V1.0-java-constants",
Inseob Kimb7c0cc32019-07-30 18:23:26 +0900285
286 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800287 ],
288
Wei Jia0a8a8f02017-12-05 17:05:29 -0800289 required: [
Anton Hanssonb27f0fa2018-11-27 12:10:30 +0000290 // TODO: remove gps_debug when the build system propagates "required" properly.
291 "gps_debug.conf",
Anton Hanssonb27f0fa2018-11-27 12:10:30 +0000292 // Loaded with System.loadLibrary by android.view.textclassifier
Logan Chien71ddfea2018-02-27 16:43:50 +0800293 "libmedia2_jni",
294 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800295
Colin Crosscf3a0b52017-11-16 00:15:28 -0800296 dxflags: [
297 "--core-library",
298 "--multi-dex",
299 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100300
301}
302
Colin Cross05c9e5c2018-10-26 22:34:06 -0700303filegroup {
Steven Moreland19e8d462019-03-08 10:44:22 -0800304 name: "framework-jarjar-rules",
305 srcs: ["jarjar_rules_hidl.txt"],
306}
307
308filegroup {
Colin Cross05c9e5c2018-10-26 22:34:06 -0700309 name: "libincident_aidl",
310 srcs: [
311 "core/java/android/os/IIncidentManager.aidl",
312 "core/java/android/os/IIncidentReportStatusListener.aidl",
313 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700314 path: "core/java",
Colin Cross05c9e5c2018-10-26 22:34:06 -0700315}
316
317filegroup {
318 name: "statsd_aidl",
319 srcs: [
320 "core/java/android/os/IStatsCompanionService.aidl",
321 "core/java/android/os/IStatsManager.aidl",
322 ],
Dan Willemsen4a498502019-06-05 15:51:24 -0700323 path: "core/java",
Colin Cross05c9e5c2018-10-26 22:34:06 -0700324}
325
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100326java_library {
327 name: "framework",
328 defaults: ["framework-defaults"],
329 javac_shard_size: 150,
atrostb9c34502019-08-05 12:22:18 +0100330 required: [
331 "framework-platform-compat-config",
332 "libcore-platform-compat-config",
atrost86895aa2019-08-19 16:51:15 +0100333 "services-platform-compat-config",
atrostb9c34502019-08-05 12:22:18 +0100334 ],
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100335}
336
337java_library {
338 name: "framework-annotation-proc",
339 defaults: ["framework-defaults"],
Anna Trostanetski97088e92019-06-26 14:47:58 +0100340 installable: false,
atrostb9c34502019-08-05 12:22:18 +0100341 plugins: [
342 "unsupportedappusage-annotation-processor",
343 "compat-changeid-annotation-processor",
344 ],
345}
346
347platform_compat_config {
348 name: "framework-platform-compat-config",
349 prefix: "framework",
350 src: ":framework-annotation-proc",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100351}
352
Paul Duffin521975802019-06-05 10:35:08 +0100353// A library including just UnsupportedAppUsage.java classes.
354//
355// Provided for target so that libraries can use it without depending on
356// the whole of framework or the core platform API.
357//
358// Built for host so that the annotation processor can also use this annotation.
359java_library {
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100360 name: "unsupportedappusage-annotation",
Paul Duffin521975802019-06-05 10:35:08 +0100361 host_supported: true,
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100362 srcs: [
363 "core/java/android/annotation/IntDef.java",
364 "core/java/android/annotation/UnsupportedAppUsage.java",
Andrei Onea5e226142019-05-08 13:50:16 +0100365 ":unsupportedappusage_annotation_files",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100366 ],
Paul Duffin521975802019-06-05 10:35:08 +0100367
368 sdk_version: "core_current",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800369}
370
Paul Duffinbeee5dc2018-01-23 13:39:00 +0000371// A temporary build target that is conditionally included on the bootclasspath if
Paul Duffina3b69212018-01-25 09:58:32 +0000372// android.test.base library has been removed and which provides support for
373// maintaining backwards compatibility for APKs that target pre-P and depend on
374// android.test.base classes. This is used iff REMOVE_ATB_FROM_BCP=true is
375// specified on the build command line.
376java_library {
377 name: "framework-atb-backward-compatibility",
Paul Duffinfab87542019-02-15 11:39:12 +0000378 installable: true,
Paul Duffina3b69212018-01-25 09:58:32 +0000379 srcs: [
380 "core/java/android/content/pm/AndroidTestBaseUpdater.java",
381 ],
382}
383
Colin Crosscf3a0b52017-11-16 00:15:28 -0800384genrule {
385 name: "framework-statslog-gen",
386 tools: ["stats-log-api-gen"],
387 cmd: "$(location stats-log-api-gen) --java $(out)",
David Chen0a368b22017-12-06 16:28:16 -0800388 out: ["android/util/StatsLogInternal.java"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800389}
390
391gensrcs {
392 name: "framework-javastream-protos",
393 depfile: true,
394
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100395 tool_files: ["tools/genprotos.sh"],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800396 tools: [
397 "aprotoc",
398 "protoc-gen-javastream",
399 "soong_zip",
400 ],
401
Alex Light159799d2018-08-08 07:05:19 -0700402 // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
403 // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
404 // the way sbox rewrites the command. See b/70221552.
405 cmd: "$(location tools/genprotos.sh) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100406 " $(location aprotoc) " +
407 " $(location protoc-gen-javastream) " +
408 " $(location soong_zip) " +
409 " $(genDir) " +
410 " $(depfile) " +
411 " $(in) " +
412 " $(out)",
Yi Jin437aa6e2018-01-10 11:34:26 -0800413 srcs: [
414 "core/proto/**/*.proto",
415 "libs/incident/**/*.proto",
416 ],
Colin Crosscf3a0b52017-11-16 00:15:28 -0800417 output_extension: "srcjar",
418}
419
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900420filegroup {
Chalard Jean95213512019-01-30 21:04:58 +0900421 name: "framework-annotations",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900422 srcs: [
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900423 "core/java/android/annotation/NonNull.java",
424 "core/java/android/annotation/Nullable.java",
425 "core/java/android/annotation/IntDef.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900426 "core/java/android/annotation/IntRange.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900427 "core/java/android/annotation/UnsupportedAppUsage.java",
Remi NGUYEN VAN231b52b2019-01-29 15:38:52 +0900428 "core/java/com/android/internal/annotations/GuardedBy.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900429 "core/java/com/android/internal/annotations/VisibleForTesting.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100430 ],
Chalard Jean95213512019-01-30 21:04:58 +0900431}
432
433filegroup {
Remi NGUYEN VANc094a542018-12-07 16:52:24 +0900434 name: "framework-networkstack-shared-srcs",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900435 srcs: [
436 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900437 ":framework-annotations",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900438 "core/java/android/net/DhcpResults.java",
439 "core/java/android/util/LocalLog.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900440 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900441 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900442 "core/java/com/android/internal/util/IState.java",
443 "core/java/com/android/internal/util/MessageUtils.java",
444 "core/java/com/android/internal/util/Preconditions.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900445 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900446 "core/java/com/android/internal/util/State.java",
447 "core/java/com/android/internal/util/StateMachine.java",
Chalard Jean896245a2019-04-09 11:16:56 +0900448 "core/java/com/android/internal/util/TrafficStatsConstants.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900449 "core/java/com/android/internal/util/WakeupMessage.java",
450 "core/java/android/net/shared/*.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100451 ],
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900452}
453
Colin Crossd8e02252017-10-02 17:14:22 -0700454// Build ext.jar
455// ============================================================
456java_library {
457 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700458 installable: true,
Paul Duffin56a34d92019-06-12 13:47:18 +0100459 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700460 static_libs: [
461 "libphonenumber-platform",
462 "nist-sip",
463 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000464 "rappor",
Nikita Iashchenko7ea2f832019-01-11 18:41:59 +0000465 "libtextclassifier-java",
466 ],
467 required: [
468 "libtextclassifier",
Colin Crossd8e02252017-10-02 17:14:22 -0700469 ],
470 dxflags: ["--core-library"],
471}
472
Andreas Gampe37b07632018-05-17 10:49:26 -0700473// ==== java proto host library ==============================
474java_library_host {
475 name: "platformprotos",
476 srcs: [
477 "cmds/am/proto/instrumentation_data.proto",
478 "core/proto/**/*.proto",
479 "libs/incident/proto/**/*.proto",
480 "cmds/statsd/src/**/*.proto",
481 ],
482 proto: {
483 include_dirs: ["external/protobuf/src"],
484 type: "full",
485 },
486 errorprone: {
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100487 javacflags: ["-Xep:MissingOverride:OFF"], // b/72714520
Andreas Gampe37b07632018-05-17 10:49:26 -0700488 },
489}
490
Colin Cross43214162018-08-20 13:57:24 -0700491// ==== java proto device library (for test only) ==============================
492java_library {
493 name: "platformprotosnano",
494 proto: {
495 type: "nano",
496 output_params: ["store_unknown_fields=true"],
497 include_dirs: ["external/protobuf/src"],
498 },
499
500 sdk_version: "current",
501 srcs: [
502 "core/proto/**/*.proto",
503 "libs/incident/proto/android/os/**/*.proto",
504 ],
505}
506
507// ==== java proto device library (for test only) ==============================
508java_library {
509 name: "platformprotoslite",
510 proto: {
511 type: "lite",
512 include_dirs: ["external/protobuf/src"],
513 },
514
515 srcs: [
516 "core/proto/**/*.proto",
517 "libs/incident/proto/android/os/**/*.proto",
518 ],
519 // Protos have lots of MissingOverride and similar.
520 errorprone: {
521 javacflags: ["-XepDisableAllChecks"],
522 },
523}
524
Colin Crossaa0d4352017-05-02 14:14:56 -0700525// ==== c++ proto device library ==============================
526cc_library {
527 name: "libplatformprotos",
528 host_supported: true,
Colin Crossaa0d4352017-05-02 14:14:56 -0700529 proto: {
530 export_proto_headers: true,
531 include_dirs: ["external/protobuf/src"],
532 },
533
Chih-Hung Hsiehc7edf072017-10-03 09:57:55 -0700534 cflags: [
535 "-Wall",
536 "-Werror",
537 "-Wno-unused-parameter",
538 ],
Joe Onorato62c220b2017-11-18 20:32:56 -0800539
540 srcs: [
541 "core/proto/**/*.proto",
542 "libs/incident/**/*.proto",
Joe Onorato62c220b2017-11-18 20:32:56 -0800543 ],
544
Colin Crossaa0d4352017-05-02 14:14:56 -0700545 target: {
546 host: {
547 proto: {
548 type: "full",
549 },
550 },
551 android: {
552 proto: {
553 type: "lite",
554 },
555 shared: {
Colin Crossaa0d4352017-05-02 14:14:56 -0700556 enabled: false,
557 },
558 },
559 },
Colin Crossaa0d4352017-05-02 14:14:56 -0700560}
561
Yi Jin04625ad2017-10-17 18:29:33 -0700562gensrcs {
563 name: "gen-platform-proto-constants",
564 depfile: true,
565
566 tools: [
567 "aprotoc",
568 "protoc-gen-cppstream",
569 ],
570
571 srcs: [
Kweku Adamseadd1232018-02-05 16:45:13 -0800572 "core/proto/android/os/backtrace.proto",
Kweku Adams59e6fd72017-12-27 15:48:14 -0800573 "core/proto/android/os/batterytype.proto",
Yi Jin0eb22342017-11-06 17:17:27 -0800574 "core/proto/android/os/cpufreq.proto",
Yi Jine2f7f792017-11-01 17:08:27 -0700575 "core/proto/android/os/cpuinfo.proto",
Colin Cross05c9e5c2018-10-26 22:34:06 -0700576 "core/proto/android/os/data.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700577 "core/proto/android/os/kernelwake.proto",
578 "core/proto/android/os/pagetypeinfo.proto",
579 "core/proto/android/os/procrank.proto",
Kweku Adamsf5cc5752017-12-20 17:59:17 -0800580 "core/proto/android/os/ps.proto",
Yi Jin0dfa7522017-11-06 17:43:47 -0800581 "core/proto/android/os/system_properties.proto",
Yi Jin3c034c92017-12-22 17:36:47 -0800582 "core/proto/android/util/event_log_tags.proto",
Colin Cross05c9e5c2018-10-26 22:34:06 -0700583 "core/proto/android/util/log.proto",
Yi Jin04625ad2017-10-17 18:29:33 -0700584 ],
585
586 // Append protoc-gen-cppstream tool's PATH otherwise aprotoc can't find the plugin tool
Yi Jin3c034c92017-12-22 17:36:47 -0800587 cmd: "mkdir -p $(genDir) " +
588 "&& $(location aprotoc) " +
589 " --plugin=$(location protoc-gen-cppstream) " +
590 " --dependency_out=$(depfile) " +
591 " --cppstream_out=$(genDir) " +
592 " -Iexternal/protobuf/src " +
593 " -I . " +
594 " $(in)",
Yi Jin04625ad2017-10-17 18:29:33 -0700595
Logan Chien71ddfea2018-02-27 16:43:50 +0800596 output_extension: "proto.h",
Yi Jin04625ad2017-10-17 18:29:33 -0700597}
598
Dan Albert2a8d9c22016-09-23 15:55:49 -0700599subdirs = [
Yi Jin0a3406f2017-06-22 19:23:11 -0700600 "cmds/*",
Jeff Sharkey0c686e72017-10-23 16:04:31 -0600601 "core/*",
Colin Cross4f8d9e62016-12-01 15:55:00 -0800602 "libs/*",
Colin Cross76de4f62017-05-15 18:10:40 -0700603 "media/*",
Colin Cross747e7c12017-10-24 16:21:22 -0700604 "proto",
Fabien Sanglard19160202017-01-12 14:24:31 -0500605 "tools/*",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700606 "native/android",
Dan Albert7ce8df32016-09-23 16:43:49 -0700607 "native/graphics/jni",
Dan Albert2a8d9c22016-09-23 15:55:49 -0700608]
Svetoslav Ganov74c99832016-12-05 20:07:20 -0800609
610optional_subdirs = [
611 "core/tests/utiltests/jni",
612]
Steven Morelandeddafe92017-10-02 16:58:41 -0700613
Colin Crossa2b78a72018-03-29 13:31:04 -0700614// TODO(b/77285514): remove this once the last few hidl interfaces have been
615// updated to use hwbinder.stubs.
Steven Morelandeddafe92017-10-02 16:58:41 -0700616java_library {
617 name: "hwbinder",
Paul Duffin56a34d92019-06-12 13:47:18 +0100618 sdk_version: "core_platform",
Steven Morelandeddafe92017-10-02 16:58:41 -0700619
620 srcs: [
621 "core/java/android/os/HidlSupport.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800622 "core/java/android/annotation/IntDef.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700623 "core/java/android/annotation/NonNull.java",
Steven Moreland0ff061a2019-03-04 17:56:30 -0800624 "core/java/android/annotation/Nullable.java",
Steven Morelande8e63aa2018-01-10 15:45:36 -0800625 "core/java/android/annotation/SystemApi.java",
Steven Moreland14b9eb62019-01-11 10:19:51 -0800626 "core/java/android/annotation/TestApi.java",
Andrei Oneadcb67732019-03-18 11:37:25 +0000627 "core/java/android/annotation/UnsupportedAppUsage.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700628 "core/java/android/os/HwBinder.java",
629 "core/java/android/os/HwBlob.java",
630 "core/java/android/os/HwParcel.java",
631 "core/java/android/os/IHwBinder.java",
632 "core/java/android/os/IHwInterface.java",
633 "core/java/android/os/DeadObjectException.java",
634 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -0700635 "core/java/android/os/NativeHandle.java",
Steven Morelandeddafe92017-10-02 16:58:41 -0700636 "core/java/android/os/RemoteException.java",
637 "core/java/android/util/AndroidException.java",
638 ],
639
640 dxflags: ["--core-library"],
641 installable: false,
642}
Nan Zhang2db709d2017-11-08 20:48:46 -0800643
644python_defaults {
645 name: "base_default",
646 version: {
647 py2: {
648 enabled: true,
649 embedded_launcher: true,
650 },
651 py3: {
652 enabled: false,
653 embedded_launcher: false,
654 },
655 },
656}
657
658python_binary_host {
659 name: "fontchain_linter",
660 defaults: ["base_default"],
661 main: "tools/fonts/fontchain_linter.py",
662 srcs: [
663 "tools/fonts/fontchain_linter.py",
664 ],
665 libs: [
666 "fontTools",
667 ],
668}
Nan Zhang172875b2018-02-27 11:24:03 -0800669
670// TODO: Don't rely on this list once droiddoc can take a list of packages to document
671frameworks_base_subdirs = [
672 "core/java",
673 "graphics/java",
674 "location/java",
675 "media/java",
676 "media/mca/effect/java",
677 "media/mca/filterfw/java",
678 "media/mca/filterpacks/java",
679 "drm/java",
680 "opengl/java",
681 "sax/java",
682 "telecomm/java",
683 "telephony/java",
684 "wifi/java",
685 "lowpan/java",
686 "keystore/java",
687 "rs/java",
688]
689
690packages_to_document = [
691 "android",
692 "javax/microedition/khronos",
693 "org/apache/http/conn",
694 "org/apache/http/params",
695]
696
Paul Duffin0440e1f2019-02-11 16:13:25 +0000697// Make the api/current.txt file available for use by modules in other
698// directories.
699filegroup {
700 name: "frameworks-base-api-current.txt",
701 srcs: [
702 "api/current.txt",
703 ],
704}
705
Paul Duffincd35de32019-05-30 15:12:47 +0100706// Make the api/system-current.txt file available for use by modules in other
707// directories.
708filegroup {
709 name: "frameworks-base-api-system-current.txt",
710 srcs: [
711 "api/system-current.txt",
712 ],
713}
714
715// Make the api/system-removed.txt file available for use by modules in other
716// directories.
717filegroup {
718 name: "frameworks-base-api-system-removed.txt",
719 srcs: [
720 "api/system-removed.txt",
721 ],
722}
723
Nan Zhang7764a4b2018-08-22 11:27:31 -0700724framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100725 "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
726 "-overview $(location core/java/overview.html) " +
727 // Federate Support Library references against local API file.
728 "-federate SupportLib https://developer.android.com " +
729 "-federationapi SupportLib $(location :current-support-api) "
Nan Zhang172875b2018-02-27 11:24:03 -0800730
Nan Zhang7764a4b2018-08-22 11:27:31 -0700731framework_docs_only_libs = [
Nan Zhang7764a4b2018-08-22 11:27:31 -0700732 "voip-common",
733 "android.test.mock",
734 "android-support-annotations",
735 "android-support-compat",
736 "android-support-core-ui",
737 "android-support-core-utils",
738 "android-support-customtabs",
739 "android-support-design",
740 "android-support-dynamic-animation",
741 "android-support-exifinterface",
742 "android-support-fragment",
743 "android-support-media-compat",
744 "android-support-percent",
745 "android-support-recommendation",
746 "android-support-transition",
747 "android-support-tv-provider",
748 "android-support-v7-cardview",
749 "android-support-v7-gridlayout",
750 "android-support-v7-mediarouter",
751 "android-support-v7-palette",
752 "android-support-v7-preference",
753 "android-support-v13",
754 "android-support-v14-preference",
755 "android-support-v17-leanback",
756 "android-support-v17-preference-leanback",
757 "android-support-wear",
758 "android-support-vectordrawable",
759 "android-support-animatedvectordrawable",
760 "android-support-v7-appcompat",
761 "android-support-v7-recyclerview",
762 "android-support-emoji",
763 "android-support-emoji-appcompat",
764 "android-support-emoji-bundled",
765 "android-support-v8-renderscript",
766 "android-support-multidex",
767 "android-support-multidex-instrumentation",
768]
769
770metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
771 "--hide-package com.android.okhttp " +
772 "--hide-package com.android.org.conscrypt --hide-package com.android.server " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +0100773 "--error UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -0700774 "--hide RequiresPermission " +
775 "--hide MissingPermission --hide BroadcastBehavior " +
776 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
Tobias Thierer8f559412019-05-22 20:17:49 +0100777 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo "
778
779// http://b/129765390 Rewrite links to "platform" or "technotes" folders
780// which are siblings (and thus outside of) {@docRoot}.
781//
782// We have to escape \ as \\ and $ as $$ here because they get resolved by
783// different layers of the build tooling. The arguments are wrapped in '' so
784// that the shell doesn't add yet another level of escaping.
785metalava_framework_docs_args += " --replace-documentation " +
786 // packages whose descendants to apply replacement to (all packages from
787 // libcore/ojluni/src/main/java that contribute to documentation).
788 "com.sun:java:javax:jdk.net:sun " +
789 // regex of the string to replace
790 "'(<a\\s+href\\s?=[\\*\\s]*\")(?:(?:\\{@docRoot\\}/\\.\\./)|(?:(?:\\.\\./)+))((?:platform|technotes).+)\">' " +
791 // replacement (with $1, $2 backreferences to the regex groups)
792 "'$$1https://docs.oracle.com/javase/8/docs/$$2\">' "
Nan Zhang7764a4b2018-08-22 11:27:31 -0700793
794stubs_defaults {
795 name: "framework-doc-stubs-default",
Nan Zhange9a76f72018-07-11 15:19:22 -0700796 srcs: [
797 "test-base/src/**/*.java",
798 ":opt-telephony-srcs",
799 ":opt-net-voip-srcs",
Neil Fullercce7b332019-02-26 12:00:38 +0000800 ":core_public_api_files",
Nan Zhange9a76f72018-07-11 15:19:22 -0700801 "test-mock/src/**/*.java",
802 "test-runner/src/**/*.java",
803 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700804 srcs_lib: "framework",
Nan Zhange9a76f72018-07-11 15:19:22 -0700805 srcs_lib_whitelist_pkgs: packages_to_document,
Nan Zhang7764a4b2018-08-22 11:27:31 -0700806 libs: framework_docs_only_libs,
Nan Zhange9a76f72018-07-11 15:19:22 -0700807 local_sourcepaths: frameworks_base_subdirs,
Nan Zhang7764a4b2018-08-22 11:27:31 -0700808 create_doc_stubs: true,
809 annotations_enabled: true,
810 api_levels_annotations_enabled: true,
811 api_levels_annotations_dirs: [
812 "sdk-dir",
813 "api-versions-jars-dir",
814 ],
815 previous_api: ":last-released-public-api",
816 merge_annotations_dirs: [
817 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +0100818 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700819 ],
820}
821
822doc_defaults {
823 name: "framework-docs-default",
Nan Zhangb03396e2018-10-11 18:06:10 -0700824 libs: framework_docs_only_libs +
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100825 ["stub-annotations"],
Nan Zhange9a76f72018-07-11 15:19:22 -0700826 html_dirs: [
827 "docs/html",
828 ],
829 knowntags: [
830 "docs/knowntags.txt",
831 ":known-oj-tags",
832 ],
833 custom_template: "droiddoc-templates-sdk",
834 resourcesdir: "docs/html/reference/images/",
835 resourcesoutdir: "reference/android/images/",
836 hdf: [
837 "dac true",
838 "sdk.codename O",
839 "sdk.preview.version 1",
840 "sdk.version 7.0",
841 "sdk.rel.id 1",
842 "sdk.preview 0",
843 ],
844 arg_files: [
845 "core/res/AndroidManifest.xml",
Nan Zhange9a76f72018-07-11 15:19:22 -0700846 "core/java/overview.html",
847 ":current-support-api",
Nan Zhange9a76f72018-07-11 15:19:22 -0700848 ],
849 create_stubs: false,
850}
851
Tiem Song730c19b2019-08-26 11:27:27 -0700852doc_defaults {
853 name: "framework-dokka-docs-default",
854 create_stubs: false,
855}
856
Nan Zhang894c9ec2018-09-10 18:58:39 -0700857stubs_defaults {
Nan Zhanga17beeb2018-08-22 10:48:15 -0700858 name: "metalava-api-stubs-default",
859 srcs: [
860 ":opt-telephony-srcs",
861 ":opt-net-voip-srcs",
Neil Fullercce7b332019-02-26 12:00:38 +0000862 ":core_public_api_files",
Nan Zhanga17beeb2018-08-22 10:48:15 -0700863 ],
864 srcs_lib: "framework",
Nan Zhanga17beeb2018-08-22 10:48:15 -0700865 srcs_lib_whitelist_pkgs: packages_to_document,
Nan Zhanga17beeb2018-08-22 10:48:15 -0700866 local_sourcepaths: frameworks_base_subdirs,
867 installable: false,
Nan Zhang894c9ec2018-09-10 18:58:39 -0700868 annotations_enabled: true,
869 previous_api: ":last-released-public-api",
870 merge_annotations_dirs: [
Nan Zhanga17beeb2018-08-22 10:48:15 -0700871 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +0100872 "ojluni-annotated-sdk-stubs",
Nan Zhanga17beeb2018-08-22 10:48:15 -0700873 ],
Nan Zhang40796542018-09-18 10:46:10 -0700874 api_levels_annotations_enabled: true,
875 api_levels_annotations_dirs: [
876 "sdk-dir",
877 "api-versions-jars-dir",
878 ],
Nan Zhanga17beeb2018-08-22 10:48:15 -0700879}
880
Nan Zhang7764a4b2018-08-22 11:27:31 -0700881droidstubs {
882 name: "framework-doc-stubs",
883 defaults: ["framework-doc-stubs-default"],
884 arg_files: [
885 "core/res/AndroidManifest.xml",
886 ],
887 args: metalava_framework_docs_args,
888}
889
890droidstubs {
891 name: "framework-doc-system-stubs",
892 defaults: ["framework-doc-stubs-default"],
893 arg_files: [
894 "core/res/AndroidManifest.xml",
895 ],
896 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi ",
897}
898
Nan Zhange9a76f72018-07-11 15:19:22 -0700899droiddoc {
900 name: "doc-comment-check-docs",
901 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700902 srcs: [
903 ":framework-doc-stubs",
904 ],
905 args: framework_docs_only_args + " -referenceonly -parsecomments",
Nan Zhange9a76f72018-07-11 15:19:22 -0700906 installable: false,
907}
908
909droiddoc {
910 name: "offline-sdk-docs",
911 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700912 srcs: [
913 ":framework-doc-stubs",
914 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700915 hdf: [
916 "android.whichdoc offline",
917 ],
918 proofread_file: "offline-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700919 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"",
Nan Zhange9a76f72018-07-11 15:19:22 -0700920 write_sdk_values: true,
921 static_doc_index_redirect: "docs/docs-preview-index.html",
922}
923
924droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -0700925 // Please sync with android-api-council@ before making any changes for the name property below.
926 // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically.
927 // See b/116221385 for reference.
Nan Zhange9a76f72018-07-11 15:19:22 -0700928 name: "offline-sdk-referenceonly-docs",
929 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700930 srcs: [
931 ":framework-doc-stubs",
932 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700933 hdf: [
934 "android.whichdoc offline",
935 ],
936 proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -0700937 args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly",
Nan Zhange9a76f72018-07-11 15:19:22 -0700938 write_sdk_values: true,
939 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
940 static_doc_properties: "docs/source.properties",
941}
942
943droiddoc {
Nan Zhang963612b2018-09-21 17:16:49 -0700944 // Please sync with android-api-council@ before making any changes for the name property below.
945 // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically.
946 // See b/116221385 for reference.
Nan Zhange9a76f72018-07-11 15:19:22 -0700947 name: "offline-system-sdk-referenceonly-docs",
948 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700949 srcs: [
950 ":framework-doc-system-stubs",
951 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700952 hdf: [
953 "android.whichdoc offline",
954 ],
955 proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100956 args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" +
957 " -offlinemode -title \"Android System SDK\" -referenceonly",
Nan Zhange9a76f72018-07-11 15:19:22 -0700958 write_sdk_values: true,
959 static_doc_index_redirect: "docs/docs-documentation-redirect.html",
960 static_doc_properties: "docs/source.properties",
961}
962
963droiddoc {
964 name: "online-sdk-docs",
965 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700966 srcs: [
967 ":framework-doc-stubs",
968 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700969 hdf: [
970 "android.whichdoc online",
971 "android.hasSamples true",
972 ],
973 proofread_file: "online-sdk-docs-proofrerad.txt",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100974 args: framework_docs_only_args +
Nan Zhange9a76f72018-07-11 15:19:22 -0700975 " -toroot / -samplegroup Admin " +
976 " -samplegroup Background " +
977 " -samplegroup Connectivity " +
978 " -samplegroup Content " +
979 " -samplegroup Input " +
980 " -samplegroup Media " +
981 " -samplegroup Notification " +
982 " -samplegroup RenderScript " +
983 " -samplegroup Security " +
984 " -samplegroup Sensors " +
985 " -samplegroup System " +
986 " -samplegroup Testing " +
987 " -samplegroup UI " +
988 " -samplegroup Views " +
989 " -samplegroup Wearable -samplesdir development/samples/browseable ",
990}
991
992droiddoc {
993 name: "online-system-api-sdk-docs",
994 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -0700995 srcs: [
996 ":framework-doc-system-stubs",
997 ],
Nan Zhange9a76f72018-07-11 15:19:22 -0700998 hdf: [
999 "android.whichdoc online",
1000 "android.hasSamples true",
1001 ],
1002 proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001003 args: framework_docs_only_args +
Nan Zhange9a76f72018-07-11 15:19:22 -07001004 " -referenceonly " +
Nan Zhange9a76f72018-07-11 15:19:22 -07001005 " -title \"Android SDK - Including system APIs.\" " +
1006 " -hide 101 " +
1007 " -hide 104 " +
1008 " -hide 108 " +
1009 " -toroot / -samplegroup Admin " +
1010 " -samplegroup Background " +
1011 " -samplegroup Connectivity " +
1012 " -samplegroup Content " +
1013 " -samplegroup Input " +
1014 " -samplegroup Media " +
1015 " -samplegroup Notification " +
1016 " -samplegroup RenderScript " +
1017 " -samplegroup Security " +
1018 " -samplegroup Sensors " +
1019 " -samplegroup System " +
1020 " -samplegroup Testing " +
1021 " -samplegroup UI " +
1022 " -samplegroup Views " +
1023 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1024 installable: false,
1025}
1026
1027droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001028 name: "ds-docs-java",
Nan Zhange9a76f72018-07-11 15:19:22 -07001029 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001030 srcs: [
1031 ":framework-doc-stubs",
1032 ],
Nan Zhange9a76f72018-07-11 15:19:22 -07001033 hdf: [
1034 "android.whichdoc online",
1035 "android.hasSamples true",
1036 ],
1037 proofread_file: "ds-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001038 args: framework_docs_only_args +
Nan Zhange9a76f72018-07-11 15:19:22 -07001039 " -toroot / -samplegroup Admin " +
1040 " -samplegroup Background " +
1041 " -samplegroup Connectivity " +
1042 " -samplegroup Content " +
1043 " -samplegroup Input " +
1044 " -samplegroup Media " +
1045 " -samplegroup Notification " +
1046 " -samplegroup RenderScript " +
1047 " -samplegroup Security " +
1048 " -samplegroup Sensors " +
1049 " -samplegroup System " +
1050 " -samplegroup Testing " +
1051 " -samplegroup UI " +
1052 " -samplegroup Views " +
1053 " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
1054}
1055
1056droiddoc {
Tiem Song730c19b2019-08-26 11:27:27 -07001057 name: "ds-docs-kt",
1058 defaults: ["framework-dokka-docs-default"],
1059 srcs: [
1060 ":framework-doc-stubs",
1061 ],
1062 args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " +
1063 "-noStdlibLink",
1064 proofread_file: "ds-dokka-proofread.txt",
1065 dokka_enabled: true,
1066}
1067
1068java_genrule {
1069 name: "ds-docs",
1070 tools: [
1071 "zip2zip",
1072 "merge_zips",
1073 ],
1074 srcs: [
1075 ":ds-docs-java{.docs.zip}",
1076 ":ds-docs-kt{.docs.zip}",
1077 ],
1078 out: ["ds-docs.zip"],
1079 dist: {
1080 targets: ["docs"],
1081 },
1082 cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " +
1083 "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip",
1084}
1085
1086java_genrule {
1087 name: "ds-docs-switched",
1088 tools: [
1089 "switcher4",
1090 "soong_zip",
1091 ],
1092 srcs: [
1093 ":ds-docs-java{.docs.zip}",
1094 ":ds-docs-kt{.docs.zip}",
1095 ],
1096 out: ["ds-docs-switched.zip"],
1097 dist: {
1098 targets: ["docs"],
1099 },
1100 cmd: "unzip $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " +
1101 "unzip $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " +
1102 "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " +
1103 "(cd $(genDir)/en/reference && $$SWITCHER --work platform) && " +
1104 "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)",
1105}
1106
1107
1108droiddoc {
Nan Zhange9a76f72018-07-11 15:19:22 -07001109 name: "ds-static-docs",
1110 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001111 srcs: [
1112 ":framework-doc-stubs",
1113 ],
Nan Zhange9a76f72018-07-11 15:19:22 -07001114 hdf: [
1115 "android.whichdoc online",
1116 ],
1117 proofread_file: "ds-static-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001118 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001119 " -staticonly " +
1120 " -toroot / " +
1121 " -devsite " +
1122 " -ignoreJdLinks ",
Nan Zhange9a76f72018-07-11 15:19:22 -07001123}
1124
1125droiddoc {
1126 name: "ds-ref-navtree-docs",
1127 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001128 srcs: [
1129 ":framework-doc-stubs",
1130 ],
Nan Zhange9a76f72018-07-11 15:19:22 -07001131 hdf: [
1132 "android.whichdoc online",
1133 ],
1134 proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001135 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001136 " -toroot / " +
1137 " -atLinksNavtree " +
1138 " -navtreeonly ",
Nan Zhange9a76f72018-07-11 15:19:22 -07001139}
1140
1141droiddoc {
1142 name: "online-sdk-dev-docs",
1143 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001144 srcs: [
1145 ":framework-doc-stubs",
1146 ],
Nan Zhange9a76f72018-07-11 15:19:22 -07001147 hdf: [
1148 "android.whichdoc online",
1149 "android.hasSamples true",
1150 ],
1151 proofread_file: "online-sdk-dev-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001152 args: framework_docs_only_args +
Nan Zhange9a76f72018-07-11 15:19:22 -07001153 " -toroot / -samplegroup Admin " +
1154 " -samplegroup Background " +
1155 " -samplegroup Connectivity " +
1156 " -samplegroup Content " +
1157 " -samplegroup Input " +
1158 " -samplegroup Media " +
1159 " -samplegroup Notification " +
1160 " -samplegroup RenderScript " +
1161 " -samplegroup Security " +
1162 " -samplegroup Sensors " +
1163 " -samplegroup System " +
1164 " -samplegroup Testing " +
1165 " -samplegroup UI " +
1166 " -samplegroup Views " +
1167 " -samplegroup Wearable -samplesdir development/samples/browseable ",
1168}
1169
1170droiddoc {
1171 name: "hidden-docs",
1172 defaults: ["framework-docs-default"],
Nan Zhang7764a4b2018-08-22 11:27:31 -07001173 srcs: [
1174 ":framework-doc-stubs",
1175 ],
Nan Zhange9a76f72018-07-11 15:19:22 -07001176 proofread_file: "hidden-docs-proofrerad.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001177 args: framework_docs_only_args +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001178 " -referenceonly " +
1179 " -title \"Android SDK - Including hidden APIs.\"",
Nan Zhange9a76f72018-07-11 15:19:22 -07001180}
1181
Nan Zhang7764a4b2018-08-22 11:27:31 -07001182droidstubs {
Colin Crossa2b78a72018-03-29 13:31:04 -07001183 name: "hwbinder-stubs-docs",
1184 srcs: [
1185 "core/java/android/os/HidlSupport.java",
1186 "core/java/android/annotation/IntDef.java",
1187 "core/java/android/annotation/NonNull.java",
1188 "core/java/android/annotation/SystemApi.java",
1189 "core/java/android/os/HwBinder.java",
1190 "core/java/android/os/HwBlob.java",
1191 "core/java/android/os/HwParcel.java",
1192 "core/java/android/os/IHwBinder.java",
1193 "core/java/android/os/IHwInterface.java",
1194 "core/java/android/os/DeadObjectException.java",
1195 "core/java/android/os/DeadSystemException.java",
Nirav Atre9850dd92018-07-24 17:03:44 -07001196 "core/java/android/os/NativeHandle.java",
Colin Crossa2b78a72018-03-29 13:31:04 -07001197 "core/java/android/os/RemoteException.java",
1198 "core/java/android/util/AndroidException.java",
1199 ],
Colin Crossa2b78a72018-03-29 13:31:04 -07001200 installable: false,
Paul Duffin56a34d92019-06-12 13:47:18 +01001201 sdk_version: "core_platform",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001202 annotations_enabled: true,
1203 previous_api: ":last-released-public-api",
1204 merge_annotations_dirs: [
1205 "metalava-manual",
Pete Gillinff978192018-09-17 15:45:33 +01001206 "ojluni-annotated-sdk-stubs",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001207 ],
1208 args: " --show-annotation android.annotation.SystemApi",
Colin Crossa2b78a72018-03-29 13:31:04 -07001209}
1210
1211java_library_static {
1212 name: "hwbinder.stubs",
1213 sdk_version: "core_current",
1214 srcs: [
1215 ":hwbinder-stubs-docs",
1216 ],
1217}
Nan Zhanga0f91af2018-04-09 17:41:51 -07001218
Nan Zhang894c9ec2018-09-10 18:58:39 -07001219droidstubs {
Nan Zhanga17beeb2018-08-22 10:48:15 -07001220 name: "hiddenapi-lists-docs",
1221 defaults: ["metalava-api-stubs-default"],
David Brazdil96c9cbc2018-04-26 14:05:13 +01001222 arg_files: [
1223 "core/res/AndroidManifest.xml",
David Brazdil96c9cbc2018-04-26 14:05:13 +01001224 ],
David Brazdil6f6a1262018-05-31 13:58:41 +01001225 dex_api_filename: "public-dex.txt",
David Brazdil96c9cbc2018-04-26 14:05:13 +01001226 private_dex_api_filename: "private-dex.txt",
1227 removed_dex_api_filename: "removed-dex.txt",
Nan Zhanga17beeb2018-08-22 10:48:15 -07001228 args: metalava_framework_docs_args +
1229 " --show-unannotated " +
1230 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001231 " --show-annotation android.annotation.TestApi ",
David Brazdil96c9cbc2018-04-26 14:05:13 +01001232}
1233
Nan Zhang7764a4b2018-08-22 11:27:31 -07001234droidstubs {
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001235 name: "hiddenapi-mappings",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001236 defaults: ["metalava-api-stubs-default"],
Jiyong Park7563aab2019-08-23 20:36:58 +09001237 srcs: [
Paul Duffina0cb5382018-10-31 10:34:51 +00001238 ":non_openjdk_java_files",
Artur Satayev005d7352019-08-02 16:42:07 +01001239 ":openjdk_java_files",
Andrei Oneadd8f37a2019-03-13 15:27:23 +00001240 ":opt-telephony-common-srcs",
Paul Duffina0cb5382018-10-31 10:34:51 +00001241 ],
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001242 arg_files: [
1243 "core/res/AndroidManifest.xml",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001244 ],
1245 dex_mapping_filename: "dex-mapping.txt",
Nan Zhang7764a4b2018-08-22 11:27:31 -07001246 args: metalava_framework_docs_args +
Adrian Roos9bdbd302018-12-07 13:53:40 +01001247 " --hide ReferencesHidden " +
Adrian Roosc6e2fc82018-12-12 15:08:44 +01001248 " --hide UnhiddenSystemApi " +
Nan Zhang7764a4b2018-08-22 11:27:31 -07001249 " --show-unannotated " +
1250 " --show-annotation android.annotation.SystemApi " +
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001251 " --show-annotation android.annotation.TestApi ",
Mathew Inwood0a6a2732018-06-22 15:30:02 +01001252}
1253
Nan Zhanga0f91af2018-04-09 17:41:51 -07001254filegroup {
1255 name: "apache-http-stubs-sources",
1256 srcs: [
1257 "core/java/org/apache/http/conn/ConnectTimeoutException.java",
1258 "core/java/org/apache/http/conn/scheme/HostNameResolver.java",
1259 "core/java/org/apache/http/conn/scheme/LayeredSocketFactory.java",
1260 "core/java/org/apache/http/conn/scheme/SocketFactory.java",
1261 "core/java/org/apache/http/conn/ssl/AbstractVerifier.java",
1262 "core/java/org/apache/http/conn/ssl/AllowAllHostnameVerifier.java",
1263 "core/java/org/apache/http/conn/ssl/AndroidDistinguishedNameParser.java",
1264 "core/java/org/apache/http/conn/ssl/BrowserCompatHostnameVerifier.java",
1265 "core/java/org/apache/http/conn/ssl/SSLSocketFactory.java",
1266 "core/java/org/apache/http/conn/ssl/StrictHostnameVerifier.java",
1267 "core/java/org/apache/http/conn/ssl/X509HostnameVerifier.java",
1268 "core/java/org/apache/http/params/CoreConnectionPNames.java",
1269 "core/java/org/apache/http/params/HttpConnectionParams.java",
1270 "core/java/org/apache/http/params/HttpParams.java",
Nan Zhanga0f91af2018-04-09 17:41:51 -07001271 "core/java/android/net/http/SslCertificate.java",
1272 "core/java/android/net/http/SslError.java",
1273 "core/java/com/android/internal/util/HexDump.java",
1274 ],
1275}
Nan Zhang4212eb12018-04-25 17:23:33 -07001276
Nan Zhang894c9ec2018-09-10 18:58:39 -07001277droidstubs {
Nan Zhangc28a0ac2018-08-07 13:40:33 -07001278 name: "api-stubs-docs",
Nan Zhange9a76f72018-07-11 15:19:22 -07001279 defaults: ["metalava-api-stubs-default"],
Nan Zhang4212eb12018-04-25 17:23:33 -07001280 api_filename: "public_api.txt",
1281 private_api_filename: "private.txt",
1282 removed_api_filename: "removed.txt",
1283 arg_files: [
1284 "core/res/AndroidManifest.xml",
1285 ],
1286 args: metalava_framework_docs_args,
Nan Zhange5612602018-08-16 16:16:00 -07001287 check_api: {
1288 current: {
1289 api_file: "api/current.txt",
1290 removed_api_file: "api/removed.txt",
1291 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001292 last_released: {
1293 api_file: ":last-released-public-api",
1294 removed_api_file: "api/removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001295 baseline_file: ":public-api-incompatibilities-with-last-released",
Nan Zhangcd060d92018-08-20 20:34:26 -07001296 },
Nan Zhange5612602018-08-16 16:16:00 -07001297 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001298 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001299}
1300
Nan Zhang894c9ec2018-09-10 18:58:39 -07001301droidstubs {
Nan Zhangc28a0ac2018-08-07 13:40:33 -07001302 name: "system-api-stubs-docs",
Nan Zhange9a76f72018-07-11 15:19:22 -07001303 defaults: ["metalava-api-stubs-default"],
Nan Zhangc28a0ac2018-08-07 13:40:33 -07001304 api_tag_name: "SYSTEM",
Nan Zhang4212eb12018-04-25 17:23:33 -07001305 api_filename: "system-api.txt",
1306 private_api_filename: "system-private.txt",
1307 private_dex_api_filename: "system-private-dex.txt",
1308 removed_api_filename: "system-removed.txt",
1309 arg_files: [
1310 "core/res/AndroidManifest.xml",
1311 ],
1312 args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi",
Nan Zhange5612602018-08-16 16:16:00 -07001313 check_api: {
1314 current: {
1315 api_file: "api/system-current.txt",
1316 removed_api_file: "api/system-removed.txt",
1317 },
Nan Zhangcd060d92018-08-20 20:34:26 -07001318 last_released: {
1319 api_file: ":last-released-system-api",
1320 removed_api_file: "api/system-removed.txt",
Adrian Roos9597f8c2019-08-12 17:47:39 +02001321 baseline_file: ":system-api-incompatibilities-with-last-released"
Nan Zhangcd060d92018-08-20 20:34:26 -07001322 },
Nan Zhange5612602018-08-16 16:16:00 -07001323 },
Nan Zhang81f29f52018-09-17 14:33:08 -07001324 jdiff_enabled: true,
Nan Zhang4212eb12018-04-25 17:23:33 -07001325}
1326
Nan Zhang894c9ec2018-09-10 18:58:39 -07001327droidstubs {
Nan Zhangc28a0ac2018-08-07 13:40:33 -07001328 name: "test-api-stubs-docs",
Nan Zhange9a76f72018-07-11 15:19:22 -07001329 defaults: ["metalava-api-stubs-default"],
Nan Zhangc28a0ac2018-08-07 13:40:33 -07001330 api_tag_name: "TEST",
Nan Zhang4212eb12018-04-25 17:23:33 -07001331 api_filename: "test-api.txt",
1332 removed_api_filename: "test-removed.txt",
1333 arg_files: [
1334 "core/res/AndroidManifest.xml",
1335 ],
1336 args: metalava_framework_docs_args + " --show-annotation android.annotation.TestApi",
Nan Zhange5612602018-08-16 16:16:00 -07001337 check_api: {
1338 current: {
1339 api_file: "api/test-current.txt",
1340 removed_api_file: "api/test-removed.txt",
1341 },
1342 },
Nan Zhang4212eb12018-04-25 17:23:33 -07001343}
Andrei Oneaae93c8b2019-03-04 16:05:26 +00001344
Nan Zhangaf251302018-08-30 10:59:51 -07001345filegroup {
1346 name: "framework-annotation-nonnull-srcs",
1347 srcs: [
1348 "core/java/android/annotation/NonNull.java",
1349 ],
1350}
Andrei Oneac1d180c2019-03-08 12:34:28 +00001351
Andrei Oneaae93c8b2019-03-04 16:05:26 +00001352// Creates an index of AIDL methods; used for adding UnsupportedAppUsage
1353// annotations to private apis
1354aidl_mapping {
1355 name: "framework-aidl-mappings",
Jiyong Park90625f12019-08-07 22:45:07 +09001356 srcs: framework_srcs,
Tobias Thiererbc05034a2019-05-23 16:20:12 +01001357 output: "framework-aidl-mappings.txt",
junyulai7c469172019-01-16 20:23:34 +08001358}
Anna Trostanetski97088e92019-06-26 14:47:58 +01001359
1360genrule {
1361 name: "framework-annotation-proc-index",
1362 srcs: [":framework-annotation-proc"],
1363 cmd: "unzip -qp $(in) unsupportedappusage/unsupportedappusage_index.csv > $(out)",
1364 out: ["unsupportedappusage_index.csv"],
1365 dist: {
1366 targets: ["droidcore"],
1367 },
1368}