summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2019-01-23 15:57:21 +0000
committerNicolas Geoffray <ngeoffray@google.com>2019-01-24 06:38:14 +0000
commitf343872a8d2bdca768c32326aa3c56db2e6dd210 (patch)
tree866d70095cf7eb2e2b99d37a0fd90b053fd5b55f /java/java.go
parent3a3e94c09a68ff49686f78f9c8a862e2d646bf7d (diff)
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
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 89b09d10b..a76cde54f 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1244,7 +1244,13 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
combinedJar := android.PathForModuleOut(ctx, "dex-withres", jarName)
TransformJarsToJar(ctx, combinedJar, "for dex resources", jars, android.OptionalPath{},
false, nil, nil)
- dexOutputFile = combinedJar
+ if j.deviceProperties.UncompressDex {
+ combinedAlignedJar := android.PathForModuleOut(ctx, "dex-withres-aligned", jarName)
+ TransformZipAlign(ctx, combinedAlignedJar, combinedJar)
+ dexOutputFile = combinedAlignedJar
+ } else {
+ dexOutputFile = combinedJar
+ }
}
j.dexJarFile = dexOutputFile