Automatically set uncompress_dex for java_import.

Setting uncompress_dex for java_import in the same way
as java_library enables using a java_import as an art
jar or a boot jar.

Bug: 175619567
Test: m nothing
Test: TestHiddenAPISingletonWithPrebuilt
Change-Id: I0b552a11d1630a014cf978520ccc5977fdf74066
This commit is contained in:
Bill Peckham
2020-12-23 16:13:04 -08:00
parent 7dbc5786e3
commit ff89ffae0b
2 changed files with 16 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
hiddenAPI := ctx.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
want := "--boot-dex=" + buildDir + "/.intermediates/foo/android_common/dex/foo.jar"
want := "--boot-dex=" + buildDir + "/.intermediates/foo/android_common/aligned/foo.jar"
if !strings.Contains(hiddenapiRule.RuleParams.Command, want) {
t.Errorf("Expected %s in hiddenapi command, but it was not present: %s", want, hiddenapiRule.RuleParams.Command)
}