Forked from
Dhina17 / platform_frameworks_base
27963 commits behind the upstream repository.
-
Jiyong Park authored
The dependency is a "required" dependency, so it's not used for building framework-minus-apex. We just want that protolog.conf.json.gz is installed along with framework-minus-apex. This CL moves the source of the dependency from framework-minus-apex to services for two reasons: 1. There's a dependency cycle: checked-protolog.json -> generate-protolog.json -> protolog-groups -> framework -> framework-minus-apex -> protolog.conf.json.gz -> services.core.json.gz -> checked-protolog.json Currently, this cycle is harmless because the installation of required modules is done by Make and Make is not checking cycles there. However, this is preventing Soong from implementing the installation of required modules by itself. 2. services don't have such a dependency cycle, while framework-minus-apex and services are installed together. Bug: 321626681 Test: check the existence of /system/etc/protolog.conf.json.gz in installed-files.txt Merged-In: Iefdd457e99fc61c1ce2f5a05ae59f5e12256a764 Change-Id: Iefdd457e99fc61c1ce2f5a05ae59f5e12256a764
Jiyong Park authoredThe dependency is a "required" dependency, so it's not used for building framework-minus-apex. We just want that protolog.conf.json.gz is installed along with framework-minus-apex. This CL moves the source of the dependency from framework-minus-apex to services for two reasons: 1. There's a dependency cycle: checked-protolog.json -> generate-protolog.json -> protolog-groups -> framework -> framework-minus-apex -> protolog.conf.json.gz -> services.core.json.gz -> checked-protolog.json Currently, this cycle is harmless because the installation of required modules is done by Make and Make is not checking cycles there. However, this is preventing Soong from implementing the installation of required modules by itself. 2. services don't have such a dependency cycle, while framework-minus-apex and services are installed together. Bug: 321626681 Test: check the existence of /system/etc/protolog.conf.json.gz in installed-files.txt Merged-In: Iefdd457e99fc61c1ce2f5a05ae59f5e12256a764 Change-Id: Iefdd457e99fc61c1ce2f5a05ae59f5e12256a764
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Android.bp 23.92 KiB
// Copyright (C) 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Build the master framework library.
// READ ME: ########################################################
//
// When updating this list of aidl files, consider if that aidl is
// part of the SDK API. If it is, also add it to the list in Android.mk
// that is preprocessed and distributed with the SDK. This list should
// not contain any aidl files for parcelables, but the one below should
// if you intend for 3rd parties to be able to send those objects
// across process boundaries.
//
// READ ME: ########################################################
package {
default_applicable_licenses: ["frameworks_base_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "frameworks_base_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-CC-BY",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-Unicode-DFS",
"legacy_unencumbered",
],
license_text: [
"NOTICE",
],
}
filegroup {
name: "framework-non-updatable-sources",
srcs: [
// Java/AIDL sources under frameworks/base
":framework-annotations",
":ravenwood-annotations",
":framework-blobstore-sources",
":framework-core-sources",
":framework-drm-sources",
":framework-graphics-nonupdatable-sources",
":framework-jobscheduler-sources", // jobscheduler is not a module for R
":framework-keystore-sources",
":framework-identity-sources",
":framework-mca-effect-sources",
":framework-mca-filterfw-sources",
":framework-mca-filterpacks-sources",
":framework-media-non-updatable-sources",
":framework-mms-sources",
":framework-omapi-sources",
":framework-opengl-sources",
":framework-rs-sources",
":framework-sax-sources",
":framework-telecomm-sources",
":framework-telephony-common-sources",
":framework-telephony-sources",
":framework-vcn-util-sources",
":framework-wifi-annotations",
":framework-wifi-non-updatable-sources",
":PacProcessor-aidl-sources",
":ProxyHandler-aidl-sources",
":net-utils-framework-common-srcs",
// AIDL from frameworks/base/native/
":platform-compat-native-aidl",
// AIDL sources from external directories
":android.hardware.biometrics.common-V4-java-source",
":android.hardware.biometrics.fingerprint-V3-java-source",
":android.hardware.gnss-V2-java-source",
":android.hardware.graphics.common-V3-java-source",
":android.hardware.keymaster-V4-java-source",
":android.hardware.radio-V3-java-source",
":android.hardware.radio.data-V3-java-source",
":android.hardware.radio.network-V3-java-source",
":android.hardware.radio.voice-V3-java-source",
":android.hardware.security.keymint-V3-java-source",
":android.hardware.security.secureclock-V1-java-source",
":android.hardware.thermal-V2-java-source",
":android.hardware.tv.tuner-V2-java-source",
":android.security.apc-java-source",
":android.security.authorization-java-source",
":android.security.legacykeystore-java-source",
":android.security.maintenance-java-source",
":android.security.metrics-java-source",
":android.system.keystore2-V3-java-source",
":android.hardware.cas-V1-java-source",
":credstore_aidl",
":dumpstate_aidl",
":framework_native_aidl",
":gatekeeper_aidl",
":gsiservice_aidl",
":guiconstants_aidl",
":idmap2_aidl",
":idmap2_core_aidl",
":incidentcompanion_aidl",
":inputconstants_aidl",
":installd_aidl",
":libaudioclient_aidl",
":libbinder_aidl",
":libcamera_client_aidl",
":libcamera_client_framework_aidl",
":libupdate_engine_aidl",
":libupdate_engine_stable-V2-java-source",
":logd_aidl",
":resourcemanager_aidl",
":storaged_aidl",
":vold_aidl",
":deviceproductinfoconstants_aidl",
// For the generated R.java and Manifest.java
":framework-res{.aapt.srcjar}",
// Java/AIDL sources to be moved out to CrashRecovery module
":framework-crashrecovery-sources",
// etc.
":framework-javastream-protos",
":statslog-framework-java-gen", // FrameworkStatsLog.java
":audio_policy_configuration_V7_0",
],
}
java_library {
name: "framework-all",
installable: false,
static_libs: [
"all-framework-module-impl",
"framework-minus-apex",
],
apex_available: ["//apex_available:platform"],
sdk_version: "core_platform",
visibility: [
// DO NOT ADD ANY MORE ENTRIES TO THIS LIST
"//external/robolectric-shadows:__subpackages__",
//This will eventually replace the item above, and serves the
//same purpose.
"//external/robolectric:__subpackages__",
"//frameworks/layoutlib:__subpackages__",
// This is for the same purpose as robolectric -- to build "framework.jar" for host-side
// testing.
// TODO: Once Ravenwood is stable, move the host side jar targets to this directory,
// and remove this line.
"//frameworks/base/tools/hoststubgen:__subpackages__",
],
lint: {
baseline_filename: "lint-baseline.xml",
},
}
// AIDL files under these paths are mixture of public and private ones.
// They shouldn't be exported across module boundaries.
java_defaults {
name: "framework-aidl-export-defaults",
aidl: {
export_include_dirs: [
"core/java",
"drm/java",
"graphics/java",
"identity/java",
"keystore/java",
"media/java",
"media/mca/effect/java",
"media/mca/filterfw/java",
"media/mca/filterpacks/java",
"mms/java",
"opengl/java",
"rs/java",
"sax/java",
"telecomm/java",
// TODO(b/147699819): remove this
"telephony/java",
],
},
}
// Collection of classes that are generated from non-Java files that are not listed in
// framework_srcs. These have no or very limited dependency to the framework.
java_library {
name: "framework-internal-utils",
static_libs: [
"apex_aidl_interface-java",
"packagemanager_aidl-java",
"framework-protos",
"updatable-driver-protos",
"ota_metadata_proto_java",
"android.hidl.base-V1.0-java",
"android.hidl.manager-V1.2-java",
"android.hardware.cas-V1-java", // AIDL
"android.hardware.cas-V1.0-java",
"android.hardware.cas-V1.1-java",
"android.hardware.cas-V1.2-java",
"android.hardware.contexthub-V1.0-java",
"android.hardware.contexthub-V1.1-java",
"android.hardware.contexthub-V1.2-java",
"android.hardware.contexthub-V3-java",
"android.hardware.gnss-V1.0-java",
"android.hardware.gnss-V2.1-java",
"android.hardware.health-V1.0-java-constants",
"android.hardware.radio-V1.6-java",
"android.hardware.radio.data-V3-java",
"android.hardware.radio.ims-V2-java",
"android.hardware.radio.messaging-V3-java",
"android.hardware.radio.modem-V3-java",
"android.hardware.radio.network-V3-java",
"android.hardware.radio.sim-V3-java",
"android.hardware.radio.voice-V3-java",
"android.hardware.thermal-V1.0-java-constants",
"android.hardware.thermal-V1.0-java",
"android.hardware.thermal-V1.1-java",
"android.hardware.thermal-V2.0-java",
"android.hardware.tv.input-V1.0-java-constants",
"android.hardware.usb-V1.0-java-constants",
"android.hardware.usb-V1.1-java-constants",
"android.hardware.usb-V1.2-java-constants",
"android.hardware.usb.gadget-V1-java",
"android.hardware.usb.gadget-V1.0-java",
"android.hardware.usb.gadget-V1.1-java",
"android.hardware.usb.gadget-V1.2-java",
"android.hardware.vibrator-V1.0-java",
"android.hardware.vibrator-V1.1-java",
"android.hardware.vibrator-V1.2-java",
"android.hardware.vibrator-V1.3-java",
"android.hardware.vibrator-V2-java",
"android.se.omapi-V1-java",
"android.system.suspend.control.internal-java",
"devicepolicyprotosnano",
"ImmutabilityAnnotation",
"com.android.sysprop.init",
"com.android.sysprop.localization",
"PlatformProperties",
],
sdk_version: "core_platform",
installable: false,
lint: {
baseline_filename: "lint-baseline.xml",
},
}
// NOTE: This filegroup is exposed for vendor libraries to depend on and is referenced in
// documentation. Do not remove without consulting the treble/hidl teams.
filegroup {
name: "framework-jarjar-rules",
srcs: ["framework-jarjar-rules.txt"],
visibility: ["//visibility:public"],
}
java_defaults {
name: "framework-minus-apex-defaults",
defaults: [
"framework-aidl-export-defaults",
"latest_android_hardware_soundtrigger3_java_static",
"framework-minus-apex-aconfig-libraries",
],
srcs: [
":framework-non-updatable-sources",
"core/java/**/*.logtags",
":apex-info-list",
],
aidl: {
generate_get_transaction_name: true,
enforce_permissions: true,
enforce_permissions_exceptions: [
// Do not add entries to this list.
":framework-annotations",
":ravenwood-annotations",
":framework-blobstore-sources",
":framework-core-sources",
":framework-drm-sources",
":framework-graphics-nonupdatable-sources",
":framework-jobscheduler-sources",
":framework-keystore-sources",
":framework-identity-sources",
":framework-mca-effect-sources",
":framework-mca-filterfw-sources",
":framework-mca-filterpacks-sources",
":framework-media-non-updatable-sources",
":framework-mms-sources",
":framework-omapi-sources",
":framework-opengl-sources",
":framework-rs-sources",
":framework-sax-sources",
":framework-telecomm-sources",
":framework-telephony-common-sources",
":framework-telephony-sources",
":framework-vcn-util-sources",
":framework-wifi-annotations",
":framework-wifi-non-updatable-sources",
":PacProcessor-aidl-sources",
":ProxyHandler-aidl-sources",
":net-utils-framework-common-srcs",
":platform-compat-native-aidl",
":credstore_aidl",
":dumpstate_aidl",
":framework_native_aidl",
":gatekeeper_aidl",
":gsiservice_aidl",
":idmap2_aidl",
":idmap2_core_aidl",
":incidentcompanion_aidl",
":inputconstants_aidl",
":installd_aidl",
":libaudioclient_aidl",
":libbinder_aidl",
":libcamera_client_aidl",
":libcamera_client_framework_aidl",
":libupdate_engine_aidl",
":logd_aidl",
":resourcemanager_aidl",
":storaged_aidl",
":vold_aidl",
":deviceproductinfoconstants_aidl",
],
local_include_dirs: [
"media/aidl",
],
include_dirs: [
"frameworks/av/aidl",
"frameworks/native/libs/permission/aidl",
"packages/modules/Bluetooth/framework/aidl-export",
"packages/modules/Connectivity/framework/aidl-export",
"packages/modules/Media/apex/aidl/stable",
"hardware/interfaces/biometrics/common/aidl",
"hardware/interfaces/biometrics/fingerprint/aidl",
"hardware/interfaces/graphics/common/aidl",
"hardware/interfaces/keymaster/aidl",
"system/hardware/interfaces/media/aidl",
],
},
dxflags: [
"--core-library",
"--multi-dex",
],
jarjar_rules: ":framework-jarjar-rules",
javac_shard_size: 150,
plugins: [
"view-inspector-annotation-processor",
"staledataclass-annotation-processor",
"error_prone_android_framework",
],
// Exports needed for staledataclass-annotation-processor, see b/139342589.
javacflags: [
"-J--add-modules=jdk.compiler",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
],
required: [
// TODO(b/120066492): remove default_television.xml when the build system
// propagates "required" properly.
"default_television.xml",
// TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
// system propagates "required" properly.
"gps_debug.conf",
"framework-res",
// any install dependencies should go into framework-minus-apex-install-dependencies
// rather than here to avoid bloating incremental build time
],
libs: [
"androidx.annotation_annotation",
"app-compat-annotations",
"ext",
"framework-updatable-stubs-module_libs_api",
"unsupportedappusage",
],
sdk_version: "core_platform",
static_libs: [
"android.hardware.common.fmq-V1-java",
"bouncycastle-repackaged-unbundled",
"com.android.sysprop.foldlockbehavior",
"framework-internal-utils",
// If MimeMap ever becomes its own APEX, then this dependency would need to be removed
// in favor of an API stubs dependency in java_library "framework" below.
"mimemap",
"av-types-aidl-java",
"tv_tuner_resource_manager_aidl_interface-java",
"soundtrigger_middleware-aidl-java",
"modules-utils-binary-xml",
"modules-utils-build",
"modules-utils-fastxmlserializer",
"modules-utils-preconditions",
"modules-utils-statemachine",
"modules-utils-synchronous-result-receiver",
"modules-utils-os",
"modules-utils-uieventlogger-interface",
"framework-permission-aidl-java",
"spatializer-aidl-java",
"audiopolicy-aidl-java",
"sounddose-aidl-java",
"modules-utils-expresslog",
],
}
// Collection of non updatable unbundled jars. The list here should match
// |non_updatable_modules| variable in frameworks/base/api/api.go.
java_library {
name: "framework-non-updatable-unbundled-impl-libs",
static_libs: [
"framework-location.impl",
],
sdk_version: "core_platform",
installable: false,
lint: {
baseline_filename: "lint-baseline.xml",
},
}
// Separated so framework-minus-apex-defaults can be used without the libs dependency
java_defaults {
name: "framework-minus-apex-with-libs-defaults",
defaults: ["framework-minus-apex-defaults"],
libs: [
"framework-virtualization.stubs.module_lib",
"framework-non-updatable-unbundled-impl-libs",
],
}
java_defaults {
name: "framework-non-updatable-lint-defaults",
lint: {
extra_check_modules: ["AndroidFrameworkLintChecker"],
disabled_checks: ["ApiMightLeakAppVisibility"],
error_checks: [
"ClearIdentityCallNotFollowedByTryFinally",
"NestedClearCallingIdentityCalls",
"NonFinalTokenOfOriginalCallingIdentity",
"RestoreIdentityCallNotInFinallyBlock",
"ResultOfClearIdentityCallNotStoredInVariable",
"UnusedTokenOfOriginalCallingIdentity",
"UseOfCallerAwareMethodsWithClearedIdentity",
],
},
}
// we are unfortunately building the turbine jar twice, but more efficient and less complex
// than generating a similar set of stubs with metalava
java_library {
name: "framework-minus-apex-headers",
defaults: ["framework-minus-apex-defaults"],
installable: false,
// For backwards compatibility.
stem: "framework",
apex_available: ["//apex_available:platform"],
visibility: [
"//frameworks/base:__subpackages__",
],
compile_dex: false,
headers_only: true,
lint: {
baseline_filename: "lint-baseline.xml",
},
// For jarjar repackaging
jarjar_prefix: "com.android.internal.hidden_from_bootclasspath",
}
java_library {
name: "framework-minus-apex",
defaults: [
"framework-minus-apex-with-libs-defaults",
"framework-non-updatable-lint-defaults",
],
installable: true,
// For backwards compatibility.
stem: "framework",
apex_available: ["//apex_available:platform"],
visibility: [
"//frameworks/base",
"//frameworks/base/location",
// TODO(b/147128803) remove the below lines
"//frameworks/base/apex/blobstore/framework",
"//frameworks/base/apex/jobscheduler/framework",
"//frameworks/base/packages/Tethering/tests/unit",
"//packages/modules/Connectivity/Tethering/tests/unit",
],
errorprone: {
javacflags: [
"-Xep:AndroidFrameworkCompatChange:ERROR",
"-Xep:AndroidFrameworkUid:ERROR",
],
},
lint: {
baseline_filename: "lint-baseline.xml",
},
}
java_library {
name: "framework-minus-apex-intdefs",
defaults: ["framework-minus-apex-with-libs-defaults"],
plugins: ["intdef-annotation-processor"],
// Errorprone and android lint will already run on framework-minus-apex, don't rerun them on
// the intdefs version in order to speed up the build.
errorprone: {
enabled: false,
},
lint: {
enabled: false,
baseline_filename: "lint-baseline.xml",
},
}
// This "framework" module is NOT installed to the device. It's
// "framework-minus-apex" that gets installed to the device. Note that
// the filename is still framework.jar (via the stem property) for
// compatibility reason. The purpose of this module is to provide
// framework APIs (both public and private) for bundled apps.
// "framework-minus-apex" can't be used for the purpose because 1)
// many apps have already hardcoded the name "framework" and
// 2) it lacks API symbols from updatable modules - as it's clear from
// its suffix "-minus-apex".
java_library {
name: "framework",
defaults: ["framework-aidl-export-defaults"],
installable: false, // this lib is a build-only library
static_libs: [
"app-compat-annotations",
"framework-minus-apex",
"framework-non-updatable-unbundled-impl-libs",
"framework-updatable-stubs-module_libs_api",
],
sdk_version: "core_platform",
apex_available: ["//apex_available:platform"],
lint: {
baseline_filename: "lint-baseline.xml",
},
}
java_library {
name: "framework-minus-apex-install-dependencies",
required: [
"framework-minus-apex",
"framework-platform-compat-config",
"framework-location-compat-config",
"services-platform-compat-config",
"icu4j-platform-compat-config",
"TeleService-platform-compat-config",
"documents-ui-compat-config",
"calendar-provider-compat-config",
"contacts-provider-platform-compat-config",
],
lint: {
baseline_filename: "lint-baseline.xml",
},
}
platform_compat_config {
name: "framework-platform-compat-config",
src: ":framework-minus-apex",
}
filegroup {
name: "framework-ike-shared-srcs",
visibility: ["//packages/modules/IPsec"],
srcs: [
"core/java/com/android/internal/util/HexDump.java",
"core/java/com/android/internal/util/WakeupMessage.java",
"services/core/java/com/android/server/vcn/util/PersistableBundleUtils.java",
"telephony/java/android/telephony/Annotation.java",
],
}
filegroup {
name: "framework-android-os-unit-testable-src",
srcs: [
"core/java/android/os/DdmSyncState.java",
],
}
filegroup {
name: "framework-networkstack-shared-srcs",
srcs: [
// TODO: remove these annotations as soon as we can use andoid.support.annotations.*
":framework-annotations",
":modules-utils-preconditions-srcs",
"core/java/android/util/IndentingPrintWriter.java",
"core/java/android/util/LocalLog.java",
"core/java/com/android/internal/util/HexDump.java",
"core/java/com/android/internal/util/IndentingPrintWriter.java",
"core/java/com/android/internal/util/MessageUtils.java",
"core/java/com/android/internal/util/RingBufferIndices.java",
"core/java/com/android/internal/util/WakeupMessage.java",
"core/java/com/android/internal/util/TokenBucket.java",
],
}
// Build ext.jar
// ============================================================
java_library {
name: "ext",
installable: true,
sdk_version: "core_platform",
static_libs: [
"libphonenumber-platform",
"tagsoup",
"rappor",
],
dxflags: ["--core-library"],
lint: {
baseline_filename: "lint-baseline.xml",
},
}
// utility classes statically linked into framework-wifi and dynamically linked
// into wifi-service
java_library {
name: "framework-wifi-util-lib",
sdk_version: "module_current",
min_sdk_version: "30",
srcs: [
"core/java/com/android/internal/util/AsyncChannel.java",
"core/java/com/android/internal/util/AsyncService.java",
"core/java/com/android/internal/util/Protocol.java",
"telephony/java/android/telephony/Annotation.java",
":net-utils-framework-wifi-common-srcs",
],
libs: [
"framework-annotations-lib",
"framework-connectivity.stubs.module_lib",
"unsupportedappusage",
],
visibility: [
"//frameworks/base/wifi",
"//frameworks/base/services/net",
"//packages/modules/Wifi/framework",
],
lint: {
baseline_filename: "lint-baseline.xml",
},
apex_available: ["com.android.wifi"],
}
filegroup {
name: "android-non-updatable-stub-sources",
srcs: [
":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
":framework-minus-apex-aconfig-srcjars",
":framework-non-updatable-sources",
":opt-telephony-srcs",
":opt-net-voip-srcs",
"core/java/**/*.logtags",
"**/package.html",
],
visibility: ["//frameworks/base/api"],
}
build = [
"AconfigFlags.bp",
"ProtoLibraries.bp",
"TestProtoLibraries.bp",
"Ravenwood.bp",
]