Allow the user to explicitly set the java Uncompress_dex property.

ART tests need to explicitly control the compression.

Bug: 157239179
Test: "atest ArtGtestsTarget" with http://go/aog/1302773
Change-Id: I4490aa0a61fa71f830feb6a46dffd8d20fccfc66
This commit is contained in:
David Srbecky
2020-05-20 22:20:28 +01:00
parent e0937418a9
commit 98c71228f1
6 changed files with 84 additions and 14 deletions

View File

@@ -18,6 +18,7 @@ import (
"strings"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
"android/soong/android"
)
@@ -177,7 +178,7 @@ func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
outDir := android.PathForModuleOut(ctx, "dex")
zipFlags := "--ignore_missing_files"
if j.deviceProperties.UncompressDex {
if proptools.Bool(j.deviceProperties.Uncompress_dex) {
zipFlags += " -L 0"
}
@@ -214,7 +215,7 @@ func (j *Module) compileDex(ctx android.ModuleContext, flags javaBuilderFlags,
},
})
}
if j.deviceProperties.UncompressDex {
if proptools.Bool(j.deviceProperties.Uncompress_dex) {
alignedJavalibJar := android.PathForModuleOut(ctx, "aligned", jarName)
TransformZipAlign(ctx, alignedJavalibJar, javalibJar)
javalibJar = alignedJavalibJar