Allow platform_bootclasspath to specify contributing fragments

Adds the fragments property to the platform_bootclasspath to allow the
fragments that contribute to it to be specified.

Bug: 177892522
Test: m nothing
Change-Id: I14f83d9336f6984442c7315cc86dfdd0a0fd2d20
This commit is contained in:
Paul Duffin
2021-04-07 20:35:11 +01:00
parent b432df9cda
commit 62d8c3b110
3 changed files with 78 additions and 0 deletions

View File

@@ -127,10 +127,28 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
platform_bootclasspath {
name: "myplatform-bootclasspath",
fragments: [
{
apex: "com.android.art",
module: "art-bootclasspath-fragment",
},
],
}
`,
)
java.CheckPlatformBootclasspathModules(t, result, "myplatform-bootclasspath", []string{
"com.android.art:baz",
"com.android.art:quuz",
"platform:foo",
"myapex:bar",
})
java.CheckPlatformBootclasspathFragments(t, result, "myplatform-bootclasspath", []string{
`com.android.art:art-bootclasspath-fragment`,
})
// Make sure that the myplatform-bootclasspath has the correct dependencies.
CheckModuleDependencies(t, result.TestContext, "myplatform-bootclasspath", "android_common", []string{
`platform:dex2oatd`,
@@ -138,6 +156,7 @@ func TestPlatformBootclasspathDependencies(t *testing.T) {
`com.android.art:quuz`,
`platform:foo`,
`myapex:bar`,
`com.android.art:art-bootclasspath-fragment`,
})
}