stubs inheriting from framework-module-stubs-defaults-* now works
This change fixes a problem that droidstub modules inheriting from
framework-module-stubs-defaults-* don't emit any source code. The
problem was happening because
1) --show-annotation was with incorrect format; it had trailing
"," in the parameter list and
2) the class SystemApi was not available to metalava, which made
prevented it from processing any API annotated with @SystemApi.
Fixing the problem by forcibly adding framework annotations to the
sources of the default modules.
Bug: 1241127
Test: `m ike-stubs` and check its output
Change-Id: Icbbbddb4fb68055f27aa314983a9c556e51f037a
diff --git a/apex/Android.bp b/apex/Android.bp
index 362cf95..051986e 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -31,12 +31,12 @@
priv_apps = " " +
"--show-annotation android.annotation.SystemApi\\(" +
- "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS," +
+ "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
"\\) "
module_libs = " " +
" --show-annotation android.annotation.SystemApi\\(" +
- "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES," +
+ "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
"\\) "
stubs_defaults {
@@ -48,6 +48,7 @@
stubs_defaults {
name: "framework-module-stubs-defaults-systemapi",
args: mainline_stubs_args + priv_apps,
+ srcs: [":framework-annotations"],
installable: false,
}
@@ -59,11 +60,13 @@
stubs_defaults {
name: "framework-module-api-defaults-module_libs_api",
args: mainline_stubs_args + module_libs,
+ srcs: [":framework-annotations"],
installable: false,
}
stubs_defaults {
name: "framework-module-stubs-defaults-module_libs_api",
args: mainline_stubs_args + module_libs + priv_apps,
+ srcs: [":framework-annotations"],
installable: false,
}