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
This commit is contained in:
Paul Duffin
2021-04-21 14:10:42 +01:00
parent 3e7fcc3fe7
commit 74431d57c6
5 changed files with 209 additions and 143 deletions

View File

@@ -137,9 +137,12 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
)
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 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
// 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`,
})
}