Add exported_systemserverclasspath_fragments to prebuilt_apex rule.

This is for exporting the contents of systemserverclasspath_fragment for
dexpreopting.

Bug: 194150908
Test: manual - 1. Patch aosp/1818020 and aosp/1834534
  2. m SOONG_CONFIG_art_module_source_build=false com.android.art
Change-Id: I7d2d2e02869d8a523f7c0efbbff81706672a95c5
This commit is contained in:
Jiakai Zhang
2021-09-26 03:54:25 +00:00
parent c9864278da
commit 774dd305f4
3 changed files with 67 additions and 21 deletions

View File

@@ -188,6 +188,19 @@ func TestPrebuiltSystemserverclasspathFragmentContents(t *testing.T) {
prepareForTestWithMyapex,
dexpreopt.FixtureSetApexSystemServerJars("myapex:foo"),
).RunTestWithBp(t, `
prebuilt_apex {
name: "myapex",
arch: {
arm64: {
src: "myapex-arm64.apex",
},
arm: {
src: "myapex-arm.apex",
},
},
exported_systemserverclasspath_fragments: ["mysystemserverclasspathfragment"],
}
java_import {
name: "foo",
jars: ["foo.jar"],
@@ -208,7 +221,13 @@ func TestPrebuiltSystemserverclasspathFragmentContents(t *testing.T) {
}
`)
java.CheckModuleDependencies(t, result.TestContext, "mysystemserverclasspathfragment", "android_common", []string{
java.CheckModuleDependencies(t, result.TestContext, "myapex", "android_common_myapex", []string{
`myapex.apex.selector`,
`prebuilt_mysystemserverclasspathfragment`,
})
java.CheckModuleDependencies(t, result.TestContext, "mysystemserverclasspathfragment", "android_common_myapex", []string{
`myapex.deapexer`,
`prebuilt_foo`,
})
}