summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2020-12-17 14:56:06 +0000
committerAnton Hansson <hansson@google.com>2020-12-21 10:46:53 +0000
commit121ccbcfee783d36be1171331d0b00d58b172f34 (patch)
treefefbf0ff102a4a7a3366c21868b863ff3eb7b411
parent96db3dad2a4a1c4f1622a2b268b347cda0e808db (diff)
Stop ignoring classes on the classpath for stubs
We're working on moving the libcore classes away from srcs and into the classpath, and ignoring classes on the classpath will cause incorrect API signatures once that happens (several libcore classes appear in public API signatures). Keep the docs building in the same way they were before. They will be addressed in separate CLs. Bug: 173606718 Test: m checkapi Change-Id: I471327c3657662d7a093e9baa2fb6e08d640f895
-rw-r--r--Android.bp1
-rw-r--r--ApiDocs.bp9
-rw-r--r--StubLibraries.bp5
3 files changed, 11 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index 4b3c22da5c7c..d23441157190 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1268,7 +1268,6 @@ filegroup {
// TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
metalava_framework_docs_args = "--manifest $(location core/res/AndroidManifest.xml) " +
- "--ignore-classes-on-classpath " +
"--hide-package com.android.server " +
"--hide-package android.audio.policy.configuration.V7_0 " +
"--error UnhiddenSystemApi " +
diff --git a/ApiDocs.bp b/ApiDocs.bp
index ba93a489fd5a..ada80bbc9874 100644
--- a/ApiDocs.bp
+++ b/ApiDocs.bp
@@ -91,7 +91,9 @@ droidstubs {
arg_files: [
"core/res/AndroidManifest.xml",
],
- args: metalava_framework_docs_args,
+ args: metalava_framework_docs_args +
+ // Needed for hidden libcore annotations for now.
+ " --ignore-classes-on-classpath ",
write_sdk_values: true,
}
@@ -101,7 +103,10 @@ droidstubs {
arg_files: [
"core/res/AndroidManifest.xml",
],
- args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ",
+ args: metalava_framework_docs_args +
+ // Needed for hidden libcore annotations for now.
+ " --ignore-classes-on-classpath " +
+ " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ",
write_sdk_values: true,
}
diff --git a/StubLibraries.bp b/StubLibraries.bp
index 6cabc573659e..d4abeee27c31 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -50,7 +50,9 @@ stubs_defaults {
":art.module.public.api{.public.stubs.source}",
"**/package.html",
],
- sdk_version: "core_platform",
+ sdk_version: "none",
+ system_modules: "none",
+ java_version: "1.8",
arg_files: ["core/res/AndroidManifest.xml"],
// TODO(b/147699819): remove below aidl includes.
aidl: {
@@ -77,6 +79,7 @@ stubs_defaults {
"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 as type arguments that
// need to be resolved by metalava. For now, we can use a previously
// finalized stub library to resolve them. If a new class gets added,