Move monolithic stub flags generation to platform_bootclasspath
As part of that this change:
* Moves code that will be common to platform_bootclasspath and
bootclasspath_fragment from hiddenapi_singleton.go into
hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
does not rename them or move them into a more appropriate place so
as to make it easier to see the differences. A TODO has been added
and these will be cleaned up in a follow up change.
Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
diff --git a/apex/platform_bootclasspath_test.go b/apex/platform_bootclasspath_test.go
index 74830d3..52b1689 100644
--- a/apex/platform_bootclasspath_test.go
+++ b/apex/platform_bootclasspath_test.go
@@ -137,9 +137,12 @@
)
java.CheckPlatformBootclasspathModules(t, result, "myplatform-bootclasspath", []string{
+ // The configured contents of BootJars.
"com.android.art:baz",
"com.android.art:quuz",
"platform:foo",
+
+ // The configured contents of UpdatableBootJars.
"myapex:bar",
})
@@ -149,11 +152,24 @@
// Make sure that the myplatform-bootclasspath has the correct dependencies.
CheckModuleDependencies(t, result.TestContext, "myplatform-bootclasspath", "android_common", []string{
+ // The following are stubs.
+ `platform:android_stubs_current`,
+ `platform:android_system_stubs_current`,
+ `platform:android_test_stubs_current`,
+ `platform:legacy.core.platform.api.stubs`,
+
+ // Needed for generating the boot image.
`platform:dex2oatd`,
+
+ // The configured contents of BootJars.
`com.android.art:baz`,
`com.android.art:quuz`,
`platform:foo`,
+
+ // The configured contents of UpdatableBootJars.
`myapex:bar`,
+
+ // The fragments.
`com.android.art:art-bootclasspath-fragment`,
})
}