Merge "Add targets to build doc-stubs for non-updatable"
This commit is contained in:
56
Android.bp
56
Android.bp
@@ -436,7 +436,7 @@ metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.x
|
|||||||
"--api-lint-ignore-prefix org. "
|
"--api-lint-ignore-prefix org. "
|
||||||
|
|
||||||
filegroup {
|
filegroup {
|
||||||
name: "framework-non-updatable-stub-sources",
|
name: "android-non-updatable-stub-sources",
|
||||||
srcs: [
|
srcs: [
|
||||||
":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
|
":framework-mime-sources", // mimemap builds separately but has no separate droidstubs.
|
||||||
":framework-non-updatable-sources",
|
":framework-non-updatable-sources",
|
||||||
@@ -448,6 +448,60 @@ filegroup {
|
|||||||
visibility: ["//visibility:private"],
|
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 = [
|
build = [
|
||||||
"StubLibraries.bp",
|
"StubLibraries.bp",
|
||||||
"ApiDocs.bp",
|
"ApiDocs.bp",
|
||||||
|
|||||||
29
ApiDocs.bp
29
ApiDocs.bp
@@ -55,10 +55,24 @@ framework_docs_only_libs = [
|
|||||||
"android-support-multidex-instrumentation",
|
"android-support-multidex-instrumentation",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
stubs_defaults {
|
||||||
|
name: "android-non-updatable-doc-stubs-defaults",
|
||||||
|
defaults: ["android-non-updatable-stubs-defaults"],
|
||||||
|
srcs: [
|
||||||
|
// No longer part of the stubs, but are included in the docs.
|
||||||
|
"test-base/src/**/*.java",
|
||||||
|
"test-mock/src/**/*.java",
|
||||||
|
"test-runner/src/**/*.java",
|
||||||
|
],
|
||||||
|
libs: framework_docs_only_libs,
|
||||||
|
create_doc_stubs: true,
|
||||||
|
write_sdk_values: true,
|
||||||
|
}
|
||||||
|
|
||||||
stubs_defaults {
|
stubs_defaults {
|
||||||
name: "framework-doc-stubs-default",
|
name: "framework-doc-stubs-default",
|
||||||
srcs: [
|
srcs: [
|
||||||
":framework-non-updatable-stub-sources",
|
":android-non-updatable-stub-sources",
|
||||||
|
|
||||||
// Module sources
|
// Module sources
|
||||||
":art.module.public.api{.public.stubs.source}",
|
":art.module.public.api{.public.stubs.source}",
|
||||||
@@ -93,6 +107,19 @@ stubs_defaults {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
droidstubs {
|
||||||
|
name: "android-non-updatable-doc-stubs",
|
||||||
|
defaults: ["android-non-updatable-doc-stubs-defaults"],
|
||||||
|
args: metalava_framework_docs_args,
|
||||||
|
}
|
||||||
|
|
||||||
|
droidstubs {
|
||||||
|
name: "android-non-updatable-doc-stubs-system",
|
||||||
|
defaults: ["android-non-updatable-doc-stubs-defaults"],
|
||||||
|
args: metalava_framework_docs_args +
|
||||||
|
" --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ",
|
||||||
|
}
|
||||||
|
|
||||||
droidstubs {
|
droidstubs {
|
||||||
name: "framework-doc-stubs",
|
name: "framework-doc-stubs",
|
||||||
defaults: ["framework-doc-stubs-default"],
|
defaults: ["framework-doc-stubs-default"],
|
||||||
|
|||||||
@@ -42,59 +42,10 @@ packages_to_document = [
|
|||||||
|
|
||||||
stubs_defaults {
|
stubs_defaults {
|
||||||
name: "metalava-non-updatable-api-stubs-default",
|
name: "metalava-non-updatable-api-stubs-default",
|
||||||
srcs: [":framework-non-updatable-stub-sources"],
|
defaults: ["android-non-updatable-stubs-defaults"],
|
||||||
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",
|
|
||||||
],
|
|
||||||
api_levels_annotations_enabled: false,
|
api_levels_annotations_enabled: false,
|
||||||
filter_packages: packages_to_document,
|
filter_packages: packages_to_document,
|
||||||
defaults_visibility: ["//visibility:private"],
|
defaults_visibility: ["//visibility:private"],
|
||||||
visibility: ["//frameworks/base/api"],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user