Add ModuleLibHiddenAPIScope for hidden API processing
Although the hidden API runtime does not support a module-lib API flag
the hidden API processing does need to used them as they are needed by
the "hiddenapi list" tool for any bootclasspath_fragment module whose
contents builds against an sdk_version of "module_current". Without it
the "hiddenapi list" tool could fail to resolve references to classes
provided by other modules which would break the build.
Bug: 179354495
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
- make sure that this change has no effect on the generated flags.
Change-Id: I3ecb80fdaeba0e66d1ee25cb57152ab546d9bfe0
diff --git a/apex/bootclasspath_fragment_test.go b/apex/bootclasspath_fragment_test.go
index 4c9588b..f97404a 100644
--- a/apex/bootclasspath_fragment_test.go
+++ b/apex/bootclasspath_fragment_test.go
@@ -848,6 +848,7 @@
quuzPublicStubs := getDexJarPath(result, "quuz.stubs")
quuzSystemStubs := getDexJarPath(result, "quuz.stubs.system")
quuzTestStubs := getDexJarPath(result, "quuz.stubs.test")
+ quuzModuleLibStubs := getDexJarPath(result, "quuz.stubs.module_lib")
// Make sure that the fragment uses the quuz stub dex jars when generating the hidden API flags.
fragment := result.ModuleForTests("mybootclasspathfragment", "android_common_apex10000")
@@ -858,7 +859,7 @@
// Make sure that the quuz stubs are available for resolving references from the implementation
// boot dex jars provided by this module.
- android.AssertStringDoesContain(t, "quuz widest", command, "--dependency-stub-dex="+quuzTestStubs)
+ android.AssertStringDoesContain(t, "quuz widest", command, "--dependency-stub-dex="+quuzModuleLibStubs)
// Make sure that the quuz stubs are available for resolving references from the different API
// stubs provided by this module.