Support dex_import on platform_bootclasspath am: 4977540bcb am: d40a947de4

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690875

Change-Id: I0b3db8fc192526b65aeecf406adceb2a37339002
This commit is contained in:
Paul Duffin 2021-05-04 18:12:26 +00:00 committed by Automerger Merge Worker
commit 07ec76efa9
2 changed files with 19 additions and 0 deletions

View File

@ -321,6 +321,8 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
}
hiddenAPISupportingModules = append(hiddenAPISupportingModules, hiddenAPISupportingModule)
} else if _, ok := module.(*DexImport); ok {
// Ignore this for the purposes of hidden API processing
} else {
ctx.ModuleErrorf("module %s of type %s does not support hidden API processing", module, ctx.OtherModuleType(module))
}

View File

@ -133,6 +133,23 @@ func TestPlatformBootclasspath(t *testing.T) {
"platform:bar",
})
})
t.Run("dex import", func(t *testing.T) {
result := android.GroupFixturePreparers(
preparer,
android.FixtureAddTextFile("deximport/Android.bp", `
dex_import {
name: "foo",
jars: ["a.jar"],
}
`),
).RunTest(t)
CheckPlatformBootclasspathModules(t, result, "platform-bootclasspath", []string{
"platform:prebuilt_foo",
"platform:bar",
})
})
}
func TestPlatformBootclasspath_Fragments(t *testing.T) {