blob: 36ed8656cfbc0b4aabd577ebffae30a90fe05c93 [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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080028package {
29 default_applicable_licenses: ["frameworks_base_license"],
30}
31
32// Added automatically by a large-scale-change that took the approach of
33// 'apply every license found to every target'. While this makes sure we respect
34// every license restriction, it may not be entirely correct.
35//
36// e.g. GPL in an MIT project might only apply to the contrib/ directory.
37//
38// Please consider splitting the single license below into multiple licenses,
39// taking care not to lose any license_kind information, and overriding the
40// default license using the 'licenses: [...]' property on targets as needed.
41//
42// For unused files, consider creating a 'fileGroup' with "//visibility:private"
43// to attach the license to, and including a comment whether the files may be
44// used in the current project.
45// See: http://go/android-license-faq
46license {
47 name: "frameworks_base_license",
48 visibility: [":__subpackages__"],
49 license_kinds: [
50 "SPDX-license-identifier-Apache-2.0",
51 "SPDX-license-identifier-BSD",
52 "SPDX-license-identifier-CC-BY",
53 "SPDX-license-identifier-CPL-1.0",
54 "SPDX-license-identifier-GPL",
55 "SPDX-license-identifier-GPL-2.0",
56 "SPDX-license-identifier-MIT",
57 "SPDX-license-identifier-Unicode-DFS",
58 "SPDX-license-identifier-W3C",
59 "legacy_unencumbered",
60 ],
61 license_text: [
62 "NOTICE",
63 ],
64}
65
Artur Satayev3cc3fa42019-08-02 16:42:07 +010066filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +090067 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090068 srcs: [
69 // Java/AIDL sources under frameworks/base
Chris Wailesc6360da2021-03-31 16:10:29 -070070 ":framework-annotations",
Sudheer Shankaf5b36962019-10-04 16:16:13 -070071 ":framework-blobstore-sources",
Junyu Laid82296c2021-12-07 08:25:31 +000072 ":framework-connectivity-tiramisu-sources",
Jiyong Park20426532019-08-19 15:24:49 +090073 ":framework-core-sources",
74 ":framework-drm-sources",
Alec Mourief37c242020-03-02 21:38:09 +000075 ":framework-graphics-nonupdatable-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +090076 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +090077 ":framework-keystore-sources",
David Zeuthen045b6de2019-10-29 15:15:18 -040078 ":framework-identity-sources",
Jiyong Park20426532019-08-19 15:24:49 +090079 ":framework-location-sources",
80 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +090081 ":framework-mca-effect-sources",
82 ":framework-mca-filterfw-sources",
83 ":framework-mca-filterpacks-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +090084 ":framework-media-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -070085 ":framework-mms-sources",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +000086 ":framework-omapi-sources",
Jiyong Park20426532019-08-19 15:24:49 +090087 ":framework-opengl-sources",
88 ":framework-rs-sources",
89 ":framework-sax-sources",
90 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -070091 ":framework-telephony-common-sources",
Malcolm Chenfbc5c362020-03-16 15:28:35 -070092 ":framework-telephony-sources",
Benedict Wong26497362020-08-10 17:54:33 -070093 ":framework-vcn-util-sources",
David Su130441b2019-12-14 21:37:20 -080094 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -080095 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090096 ":PacProcessor-aidl-sources",
97 ":ProxyHandler-aidl-sources",
Aaron Huangc4081b22020-01-13 15:03:35 +080098 ":net-utils-framework-common-srcs",
Jiyong Parkb3609312019-08-16 21:17:14 +090099
atrost87488352019-10-10 19:27:31 +0100100 // AIDL from frameworks/base/native/
101 ":platform-compat-native-aidl",
102
Jiyong Park20426532019-08-19 15:24:49 +0900103 // AIDL sources from external directories
Janis Danisevskis23902672021-03-17 11:02:19 -0700104 ":android.hardware.security.keymint-V1-java-source",
105 ":android.hardware.security.secureclock-V1-java-source",
106 ":android.security.apc-java-source",
107 ":android.security.authorization-java-source",
Janis Danisevskis191b2062021-06-14 14:33:10 -0700108 ":android.security.legacykeystore-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700109 ":android.security.maintenance-java-source",
Tej Singh932f8702021-06-14 23:40:22 -0700110 ":android.security.metrics-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700111 ":android.system.keystore2-V1-java-source",
David Zeuthen045b6de2019-10-29 15:15:18 -0400112 ":credstore_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900113 ":dumpstate_aidl",
114 ":framework_native_aidl",
115 ":gatekeeper_aidl",
116 ":gsiservice_aidl",
Ryan Mitchellfebbc332021-02-12 09:21:52 -0800117 ":idmap2_aidl",
Ryan Mitchell6a2ca782021-01-19 13:51:15 -0800118 ":idmap2_core_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900119 ":incidentcompanion_aidl",
Bernardo Rufino64bbd4b2020-08-19 14:45:30 +0100120 ":inputconstants_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900121 ":installd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900122 ":libaudioclient_aidl",
123 ":libbinder_aidl",
124 ":libbluetooth-binder-aidl",
125 ":libcamera_client_aidl",
126 ":libcamera_client_framework_aidl",
127 ":libupdate_engine_aidl",
Amy Zhangccdbc4d2020-06-08 21:29:59 -0700128 ":resourcemanager_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900129 ":storaged_aidl",
130 ":vold_aidl",
Kriti Dangaf977732021-02-25 18:07:34 +0100131 ":deviceproductinfoconstants_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900132
Jiyong Park20426532019-08-19 15:24:49 +0900133 // For the generated R.java and Manifest.java
134 ":framework-res{.aapt.srcjar}",
135
136 // etc.
137 ":framework-javastream-protos",
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800138 ":statslog-framework-java-gen", // FrameworkStatsLog.java
Hayden Gomes24b336f2020-11-05 16:28:21 -0800139 ":audio_policy_configuration_V7_0",
Jiyong Park20426532019-08-19 15:24:49 +0900140 ],
141}
Jiyong Park1cc95662019-08-07 22:45:07 +0900142
Anton Hanssone996d432020-03-07 11:40:10 +0000143java_library {
144 name: "framework-updatable-stubs-module_libs_api",
145 static_libs: [
Yan Yan1357a422021-02-03 16:07:30 -0800146 "android.net.ipsec.ike.stubs.module_lib",
Anton Hansson25a0a2b2020-10-08 13:43:48 +0100147 "framework-appsearch.stubs.module_lib",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000148 "framework-connectivity.stubs.module_lib",
Paul Duffin4e006622020-05-31 16:55:13 +0100149 "framework-graphics.stubs.module_lib",
Paul Duffin8b864fb2020-05-31 11:35:50 +0100150 "framework-media.stubs.module_lib",
151 "framework-mediaprovider.stubs.module_lib",
152 "framework-permission.stubs.module_lib",
Hai Zhang591e1212021-01-21 12:48:43 -0800153 "framework-permission-s.stubs.module_lib",
Gavin Corkery338545d2021-02-15 20:22:58 +0000154 "framework-scheduling.stubs.module_lib",
Paul Duffin8b864fb2020-05-31 11:35:50 +0100155 "framework-sdkextensions.stubs.module_lib",
156 "framework-statsd.stubs.module_lib",
157 "framework-tethering.stubs.module_lib",
158 "framework-wifi.stubs.module_lib",
Anton Hanssone996d432020-03-07 11:40:10 +0000159 ],
160 sdk_version: "module_current",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100161 visibility: ["//visibility:private"],
162}
163
164java_library {
165 name: "framework-all",
166 installable: false,
167 static_libs: [
Yan Yan1357a422021-02-03 16:07:30 -0800168 "android.net.ipsec.ike.impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100169 "framework-minus-apex",
Anton Hansson25a0a2b2020-10-08 13:43:48 +0100170 "framework-appsearch.impl",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000171 "framework-connectivity.impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100172 "framework-graphics.impl",
173 "framework-mediaprovider.impl",
174 "framework-permission.impl",
Hai Zhang591e1212021-01-21 12:48:43 -0800175 "framework-permission-s.impl",
Gavin Corkery338545d2021-02-15 20:22:58 +0000176 "framework-scheduling.impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100177 "framework-sdkextensions.impl",
178 "framework-statsd.impl",
179 "framework-tethering.impl",
180 "framework-wifi.impl",
181 "updatable-media",
182 ],
183 apex_available: ["//apex_available:platform"],
184 sdk_version: "core_platform",
185 visibility: [
186 // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
187 "//external/robolectric-shadows:__subpackages__",
188 "//frameworks/layoutlib:__subpackages__",
189 ],
Anton Hanssone996d432020-03-07 11:40:10 +0000190}
191
Jiyong Park392729f2020-01-17 16:32:53 +0900192// AIDL files under these paths are mixture of public and private ones.
193// They shouldn't be exported across module boundaries.
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100194java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700195 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700196 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900197 export_include_dirs: [
198 "core/java",
199 "drm/java",
200 "graphics/java",
David Zeuthen045b6de2019-10-29 15:15:18 -0400201 "identity/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900202 "keystore/java",
203 "location/java",
204 "lowpan/java",
205 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900206 "media/mca/effect/java",
207 "media/mca/filterfw/java",
208 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700209 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900210 "opengl/java",
211 "rs/java",
212 "sax/java",
213 "telecomm/java",
Anton Hanssone996d432020-03-07 11:40:10 +0000214
Sungsoo Lim895f4f62020-04-08 11:21:36 +0900215 "apex/media/aidl/stable",
Anton Hanssone996d432020-03-07 11:40:10 +0000216 // TODO(b/147699819): remove this
217 "telephony/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900218 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700219 },
220}
221
Jiyong Park20426532019-08-19 15:24:49 +0900222// Collection of classes that are generated from non-Java files that are not listed in
223// framework_srcs. These have no or very limited dependency to the framework.
224java_library {
225 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800226 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100227 "apex_aidl_interface-java",
Samiul Islambdbf40e2021-08-26 11:41:37 +0100228 "packagemanager_aidl-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800229 "framework-protos",
Peiyong Linb967a4c2020-07-27 22:16:13 -0700230 "updatable-driver-protos",
Kelvin Zhanga48c18e2021-04-12 17:23:51 -0400231 "ota_metadata_proto_java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800232 "android.hidl.base-V1.0-java",
233 "android.hardware.cas-V1.0-java",
Henry Fang43cab922019-12-27 16:50:20 -0800234 "android.hardware.cas-V1.1-java",
235 "android.hardware.cas-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800236 "android.hardware.contexthub-V1.0-java",
Anthony Stange521a9052020-02-07 18:45:47 -0500237 "android.hardware.contexthub-V1.1-java",
Arthur Ishiguro8368e942020-10-14 13:39:09 -0700238 "android.hardware.contexthub-V1.2-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800239 "android.hardware.gnss-V1.0-java",
Yu-Han Yangad03c472020-01-14 15:31:01 -0800240 "android.hardware.gnss-V2.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800241 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800242 "android.hardware.radio-V1.0-java",
243 "android.hardware.radio-V1.1-java",
244 "android.hardware.radio-V1.2-java",
245 "android.hardware.radio-V1.3-java",
246 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800247 "android.hardware.radio-V1.5-java",
Daniel Bright8b4502e2020-09-02 17:10:54 -0700248 "android.hardware.radio-V1.6-java",
Sarah Chin80b8c7f2021-09-29 12:13:27 -0700249 "android.hardware.radio.data-V1-java",
250 "android.hardware.radio.messaging-V1-java",
251 "android.hardware.radio.modem-V1-java",
252 "android.hardware.radio.network-V1-java",
253 "android.hardware.radio.sim-V1-java",
254 "android.hardware.radio.voice-V1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800255 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800256 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700257 "android.hardware.thermal-V1.1-java",
258 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800259 "android.hardware.tv.input-V1.0-java-constants",
shubang7e849b02019-10-18 19:36:25 -0700260 "android.hardware.tv.tuner-V1.0-java-constants",
Amy Zhangb13e3042020-07-27 14:50:10 -0700261 "android.hardware.tv.tuner-V1.1-java-constants",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800262 "android.hardware.usb-V1.0-java-constants",
263 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800264 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800265 "android.hardware.usb.gadget-V1.0-java",
raychi88254a22020-09-30 19:04:08 +0800266 "android.hardware.usb.gadget-V1.1-java",
267 "android.hardware.usb.gadget-V1.2-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000268 "android.hardware.vibrator-V1.0-java",
269 "android.hardware.vibrator-V1.1-java",
270 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900271 "android.hardware.vibrator-V1.3-java",
Lais Andradeb847d632021-02-23 10:35:27 +0000272 "android.hardware.vibrator-V2-java",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +0000273 "android.se.omapi-V1-java",
Michael Sund5237962020-11-06 03:28:14 +0000274 "android.system.suspend.control.internal-java",
arangelov1ab61492018-11-22 13:56:50 +0000275 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900276
277 "com.android.sysprop.apex",
Nikita Ioffe779d6be2020-02-06 23:17:17 +0000278 "com.android.sysprop.init",
Alexander Mishkovets77f6bc82020-07-14 19:14:10 +0200279 "com.android.sysprop.localization",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900280 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800281 ],
Jiyong Park20426532019-08-19 15:24:49 +0900282 sdk_version: "core_platform",
283 installable: false,
284}
285
Anton Hansson524bf242021-05-25 12:48:58 +0100286// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
287// documentation. Do not remove without consulting the treble/hidl teams.
Anton Hanssondffc59c2021-05-25 11:43:36 +0000288filegroup {
289 name: "framework-jarjar-rules",
290 srcs: ["framework-jarjar-rules.txt"],
Anton Hansson524bf242021-05-25 12:48:58 +0100291 visibility: ["//visibility:public"],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000292}
293
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200294java_defaults {
295 name: "framework-minus-apex-defaults",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100296 defaults: ["framework-aidl-export-defaults"],
297 srcs: [
298 ":framework-non-updatable-sources",
299 "core/java/**/*.logtags",
Daniel Norman653a1c12021-10-25 12:59:47 -0700300 ":apex-info-list",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100301 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100302 aidl: {
303 generate_get_transaction_name: true,
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000304 local_include_dirs: [
305 "media/aidl",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000306 ],
Baligh Uddind65474f2021-05-22 13:11:37 +0000307 include_dirs: [
308 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600309 "frameworks/native/libs/permission/aidl",
Baligh Uddind65474f2021-05-22 13:11:37 +0000310 "packages/modules/Connectivity/framework/aidl-export",
311 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100312 },
313 dxflags: [
314 "--core-library",
315 "--multi-dex",
316 ],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000317 jarjar_rules: ":framework-jarjar-rules",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900318 javac_shard_size: 150,
Anton Hansson5954c6d2020-08-19 14:37:54 +0100319 plugins: [
320 "view-inspector-annotation-processor",
321 "staledataclass-annotation-processor",
322 "error_prone_android_framework",
323 ],
atrostaec9bc12019-08-16 18:14:09 +0100324 required: [
325 "framework-platform-compat-config",
Michal Olechaa5bf3a2021-02-24 16:17:08 +0100326 // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly.
Anton Hansson5954c6d2020-08-19 14:37:54 +0100327 "gps_debug.conf",
Victor Changa4fae272020-10-30 12:14:34 +0000328 "icu4j-platform-compat-config",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100329 "protolog.conf.json.gz",
atrost86895aa2019-08-19 16:51:15 +0100330 "services-platform-compat-config",
Rambo Wang05e55c92021-06-25 11:41:43 -0700331 "TeleService-platform-compat-config",
Ivan Chiang3cb1cbd2020-02-18 10:50:10 +0800332 "documents-ui-compat-config",
Varun Shahf952e66c12020-06-25 11:30:13 -0700333 "calendar-provider-compat-config",
Marcus Hagerott6c681052021-11-12 17:48:47 -0800334 "contacts-provider-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100335 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100336 libs: [
337 "app-compat-annotations",
338 "ext",
339 "framework-updatable-stubs-module_libs_api",
340 "unsupportedappusage",
341 ],
342 sdk_version: "core_platform",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000343 static_libs: [
Daulet Zhanguzin59444d52021-01-25 19:43:53 +0000344 "bouncycastle-repackaged-unbundled",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100345 "framework-internal-utils",
Tobias Thierer82968532019-11-29 19:39:45 +0000346 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
347 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000348 "mimemap",
Ytai Ben-Tsvic3cd3cd2020-10-30 12:34:51 -0700349 "av-types-aidl-java",
Amy Zhang39a3fa42020-12-21 16:56:03 -0800350 "tv_tuner_resource_manager_aidl_interface-java",
Ytai Ben-Tsvida7c21e2020-09-16 13:04:31 -0700351 "soundtrigger_middleware-aidl-java",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700352 "modules-utils-preconditions",
William Escande6b5464c2021-12-16 16:07:55 +0100353 "modules-utils-synchronous-result-receiver",
Chiachang Wang6a555272020-11-02 16:51:24 +0800354 "modules-utils-os",
Svet Ganov4bf102a2021-04-22 20:09:49 +0000355 "framework-permission-aidl-java",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000356 ],
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200357}
358
359java_library {
360 name: "framework-minus-apex",
361 defaults: ["framework-minus-apex-defaults"],
362 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900363 // For backwards compatibility.
364 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900365 apex_available: ["//apex_available:platform"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900366 visibility: [
367 "//frameworks/base",
Jiyong Park634819c2020-02-04 21:20:02 +0900368 // TODO(b/147128803) remove the below lines
Jiyong Park212d2e82020-01-03 21:07:38 +0900369 "//frameworks/base/apex/appsearch/framework",
370 "//frameworks/base/apex/blobstore/framework",
371 "//frameworks/base/apex/jobscheduler/framework",
markchien2c153702020-02-06 19:23:26 +0800372 "//frameworks/base/packages/Tethering/tests/unit",
Baligh Uddinff8ff122020-10-29 02:11:55 +0000373 "//packages/modules/Connectivity/Tethering/tests/unit",
Jiyong Park212d2e82020-01-03 21:07:38 +0900374 ],
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600375 errorprone: {
376 javacflags: [
Jeff Sharkey7cdc3bf2020-10-06 14:55:37 -0600377 "-Xep:AndroidFrameworkBinderIdentity:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600378 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -0600379 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600380 ],
381 },
Jiyong Park911cd4f2019-10-21 14:35:14 +0900382}
383
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200384java_library {
385 name: "framework-minus-apex-intdefs",
386 defaults: ["framework-minus-apex-defaults"],
387 plugins: ["intdef-annotation-processor"],
388}
389
Jiyong Park911cd4f2019-10-21 14:35:14 +0900390// This "framework" module is NOT installed to the device. It's
391// "framework-minus-apex" that gets installed to the device. Note that
392// the filename is still framework.jar (via the stem property) for
393// compatibility reason. The purpose of this module is to provide
394// framework APIs (both public and private) for bundled apps.
395// "framework-minus-apex" can't be used for the purpose because 1)
396// many apps have already hardcoded the name "framework" and
397// 2) it lacks API symbols from updatable modules - as it's clear from
398// its suffix "-minus-apex".
399java_library {
400 name: "framework",
401 defaults: ["framework-aidl-export-defaults"],
402 installable: false, // this lib is a build-only library
403 static_libs: [
Malcolm Chenfbc5c362020-03-16 15:28:35 -0700404 "app-compat-annotations",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900405 "framework-minus-apex",
Anton Hansson25a0a2b2020-10-08 13:43:48 +0100406 "framework-appsearch.impl", // TODO(b/146218515): should be removed
Anton Hanssone996d432020-03-07 11:40:10 +0000407 "framework-updatable-stubs-module_libs_api",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900408 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700409 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900410 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700411}
412
atrostb9c34502019-08-05 12:22:18 +0100413platform_compat_config {
Songchun Fand4574b52021-03-02 20:05:57 +0000414 name: "framework-platform-compat-config",
415 src: ":framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100416}
417
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900418filegroup {
evitayane22e47f2019-12-30 16:05:38 -0800419 name: "framework-ike-shared-srcs",
Baligh Uddinb7ec5bb2020-05-27 19:22:36 +0000420 visibility: ["//packages/modules/IPsec"],
evitayane22e47f2019-12-30 16:05:38 -0800421 srcs: [
422 "core/java/android/net/annotations/PolicyDirection.java",
evitayane9cc4942020-03-03 17:14:47 -0800423 "core/java/com/android/internal/util/HexDump.java",
Yan Yane7a360f2021-06-10 18:45:39 -0700424 "core/java/com/android/internal/util/WakeupMessage.java",
Yan Yana3e954f2020-11-09 00:09:39 -0800425 "services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
evitayan996aa2a2019-12-30 11:19:47 -0800426 "telephony/java/android/telephony/Annotation.java",
evitayane22e47f2019-12-30 16:05:38 -0800427 ],
428}
429
430filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900431 name: "framework-networkstack-shared-srcs",
432 srcs: [
433 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900434 ":framework-annotations",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700435 ":modules-utils-preconditions-srcs",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900436 "core/java/android/net/DhcpResults.java",
Dmitri Plotnikovf800b702020-05-15 13:49:20 -0700437 "core/java/android/util/IndentingPrintWriter.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900438 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900439 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900440 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900441 "core/java/com/android/internal/util/MessageUtils.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900442 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900443 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800444 "core/java/com/android/internal/util/TokenBucket.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100445 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900446}
447
Colin Crossd8e02252017-10-02 17:14:22 -0700448// Build ext.jar
449// ============================================================
450java_library {
451 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700452 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100453 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700454 static_libs: [
455 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700456 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000457 "rappor",
Colin Crossd8e02252017-10-02 17:14:22 -0700458 ],
459 dxflags: ["--core-library"],
460}
461
David Su511a8142020-01-09 14:02:21 -0800462// utility classes statically linked into framework-wifi and dynamically linked
463// into wifi-service
464java_library {
465 name: "framework-wifi-util-lib",
David Sufd626db2020-11-09 14:31:45 -0800466 sdk_version: "module_current",
467 min_sdk_version: "30",
David Su511a8142020-01-09 14:02:21 -0800468 srcs: [
David Su511a8142020-01-09 14:02:21 -0800469 "core/java/com/android/internal/util/AsyncChannel.java",
470 "core/java/com/android/internal/util/AsyncService.java",
471 "core/java/com/android/internal/util/Protocol.java",
David Su369c9202020-01-09 18:09:56 -0800472 "telephony/java/android/telephony/Annotation.java",
David Su298cd362020-01-17 19:02:49 +0000473 ":net-utils-framework-wifi-common-srcs",
David Su511a8142020-01-09 14:02:21 -0800474 ],
475 libs: [
476 "framework-annotations-lib",
Remi NGUYEN VANf3114972021-03-24 22:59:50 +0900477 "framework-connectivity.stubs.module_lib",
David Su511a8142020-01-09 14:02:21 -0800478 "unsupportedappusage",
David Su511a8142020-01-09 14:02:21 -0800479 ],
David Su57bca312020-04-21 19:49:32 -0700480 visibility: [
481 "//frameworks/base/wifi",
482 "//frameworks/base/services/net",
Baligh Uddin09fdba42020-12-23 22:42:10 +0000483 "//packages/modules/Wifi/framework",
David Su57bca312020-04-21 19:49:32 -0700484 ],
David Su511a8142020-01-09 14:02:21 -0800485}
486
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900487// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
488metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900489 "--hide-package com.android.server " +
Hayden Gomes24b336f2020-11-05 16:28:21 -0800490 "--hide-package android.audio.policy.configuration.V7_0 " +
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900491 "--error UnhiddenSystemApi " +
492 "--hide RequiresPermission " +
493 "--hide CallbackInterface " +
494 "--hide MissingPermission --hide BroadcastBehavior " +
495 "--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
496 "--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
Makoto Onuki451da1c2020-05-26 10:55:53 -0700497 "--error NoSettingsProvider " +
Aurimas Liutikas1f76a5a2019-11-20 17:51:42 -0800498 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
499 "--api-lint-ignore-prefix android.icu. " +
500 "--api-lint-ignore-prefix java. " +
501 "--api-lint-ignore-prefix junit. " +
502 "--api-lint-ignore-prefix org. "
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900503
Anton Hansson76ac4cc2021-05-05 19:22:52 +0100504packages_to_document = [
505 "android",
506 "dalvik",
507 "java",
508 "javax",
509 "junit",
510 "org.apache.http",
511 "org.json",
512 "org.w3c.dom",
513 "org.xml.sax",
514 "org.xmlpull",
515]
516
Anton Hansson77ff72f2021-03-30 10:11:22 +0100517filegroup {
Anton Hansson867f94c2021-05-05 10:32:31 +0100518 name: "android-non-updatable-stub-sources",
Anton Hansson77ff72f2021-03-30 10:11:22 +0100519 srcs: [
Anton Hanssona08dc692021-03-30 10:31:15 +0100520 ":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
Anton Hansson77ff72f2021-03-30 10:11:22 +0100521 ":framework-non-updatable-sources",
522 ":opt-telephony-srcs",
523 ":opt-net-voip-srcs",
524 "core/java/**/*.logtags",
525 "**/package.html",
526 ],
527 visibility: ["//visibility:private"],
528}
529
Anton Hansson867f94c2021-05-05 10:32:31 +0100530// These defaults are used for both the jar stubs and the doc stubs.
531stubs_defaults {
532 name: "android-non-updatable-stubs-defaults",
533 srcs: [":android-non-updatable-stub-sources"],
534 sdk_version: "none",
535 system_modules: "none",
536 java_version: "1.8",
537 arg_files: ["core/res/AndroidManifest.xml"],
538 // TODO(b/147699819): remove below aidl includes.
539 aidl: {
540 local_include_dirs: [
541 "apex/media/aidl/stable",
542 "media/aidl",
Anton Hansson867f94c2021-05-05 10:32:31 +0100543 "telephony/java",
544 ],
Baligh Uddind65474f2021-05-22 13:11:37 +0000545 include_dirs: [
546 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600547 "frameworks/native/libs/permission/aidl",
Baligh Uddind65474f2021-05-22 13:11:37 +0000548 "packages/modules/Connectivity/framework/aidl-export",
549 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100550 },
551 // These are libs from framework-internal-utils that are required (i.e. being referenced)
552 // from framework-non-updatable-sources. Add more here when there's a need.
553 // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
554 // dependencies gets bigger.
555 libs: [
556 "android.hardware.cas-V1.2-java",
557 "android.hardware.health-V1.0-java-constants",
558 "android.hardware.radio-V1.5-java",
559 "android.hardware.radio-V1.6-java",
560 "android.hardware.thermal-V1.0-java-constants",
561 "android.hardware.thermal-V2.0-java",
562 "android.hardware.tv.input-V1.0-java-constants",
563 "android.hardware.tv.tuner-V1.0-java-constants",
564 "android.hardware.tv.tuner-V1.1-java-constants",
565 "android.hardware.usb-V1.0-java-constants",
566 "android.hardware.usb-V1.1-java-constants",
567 "android.hardware.usb.gadget-V1.0-java",
568 "android.hardware.vibrator-V1.3-java",
569 "framework-protos",
Anton Hansson4e86dca2021-05-07 16:32:10 +0100570 "art.module.public.api",
markchiencd813a32021-11-11 00:42:55 +0800571 "sdk_module-lib_current_framework-tethering",
Anton Hansson867f94c2021-05-05 10:32:31 +0100572 // There are a few classes from modules used by the core that
573 // need to be resolved by metalava. We use a prebuilt stub of the
574 // full sdk to ensure we can resolve them. If a new class gets added,
575 // the prebuilts/sdk/current needs to be updated.
576 "sdk_system_current_android",
577 // NOTE: The below can be removed once the prebuilt stub contains IKE.
578 "sdk_system_current_android.net.ipsec.ike",
579 ],
Anton Hansson76ac4cc2021-05-05 19:22:52 +0100580 filter_packages: packages_to_document,
Anton Hansson867f94c2021-05-05 10:32:31 +0100581 high_mem: true, // Lots of sources => high memory use, see b/170701554
582 installable: false,
583 annotations_enabled: true,
584 previous_api: ":android.api.public.latest",
585 merge_annotations_dirs: ["metalava-manual"],
586 defaults_visibility: ["//visibility:private"],
587 visibility: ["//frameworks/base/api"],
588}
589
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900590build = [
591 "StubLibraries.bp",
592 "ApiDocs.bp",
Anton Hansson31fb58b2021-04-12 18:03:12 +0100593 "ProtoLibraries.bp",
Harry Zhangd61699e2021-06-01 16:48:25 -0700594 "TestProtoLibraries.bp",
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900595]