blob: 2bd61a4709c0ff235e81e62223d02cf7c61b0db1 [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
Neha Pattan403eb572021-12-14 02:58:57 +000028// TODO(b/21090328): Remove filter after we are ready to.
29soong_config_module_type {
30 name: "java_library_with_nonpublic_deps",
31 module_type: "java_library",
32 config_namespace: "ANDROID",
33 bool_variables: ["include_nonpublic_framework_api"],
34 properties: [
35 "static_libs",
36 "libs",
37 ],
38}
39
Bob Badour8a6a2bc2021-02-12 17:07:05 -080040package {
41 default_applicable_licenses: ["frameworks_base_license"],
42}
43
44// Added automatically by a large-scale-change that took the approach of
45// 'apply every license found to every target'. While this makes sure we respect
46// every license restriction, it may not be entirely correct.
47//
48// e.g. GPL in an MIT project might only apply to the contrib/ directory.
49//
50// Please consider splitting the single license below into multiple licenses,
51// taking care not to lose any license_kind information, and overriding the
52// default license using the 'licenses: [...]' property on targets as needed.
53//
54// For unused files, consider creating a 'fileGroup' with "//visibility:private"
55// to attach the license to, and including a comment whether the files may be
56// used in the current project.
57// See: http://go/android-license-faq
58license {
59 name: "frameworks_base_license",
60 visibility: [":__subpackages__"],
61 license_kinds: [
62 "SPDX-license-identifier-Apache-2.0",
63 "SPDX-license-identifier-BSD",
64 "SPDX-license-identifier-CC-BY",
Bob Badour8a6a2bc2021-02-12 17:07:05 -080065 "SPDX-license-identifier-MIT",
66 "SPDX-license-identifier-Unicode-DFS",
Bob Badour8a6a2bc2021-02-12 17:07:05 -080067 "legacy_unencumbered",
68 ],
69 license_text: [
70 "NOTICE",
71 ],
72}
73
Artur Satayev3cc3fa42019-08-02 16:42:07 +010074filegroup {
Jiyong Parkae9972b2019-09-15 20:19:02 +090075 name: "framework-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +090076 srcs: [
77 // Java/AIDL sources under frameworks/base
Chris Wailes68f38b22021-03-31 16:10:29 -070078 ":framework-annotations",
Sudheer Shankaf5b36962019-10-04 16:16:13 -070079 ":framework-blobstore-sources",
Junyu Laid82296c2021-12-07 08:25:31 +000080 ":framework-connectivity-tiramisu-sources",
Jiyong Park20426532019-08-19 15:24:49 +090081 ":framework-core-sources",
82 ":framework-drm-sources",
Alec Mourief37c242020-03-02 21:38:09 +000083 ":framework-graphics-nonupdatable-sources",
Jiyong Park48cc3722019-10-21 14:01:06 +090084 ":framework-jobscheduler-sources", // jobscheduler is not a module for R
Jiyong Park20426532019-08-19 15:24:49 +090085 ":framework-keystore-sources",
David Zeuthen045b6de2019-10-29 15:15:18 -040086 ":framework-identity-sources",
Jiyong Park20426532019-08-19 15:24:49 +090087 ":framework-location-sources",
88 ":framework-lowpan-sources",
Jiyong Park20426532019-08-19 15:24:49 +090089 ":framework-mca-effect-sources",
90 ":framework-mca-filterfw-sources",
91 ":framework-mca-filterpacks-sources",
Anton Hansson3b6477f2022-01-17 10:17:15 +000092 ":framework-media-non-updatable-sources",
Amit Mahajan6237a6b2019-10-07 17:41:26 -070093 ":framework-mms-sources",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +000094 ":framework-omapi-sources",
Jiyong Park20426532019-08-19 15:24:49 +090095 ":framework-opengl-sources",
96 ":framework-rs-sources",
97 ":framework-sax-sources",
98 ":framework-telecomm-sources",
Amit Mahajand3551532019-09-23 17:59:57 -070099 ":framework-telephony-common-sources",
Malcolm Chenfbc5c362020-03-16 15:28:35 -0700100 ":framework-telephony-sources",
Benedict Wong26497362020-08-10 17:54:33 -0700101 ":framework-vcn-util-sources",
David Su130441b2019-12-14 21:37:20 -0800102 ":framework-wifi-annotations",
David Su6f646ef2019-12-10 13:33:06 -0800103 ":framework-wifi-non-updatable-sources",
Jiyong Park20426532019-08-19 15:24:49 +0900104 ":PacProcessor-aidl-sources",
105 ":ProxyHandler-aidl-sources",
Aaron Huangc4081b22020-01-13 15:03:35 +0800106 ":net-utils-framework-common-srcs",
Jiyong Parkb3609312019-08-16 21:17:14 +0900107
atrost87488352019-10-10 19:27:31 +0100108 // AIDL from frameworks/base/native/
109 ":platform-compat-native-aidl",
110
Jiyong Park20426532019-08-19 15:24:49 +0900111 // AIDL sources from external directories
Leon Scroggins III73e06892022-01-31 15:47:34 -0500112 ":android.hardware.graphics.common-V3-java-source",
Eran Messeri4be1392292022-02-15 11:12:59 +0000113 ":android.hardware.security.keymint-V2-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700114 ":android.hardware.security.secureclock-V1-java-source",
Hongguang956e6352021-07-20 17:45:28 -0700115 ":android.hardware.tv.tuner-V1-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700116 ":android.security.apc-java-source",
117 ":android.security.authorization-java-source",
Janis Danisevskis191b2062021-06-14 14:33:10 -0700118 ":android.security.legacykeystore-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700119 ":android.security.maintenance-java-source",
Tej Singh932f8702021-06-14 23:40:22 -0700120 ":android.security.metrics-java-source",
Janis Danisevskis23902672021-03-17 11:02:19 -0700121 ":android.system.keystore2-V1-java-source",
David Zeuthen045b6de2019-10-29 15:15:18 -0400122 ":credstore_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900123 ":dumpstate_aidl",
124 ":framework_native_aidl",
125 ":gatekeeper_aidl",
126 ":gsiservice_aidl",
chaviw9d438f92021-05-20 11:18:06 -0500127 ":guiconstants_aidl",
Ryan Mitchellfebbc332021-02-12 09:21:52 -0800128 ":idmap2_aidl",
Ryan Mitchell6a2ca782021-01-19 13:51:15 -0800129 ":idmap2_core_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900130 ":incidentcompanion_aidl",
Bernardo Rufino64bbd4b2020-08-19 14:45:30 +0100131 ":inputconstants_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900132 ":installd_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900133 ":libaudioclient_aidl",
134 ":libbinder_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900135 ":libcamera_client_aidl",
136 ":libcamera_client_framework_aidl",
137 ":libupdate_engine_aidl",
Wenhao Wang256519a2022-01-11 22:29:18 -0800138 ":logd_aidl",
Amy Zhangccdbc4d2020-06-08 21:29:59 -0700139 ":resourcemanager_aidl",
Jiyong Park20426532019-08-19 15:24:49 +0900140 ":storaged_aidl",
141 ":vold_aidl",
Kriti Dangaf977732021-02-25 18:07:34 +0100142 ":deviceproductinfoconstants_aidl",
Jiyong Park1cc95662019-08-07 22:45:07 +0900143
Jiyong Park20426532019-08-19 15:24:49 +0900144 // For the generated R.java and Manifest.java
145 ":framework-res{.aapt.srcjar}",
146
147 // etc.
148 ":framework-javastream-protos",
Muhammad Qureshi04ec2522020-01-27 16:36:45 -0800149 ":statslog-framework-java-gen", // FrameworkStatsLog.java
Hayden Gomes24b336f2020-11-05 16:28:21 -0800150 ":audio_policy_configuration_V7_0",
Jiyong Park20426532019-08-19 15:24:49 +0900151 ],
152}
Jiyong Park1cc95662019-08-07 22:45:07 +0900153
Neha Pattan403eb572021-12-14 02:58:57 +0000154java_library_with_nonpublic_deps {
Anton Hansson2d6c4272020-08-18 12:52:44 +0100155 name: "framework-all",
156 installable: false,
157 static_libs: [
Anton Hansson23274ee2022-01-28 11:31:50 +0000158 "all-framework-module-impl",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100159 "framework-minus-apex",
Anton Hansson2d6c4272020-08-18 12:52:44 +0100160 ],
161 apex_available: ["//apex_available:platform"],
162 sdk_version: "core_platform",
163 visibility: [
164 // DO NOT ADD ANY MORE ENTRIES TO THIS LIST
165 "//external/robolectric-shadows:__subpackages__",
166 "//frameworks/layoutlib:__subpackages__",
167 ],
Anton Hanssone996d432020-03-07 11:40:10 +0000168}
169
Jiyong Park392729f2020-01-17 16:32:53 +0900170// AIDL files under these paths are mixture of public and private ones.
171// They shouldn't be exported across module boundaries.
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100172java_defaults {
Makoto Onuki62242c42019-08-05 12:54:20 -0700173 name: "framework-aidl-export-defaults",
Makoto Onuki62242c42019-08-05 12:54:20 -0700174 aidl: {
Jiyong Parkb3609312019-08-16 21:17:14 +0900175 export_include_dirs: [
176 "core/java",
177 "drm/java",
178 "graphics/java",
David Zeuthen045b6de2019-10-29 15:15:18 -0400179 "identity/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900180 "keystore/java",
181 "location/java",
182 "lowpan/java",
183 "media/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900184 "media/mca/effect/java",
185 "media/mca/filterfw/java",
186 "media/mca/filterpacks/java",
Amit Mahajan6237a6b2019-10-07 17:41:26 -0700187 "mms/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900188 "opengl/java",
189 "rs/java",
190 "sax/java",
191 "telecomm/java",
Anton Hanssone996d432020-03-07 11:40:10 +0000192
Anton Hanssone996d432020-03-07 11:40:10 +0000193 // TODO(b/147699819): remove this
194 "telephony/java",
Jiyong Parkb3609312019-08-16 21:17:14 +0900195 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700196 },
197}
198
Jiyong Park20426532019-08-19 15:24:49 +0900199// Collection of classes that are generated from non-Java files that are not listed in
200// framework_srcs. These have no or very limited dependency to the framework.
201java_library {
202 name: "framework-internal-utils",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800203 static_libs: [
Dario Frenid8bf22e2018-08-31 14:18:04 +0100204 "apex_aidl_interface-java",
Samiul Islame4561272021-08-26 11:41:37 +0100205 "packagemanager_aidl-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800206 "framework-protos",
Peiyong Linb967a4c2020-07-27 22:16:13 -0700207 "updatable-driver-protos",
Kelvin Zhanga48c18e2021-04-12 17:23:51 -0400208 "ota_metadata_proto_java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800209 "android.hidl.base-V1.0-java",
210 "android.hardware.cas-V1.0-java",
Henry Fang43cab922019-12-27 16:50:20 -0800211 "android.hardware.cas-V1.1-java",
212 "android.hardware.cas-V1.2-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800213 "android.hardware.contexthub-V1.0-java",
Anthony Stange521a9052020-02-07 18:45:47 -0500214 "android.hardware.contexthub-V1.1-java",
Arthur Ishiguro8368e942020-10-14 13:39:09 -0700215 "android.hardware.contexthub-V1.2-java",
Arthur Ishiguro7fe2ba52021-08-26 09:30:02 -0700216 "android.hardware.contexthub-V1-java",
Yu-Han Yang9fe06dd2019-11-18 16:23:31 -0800217 "android.hardware.gnss-V1.0-java",
Yu-Han Yangad03c472020-01-14 15:31:01 -0800218 "android.hardware.gnss-V2.1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800219 "android.hardware.health-V1.0-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800220 "android.hardware.radio-V1.0-java",
221 "android.hardware.radio-V1.1-java",
222 "android.hardware.radio-V1.2-java",
223 "android.hardware.radio-V1.3-java",
224 "android.hardware.radio-V1.4-java",
Sarah Chin21e9c632019-11-05 13:30:10 -0800225 "android.hardware.radio-V1.5-java",
Daniel Bright8b4502e2020-09-02 17:10:54 -0700226 "android.hardware.radio-V1.6-java",
Sarah Chin3101c0b2021-09-29 12:13:27 -0700227 "android.hardware.radio.data-V1-java",
228 "android.hardware.radio.messaging-V1-java",
229 "android.hardware.radio.modem-V1-java",
230 "android.hardware.radio.network-V1-java",
231 "android.hardware.radio.sim-V1-java",
232 "android.hardware.radio.voice-V1-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800233 "android.hardware.thermal-V1.0-java-constants",
Wei Wangfb21bd82019-01-10 14:16:23 -0800234 "android.hardware.thermal-V1.0-java",
Wei Wangbad7c202018-11-01 11:57:39 -0700235 "android.hardware.thermal-V1.1-java",
236 "android.hardware.thermal-V2.0-java",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800237 "android.hardware.tv.input-V1.0-java-constants",
238 "android.hardware.usb-V1.0-java-constants",
239 "android.hardware.usb-V1.1-java-constants",
Badhri Jagan Sridharane966a382018-12-09 14:49:38 -0800240 "android.hardware.usb-V1.2-java-constants",
Steven Morelande0dde652019-01-24 12:03:26 -0800241 "android.hardware.usb.gadget-V1.0-java",
raychi88254a22020-09-30 19:04:08 +0800242 "android.hardware.usb.gadget-V1.1-java",
243 "android.hardware.usb.gadget-V1.2-java",
Michael Wrightf268bf52018-02-07 23:23:34 +0000244 "android.hardware.vibrator-V1.0-java",
245 "android.hardware.vibrator-V1.1-java",
246 "android.hardware.vibrator-V1.2-java",
Harpreet "Eli" Sanghaa456f082018-12-14 12:06:10 +0900247 "android.hardware.vibrator-V1.3-java",
Lais Andradeb847d632021-02-23 10:35:27 +0000248 "android.hardware.vibrator-V2-java",
Rajesh Nyamagoud4fe64fb2021-09-14 05:34:11 +0000249 "android.se.omapi-V1-java",
Michael Sund5237962020-11-06 03:28:14 +0000250 "android.system.suspend.control.internal-java",
arangelov1ab61492018-11-22 13:56:50 +0000251 "devicepolicyprotosnano",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900252
253 "com.android.sysprop.apex",
Nikita Ioffe779d6be2020-02-06 23:17:17 +0000254 "com.android.sysprop.init",
Alexander Mishkovets77f6bc82020-07-14 19:14:10 +0200255 "com.android.sysprop.localization",
Inseob Kim4fe9f0f2019-07-30 18:23:26 +0900256 "PlatformProperties",
Colin Crosscf3a0b52017-11-16 00:15:28 -0800257 ],
Jiyong Park20426532019-08-19 15:24:49 +0900258 sdk_version: "core_platform",
259 installable: false,
260}
261
Anton Hansson524bf242021-05-25 12:48:58 +0100262// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
263// documentation. Do not remove without consulting the treble/hidl teams.
Anton Hanssondffc59c2021-05-25 11:43:36 +0000264filegroup {
265 name: "framework-jarjar-rules",
266 srcs: ["framework-jarjar-rules.txt"],
Anton Hansson524bf242021-05-25 12:48:58 +0100267 visibility: ["//visibility:public"],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000268}
269
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200270java_defaults {
271 name: "framework-minus-apex-defaults",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100272 defaults: ["framework-aidl-export-defaults"],
273 srcs: [
274 ":framework-non-updatable-sources",
275 "core/java/**/*.logtags",
Daniel Norman66ebced2021-09-21 13:47:36 -0700276 ":apex-info-list",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100277 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100278 aidl: {
279 generate_get_transaction_name: true,
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000280 local_include_dirs: [
281 "media/aidl",
Remi NGUYEN VAN7b6b0062021-03-19 10:15:06 +0000282 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000283 include_dirs: [
284 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600285 "frameworks/native/libs/permission/aidl",
Junyu Lai5bf27122022-01-12 09:33:53 +0000286 // TODO: remove when moved to the below package
287 "frameworks/base/packages/ConnectivityT/framework-t/aidl-export",
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800288 "packages/modules/Bluetooth/system/binder",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000289 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000290 "packages/modules/Media/apex/aidl/stable",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500291 "hardware/interfaces/graphics/common/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000292 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100293 },
294 dxflags: [
295 "--core-library",
296 "--multi-dex",
297 ],
Anton Hanssondffc59c2021-05-25 11:43:36 +0000298 jarjar_rules: ":framework-jarjar-rules",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900299 javac_shard_size: 150,
Anton Hansson5954c6d2020-08-19 14:37:54 +0100300 plugins: [
301 "view-inspector-annotation-processor",
302 "staledataclass-annotation-processor",
303 "error_prone_android_framework",
304 ],
atrostaec9bc12019-08-16 18:14:09 +0100305 required: [
Marin Shalamanov11047252021-11-22 17:35:30 +0100306 // TODO(b/120066492): remove default_television.xml when the build system
307 // propagates "required" properly.
308 "default_television.xml",
atrostaec9bc12019-08-16 18:14:09 +0100309 "framework-platform-compat-config",
Marin Shalamanov11047252021-11-22 17:35:30 +0100310 // TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
311 // system propagates "required" properly.
Anton Hansson5954c6d2020-08-19 14:37:54 +0100312 "gps_debug.conf",
Victor Changa4fae272020-10-30 12:14:34 +0000313 "icu4j-platform-compat-config",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100314 "protolog.conf.json.gz",
atrost86895aa2019-08-19 16:51:15 +0100315 "services-platform-compat-config",
Rambo Wang05e55c92021-06-25 11:41:43 -0700316 "TeleService-platform-compat-config",
Ivan Chiang3cb1cbd2020-02-18 10:50:10 +0800317 "documents-ui-compat-config",
Varun Shahf952e66c12020-06-25 11:30:13 -0700318 "calendar-provider-compat-config",
Marcus Hagerott6c681052021-11-12 17:48:47 -0800319 "contacts-provider-platform-compat-config",
atrostaec9bc12019-08-16 18:14:09 +0100320 ],
Anton Hansson5954c6d2020-08-19 14:37:54 +0100321 libs: [
322 "app-compat-annotations",
323 "ext",
324 "framework-updatable-stubs-module_libs_api",
325 "unsupportedappusage",
326 ],
327 sdk_version: "core_platform",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000328 static_libs: [
Hongguang956e6352021-07-20 17:45:28 -0700329 "android.hardware.common.fmq-V1-java",
Ytai Ben-Tsvi128df2a2021-03-18 09:43:27 -0700330 // TODO(b/184162091)
331 "android.hardware.soundtrigger3-V1-java",
Daulet Zhanguzin59444d52021-01-25 19:43:53 +0000332 "bouncycastle-repackaged-unbundled",
Anton Hansson5954c6d2020-08-19 14:37:54 +0100333 "framework-internal-utils",
Tobias Thierer82968532019-11-29 19:39:45 +0000334 // If MimeMap ever becomes its own APEX, then this dependency would need to be removed
335 // in favor of an API stubs dependency in java_library "framework" below.
Tobias Thiererc0c06082019-11-22 16:33:18 +0000336 "mimemap",
Ytai Ben-Tsvic3cd3cd2020-10-30 12:34:51 -0700337 "av-types-aidl-java",
Amy Zhang39a3fa42020-12-21 16:56:03 -0800338 "tv_tuner_resource_manager_aidl_interface-java",
Ytai Ben-Tsvida7c21e2020-09-16 13:04:31 -0700339 "soundtrigger_middleware-aidl-java",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700340 "modules-utils-preconditions",
William Escande33a14632021-12-16 16:07:55 +0100341 "modules-utils-synchronous-result-receiver",
Chiachang Wang6a555272020-11-02 16:51:24 +0800342 "modules-utils-os",
Svet Ganov4bf102a2021-04-22 20:09:49 +0000343 "framework-permission-aidl-java",
Eric Laurent8500f6c2021-07-24 08:47:17 +0200344 "spatializer-aidl-java",
345 "audiopolicy-types-aidl-java",
Tobias Thiererc0c06082019-11-22 16:33:18 +0000346 ],
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200347}
348
349java_library {
350 name: "framework-minus-apex",
351 defaults: ["framework-minus-apex-defaults"],
352 installable: true,
Jiyong Park911cd4f2019-10-21 14:35:14 +0900353 // For backwards compatibility.
354 stem: "framework",
Jiyong Park352f9e22019-12-09 14:45:07 +0900355 apex_available: ["//apex_available:platform"],
Jiyong Park212d2e82020-01-03 21:07:38 +0900356 visibility: [
357 "//frameworks/base",
Jiyong Park634819c2020-02-04 21:20:02 +0900358 // TODO(b/147128803) remove the below lines
Jiyong Park212d2e82020-01-03 21:07:38 +0900359 "//frameworks/base/apex/appsearch/framework",
360 "//frameworks/base/apex/blobstore/framework",
361 "//frameworks/base/apex/jobscheduler/framework",
markchien2c153702020-02-06 19:23:26 +0800362 "//frameworks/base/packages/Tethering/tests/unit",
Baligh Uddinff8ff122020-10-29 02:11:55 +0000363 "//packages/modules/Connectivity/Tethering/tests/unit",
Jiyong Park212d2e82020-01-03 21:07:38 +0900364 ],
Bernardo Rufino2b7e5912021-11-29 10:22:15 +0000365 lint: {
366 extra_check_modules: ["AndroidFrameworkLintChecker"],
367 },
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600368 errorprone: {
369 javacflags: [
Jeff Sharkey7cdc3bf2020-10-06 14:55:37 -0600370 "-Xep:AndroidFrameworkBinderIdentity:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600371 "-Xep:AndroidFrameworkCompatChange:ERROR",
Jeff Sharkey9af4aea2020-10-02 12:00:59 -0600372 "-Xep:AndroidFrameworkUid:ERROR",
Jeff Sharkey6c8ffbc2020-10-02 11:52:05 -0600373 ],
374 },
Jiyong Park911cd4f2019-10-21 14:35:14 +0900375}
376
Ioana Stefan2f5c5452020-10-15 15:00:24 +0200377java_library {
378 name: "framework-minus-apex-intdefs",
379 defaults: ["framework-minus-apex-defaults"],
380 plugins: ["intdef-annotation-processor"],
381}
382
Jiyong Park911cd4f2019-10-21 14:35:14 +0900383// This "framework" module is NOT installed to the device. It's
384// "framework-minus-apex" that gets installed to the device. Note that
385// the filename is still framework.jar (via the stem property) for
386// compatibility reason. The purpose of this module is to provide
387// framework APIs (both public and private) for bundled apps.
388// "framework-minus-apex" can't be used for the purpose because 1)
389// many apps have already hardcoded the name "framework" and
390// 2) it lacks API symbols from updatable modules - as it's clear from
391// its suffix "-minus-apex".
392java_library {
393 name: "framework",
394 defaults: ["framework-aidl-export-defaults"],
395 installable: false, // this lib is a build-only library
396 static_libs: [
Malcolm Chenfbc5c362020-03-16 15:28:35 -0700397 "app-compat-annotations",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900398 "framework-minus-apex",
Anton Hanssone996d432020-03-07 11:40:10 +0000399 "framework-updatable-stubs-module_libs_api",
Jiyong Park911cd4f2019-10-21 14:35:14 +0900400 ],
Makoto Onuki62242c42019-08-05 12:54:20 -0700401 sdk_version: "core_platform",
Jiyong Park352f9e22019-12-09 14:45:07 +0900402 apex_available: ["//apex_available:platform"],
Makoto Onuki62242c42019-08-05 12:54:20 -0700403}
404
atrostb9c34502019-08-05 12:22:18 +0100405platform_compat_config {
Songchun Fand4574b52021-03-02 20:05:57 +0000406 name: "framework-platform-compat-config",
407 src: ":framework-minus-apex",
Mathew Inwoodbad89e52018-06-28 14:12:10 +0100408}
409
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900410filegroup {
evitayane22e47f2019-12-30 16:05:38 -0800411 name: "framework-ike-shared-srcs",
Baligh Uddinb7ec5bb2020-05-27 19:22:36 +0000412 visibility: ["//packages/modules/IPsec"],
evitayane22e47f2019-12-30 16:05:38 -0800413 srcs: [
evitayane9cc4942020-03-03 17:14:47 -0800414 "core/java/com/android/internal/util/HexDump.java",
Yan Yane7a360f2021-06-10 18:45:39 -0700415 "core/java/com/android/internal/util/WakeupMessage.java",
Yan Yana3e954f2020-11-09 00:09:39 -0800416 "services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
evitayan996aa2a2019-12-30 11:19:47 -0800417 "telephony/java/android/telephony/Annotation.java",
evitayane22e47f2019-12-30 16:05:38 -0800418 ],
419}
420
421filegroup {
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900422 name: "framework-networkstack-shared-srcs",
423 srcs: [
424 // TODO: remove these annotations as soon as we can use andoid.support.annotations.*
Chalard Jean95213512019-01-30 21:04:58 +0900425 ":framework-annotations",
Alexander Dorokhinec0bf81a2021-05-12 11:34:51 -0700426 ":modules-utils-preconditions-srcs",
Dmitri Plotnikovf800b702020-05-15 13:49:20 -0700427 "core/java/android/util/IndentingPrintWriter.java",
Remi NGUYEN VANe88516f2019-01-20 09:35:10 +0900428 "core/java/android/util/LocalLog.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900429 "core/java/com/android/internal/util/HexDump.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900430 "core/java/com/android/internal/util/IndentingPrintWriter.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900431 "core/java/com/android/internal/util/MessageUtils.java",
Remi NGUYEN VAN3ba6c0d2019-01-20 13:48:19 +0900432 "core/java/com/android/internal/util/RingBufferIndices.java",
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900433 "core/java/com/android/internal/util/WakeupMessage.java",
johnson.yeh095b7a02019-12-19 20:30:34 +0800434 "core/java/com/android/internal/util/TokenBucket.java",
Tobias Thiererbc05034a2019-05-23 16:20:12 +0100435 ],
Remi NGUYEN VAN77dd54d2019-01-25 08:54:08 +0900436}
437
Colin Crossd8e02252017-10-02 17:14:22 -0700438// Build ext.jar
439// ============================================================
440java_library {
441 name: "ext",
Colin Crossa12c0f52018-06-27 11:00:11 -0700442 installable: true,
Paul Duffin8fcace42019-06-12 13:47:18 +0100443 sdk_version: "core_platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700444 static_libs: [
445 "libphonenumber-platform",
Colin Crossd8e02252017-10-02 17:14:22 -0700446 "tagsoup",
Ricky Wai0d1bc332017-10-31 14:31:01 +0000447 "rappor",
Colin Crossd8e02252017-10-02 17:14:22 -0700448 ],
449 dxflags: ["--core-library"],
450}
451
David Su511a8142020-01-09 14:02:21 -0800452// utility classes statically linked into framework-wifi and dynamically linked
453// into wifi-service
454java_library {
455 name: "framework-wifi-util-lib",
David Sufd626db2020-11-09 14:31:45 -0800456 sdk_version: "module_current",
457 min_sdk_version: "30",
David Su511a8142020-01-09 14:02:21 -0800458 srcs: [
David Su511a8142020-01-09 14:02:21 -0800459 "core/java/com/android/internal/util/AsyncChannel.java",
460 "core/java/com/android/internal/util/AsyncService.java",
461 "core/java/com/android/internal/util/Protocol.java",
David Su369c9202020-01-09 18:09:56 -0800462 "telephony/java/android/telephony/Annotation.java",
David Su298cd362020-01-17 19:02:49 +0000463 ":net-utils-framework-wifi-common-srcs",
David Su511a8142020-01-09 14:02:21 -0800464 ],
465 libs: [
466 "framework-annotations-lib",
Remi NGUYEN VANf3114972021-03-24 22:59:50 +0900467 "framework-connectivity.stubs.module_lib",
David Su511a8142020-01-09 14:02:21 -0800468 "unsupportedappusage",
David Su511a8142020-01-09 14:02:21 -0800469 ],
David Su57bca312020-04-21 19:49:32 -0700470 visibility: [
471 "//frameworks/base/wifi",
472 "//frameworks/base/services/net",
Baligh Uddin09fdba42020-12-23 22:42:10 +0000473 "//packages/modules/Wifi/framework",
David Su57bca312020-04-21 19:49:32 -0700474 ],
David Su511a8142020-01-09 14:02:21 -0800475}
476
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900477// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
Anton Hanssonf67ce742022-02-18 19:26:20 +0000478metalava_framework_docs_args = "" +
Aurimas Liutikas1f76a5a2019-11-20 17:51:42 -0800479 "--api-lint-ignore-prefix android.icu. " +
480 "--api-lint-ignore-prefix java. " +
481 "--api-lint-ignore-prefix junit. " +
Anton Hanssonf67ce742022-02-18 19:26:20 +0000482 "--api-lint-ignore-prefix org. " +
483 "--error NoSettingsProvider " +
484 "--error UnhiddenSystemApi " +
485 "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
486 "--hide BroadcastBehavior " +
487 "--hide CallbackInterface " +
488 "--hide DeprecationMismatch " +
489 "--hide HiddenSuperclass " +
490 "--hide HiddenTypeParameter " +
491 "--hide MissingPermission " +
492 "--hide-package android.audio.policy.configuration.V7_0 " +
493 "--hide-package com.android.server " +
494 "--hide RequiresPermission " +
495 "--hide SdkConstant " +
496 "--hide Todo " +
497 "--hide Typo " +
498 "--hide UnavailableSymbol " +
499 "--manifest $(location core/res/AndroidManifest.xml) "
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900500
Anton Hansson76ac4cc2021-05-05 19:22:52 +0100501packages_to_document = [
502 "android",
503 "dalvik",
504 "java",
505 "javax",
506 "junit",
507 "org.apache.http",
508 "org.json",
509 "org.w3c.dom",
510 "org.xml.sax",
511 "org.xmlpull",
512]
513
Anton Hansson77ff72f2021-03-30 10:11:22 +0100514filegroup {
Anton Hansson867f94c2021-05-05 10:32:31 +0100515 name: "android-non-updatable-stub-sources",
Anton Hansson77ff72f2021-03-30 10:11:22 +0100516 srcs: [
Anton Hanssona08dc692021-03-30 10:31:15 +0100517 ":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
Anton Hansson77ff72f2021-03-30 10:11:22 +0100518 ":framework-non-updatable-sources",
519 ":opt-telephony-srcs",
520 ":opt-net-voip-srcs",
521 "core/java/**/*.logtags",
522 "**/package.html",
523 ],
524 visibility: ["//visibility:private"],
525}
526
Anton Hansson9dce8322022-01-24 14:14:33 +0000527// Defaults for all stubs that include the non-updatable framework. These defaults do not include
528// module symbols, so will not compile correctly on their own. Users must add module APIs to the
529// classpath (or sources) somehow.
Anton Hansson867f94c2021-05-05 10:32:31 +0100530stubs_defaults {
531 name: "android-non-updatable-stubs-defaults",
532 srcs: [":android-non-updatable-stub-sources"],
533 sdk_version: "none",
534 system_modules: "none",
535 java_version: "1.8",
536 arg_files: ["core/res/AndroidManifest.xml"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100537 aidl: {
538 local_include_dirs: [
Anton Hansson867f94c2021-05-05 10:32:31 +0100539 "media/aidl",
Anton Hansson867f94c2021-05-05 10:32:31 +0100540 "telephony/java",
541 ],
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000542 include_dirs: [
543 "frameworks/av/aidl",
Jeff Sharkey75d4f932021-07-26 15:41:01 -0600544 "frameworks/native/libs/permission/aidl",
Junyu Lai5bf27122022-01-12 09:33:53 +0000545 // TODO: remove when moved to the below package
546 "frameworks/base/packages/ConnectivityT/framework-t/aidl-export",
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800547 "packages/modules/Bluetooth/system/binder",
Junyu Lai5bf27122022-01-12 09:33:53 +0000548 "packages/modules/Connectivity/framework/aidl-export",
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800549 "packages/modules/Media/apex/aidl/stable",
Leon Scroggins III73e06892022-01-31 15:47:34 -0500550 "hardware/interfaces/graphics/common/aidl",
Baligh Uddinf33ffa12021-05-17 04:07:33 +0000551 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100552 },
553 // These are libs from framework-internal-utils that are required (i.e. being referenced)
554 // from framework-non-updatable-sources. Add more here when there's a need.
555 // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
556 // dependencies gets bigger.
557 libs: [
558 "android.hardware.cas-V1.2-java",
559 "android.hardware.health-V1.0-java-constants",
560 "android.hardware.radio-V1.5-java",
561 "android.hardware.radio-V1.6-java",
562 "android.hardware.thermal-V1.0-java-constants",
563 "android.hardware.thermal-V2.0-java",
564 "android.hardware.tv.input-V1.0-java-constants",
Anton Hansson867f94c2021-05-05 10:32:31 +0100565 "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 Hansson9dce8322022-01-24 14:14:33 +0000570 ],
571 filter_packages: packages_to_document,
572 high_mem: true, // Lots of sources => high memory use, see b/170701554
573 installable: false,
574 annotations_enabled: true,
575 previous_api: ":android.api.public.latest",
576 merge_annotations_dirs: ["metalava-manual"],
577 defaults_visibility: ["//visibility:private"],
578 visibility: ["//frameworks/base/api"],
579}
580
581// Defaults with module APIs in the classpath (mostly from prebuilts).
582// Suitable for compiling android-non-updatable.
583stubs_defaults {
584 name: "module-classpath-stubs-defaults",
585 aidl: {
Anton Hansson9dce8322022-01-24 14:14:33 +0000586 include_dirs: [
Roopa Sattiraju293ed882022-02-03 09:07:17 -0800587 "packages/modules/Bluetooth/system/binder",
Anton Hansson9dce8322022-01-24 14:14:33 +0000588 "packages/modules/Connectivity/framework/aidl-export",
Baligh Uddinb8b46fd2022-02-11 14:20:10 +0000589 "packages/modules/Media/apex/aidl/stable",
Anton Hansson9dce8322022-01-24 14:14:33 +0000590 ],
591 },
592 libs: [
Anton Hansson4e86dca2021-05-07 16:32:10 +0100593 "art.module.public.api",
markchiencd813a32021-11-11 00:42:55 +0800594 "sdk_module-lib_current_framework-tethering",
paulhue074dd22022-02-08 21:23:06 +0800595 "sdk_module-lib_current_framework-connectivity-t",
Roopa Sattiraju8e305772022-01-20 10:05:19 -0800596 "sdk_public_current_framework-bluetooth",
Anton Hansson867f94c2021-05-05 10:32:31 +0100597 // There are a few classes from modules used by the core that
598 // need to be resolved by metalava. We use a prebuilt stub of the
599 // full sdk to ensure we can resolve them. If a new class gets added,
600 // the prebuilts/sdk/current needs to be updated.
601 "sdk_system_current_android",
602 // NOTE: The below can be removed once the prebuilt stub contains IKE.
603 "sdk_system_current_android.net.ipsec.ike",
604 ],
Anton Hansson867f94c2021-05-05 10:32:31 +0100605 defaults_visibility: ["//visibility:private"],
Anton Hansson867f94c2021-05-05 10:32:31 +0100606}
607
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900608build = [
609 "StubLibraries.bp",
610 "ApiDocs.bp",
Anton Hansson31fb58b2021-04-12 18:03:12 +0100611 "ProtoLibraries.bp",
Harry Zhangd61699e2021-06-01 16:48:25 -0700612 "TestProtoLibraries.bp",
Jiyong Park0d7e86d2019-12-20 14:35:43 +0900613]