summaryrefslogtreecommitdiff
path: root/Android.bp
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2021-05-05 10:32:31 +0100
committerAnton Hansson <hansson@google.com>2021-05-07 13:51:28 +0100
commitc7f5e7d4397050430aef255b876e9c15a91ddb70 (patch)
treeb8ac7dcde6457a32d2636aeae32b19657a258692 /Android.bp
parent0f6542d42244df890ce4c5f33f16d4753c5dbeff (diff)
Add targets to build doc-stubs for non-updatable
Like the jar stubs, the doc stubs need modularization to avoid depending on module sources and instead being assembled by merging the doc stubs of the constituent modules. This will allow generating e.g. the lint database, annotation zips, and the documentation itself from prebuilts (which in turn allows mixing e.g. non-updatable R with the latest modules). Move the defaults for the non-updatable jar stubs to the shared bp file and reuse it for the non-updatable doc stubs, and add two targets for the public and the system stubs. Bug: 186197911 Test: m android-non-updatable-doc-stubs{,-system} Merged-In: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d Change-Id: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp56
1 files changed, 55 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index 084c9f51d12e..2ee97b0de816 100644
--- a/Android.bp
+++ b/Android.bp
@@ -474,7 +474,7 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x
"--api-lint-ignore-prefix org. "
filegroup {
- name: "framework-non-updatable-stub-sources",
+ name: "android-non-updatable-stub-sources",
srcs: [
":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
":framework-non-updatable-sources",
@@ -486,6 +486,60 @@ filegroup {
visibility: ["//visibility:private"],
}
+// These defaults are used for both the jar stubs and the doc stubs.
+stubs_defaults {
+ name: "android-non-updatable-stubs-defaults",
+ srcs: [":android-non-updatable-stub-sources"],
+ sdk_version: "none",
+ system_modules: "none",
+ java_version: "1.8",
+ arg_files: ["core/res/AndroidManifest.xml"],
+ // TODO(b/147699819): remove below aidl includes.
+ aidl: {
+ local_include_dirs: [
+ "apex/media/aidl/stable",
+ // TODO: move to include-dirs for packages/modules/Connectivity when this moves out of
+ // frameworks/base
+ "packages/Connectivity/framework/aidl-export",
+ "telephony/java",
+ ],
+ },
+ // These are libs from framework-internal-utils that are required (i.e. being referenced)
+ // from framework-non-updatable-sources. Add more here when there's a need.
+ // DO NOT add the entire framework-internal-utils. It might cause unnecessary circular
+ // dependencies gets bigger.
+ libs: [
+ "android.hardware.cas-V1.2-java",
+ "android.hardware.health-V1.0-java-constants",
+ "android.hardware.radio-V1.5-java",
+ "android.hardware.radio-V1.6-java",
+ "android.hardware.thermal-V1.0-java-constants",
+ "android.hardware.thermal-V2.0-java",
+ "android.hardware.tv.input-V1.0-java-constants",
+ "android.hardware.tv.tuner-V1.0-java-constants",
+ "android.hardware.usb-V1.0-java-constants",
+ "android.hardware.usb-V1.1-java-constants",
+ "android.hardware.usb.gadget-V1.0-java",
+ "android.hardware.vibrator-V1.3-java",
+ "framework-protos",
+ "stable.core.platform.api.stubs",
+ // There are a few classes from modules used by the core that
+ // need to be resolved by metalava. We use a prebuilt stub of the
+ // full sdk to ensure we can resolve them. If a new class gets added,
+ // the prebuilts/sdk/current needs to be updated.
+ "sdk_system_current_android",
+ // NOTE: The below can be removed once the prebuilt stub contains IKE.
+ "sdk_system_current_android.net.ipsec.ike",
+ ],
+ high_mem: true, // Lots of sources => high memory use, see b/170701554
+ installable: false,
+ annotations_enabled: true,
+ previous_api: ":android.api.public.latest",
+ merge_annotations_dirs: ["metalava-manual"],
+ defaults_visibility: ["//visibility:private"],
+ visibility: ["//frameworks/base/api"],
+}
+
build = [
"StubLibraries.bp",
"ApiDocs.bp",