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:
@@ -540,16 +540,17 @@ func (a *AndroidApp) dexBuildActions(ctx android.ModuleContext) android.Path {
|
||||
installDir = filepath.Join("app", a.installApkName)
|
||||
}
|
||||
a.dexpreopter.installPath = android.PathForModuleInstall(ctx, installDir, a.installApkName+".apk")
|
||||
a.dexpreopter.uncompressedDex = a.shouldUncompressDex(ctx)
|
||||
|
||||
if a.deviceProperties.Uncompress_dex == nil {
|
||||
// If the value was not force-set by the user, use reasonable default based on the module.
|
||||
a.deviceProperties.Uncompress_dex = proptools.BoolPtr(a.shouldUncompressDex(ctx))
|
||||
}
|
||||
a.dexpreopter.uncompressedDex = *a.deviceProperties.Uncompress_dex
|
||||
a.dexpreopter.enforceUsesLibs = a.usesLibrary.enforceUsesLibraries()
|
||||
a.dexpreopter.usesLibs = a.usesLibrary.usesLibraryProperties.Uses_libs
|
||||
a.dexpreopter.optionalUsesLibs = a.usesLibrary.presentOptionalUsesLibs(ctx)
|
||||
a.dexpreopter.libraryPaths = a.usesLibrary.usesLibraryPaths(ctx)
|
||||
a.dexpreopter.manifestFile = a.mergedManifestFile
|
||||
|
||||
a.deviceProperties.UncompressDex = a.dexpreopter.uncompressedDex
|
||||
|
||||
if ctx.ModuleName() != "framework-res" {
|
||||
a.Module.compile(ctx, a.aaptSrcJar)
|
||||
}
|
||||
|
Reference in New Issue
Block a user