Align jar file after calling merge-zips when dex is uncompressed.

Noticed this while changing a some dex build rules.

Test: m
Change-Id: I9838e81e0e98be49d34554041a5a942b64259aaa
This commit is contained in:
Nicolas Geoffray
2019-01-23 15:57:21 +00:00
parent 3a3e94c09a
commit f343872a8d

View File

@@ -1244,8 +1244,14 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
combinedJar := android.PathForModuleOut(ctx, "dex-withres", jarName) combinedJar := android.PathForModuleOut(ctx, "dex-withres", jarName)
TransformJarsToJar(ctx, combinedJar, "for dex resources", jars, android.OptionalPath{}, TransformJarsToJar(ctx, combinedJar, "for dex resources", jars, android.OptionalPath{},
false, nil, nil) false, nil, nil)
if j.deviceProperties.UncompressDex {
combinedAlignedJar := android.PathForModuleOut(ctx, "dex-withres-aligned", jarName)
TransformZipAlign(ctx, combinedAlignedJar, combinedJar)
dexOutputFile = combinedAlignedJar
} else {
dexOutputFile = combinedJar dexOutputFile = combinedJar
} }
}
j.dexJarFile = dexOutputFile j.dexJarFile = dexOutputFile