diff options
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go index 9000f7478..3d121ccea 100644 --- a/java/java.go +++ b/java/java.go @@ -1446,6 +1446,9 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { kotlincFlags := j.properties.Kotlincflags CheckKotlincFlags(ctx, kotlincFlags) + // Dogfood the JVM_IR backend. + kotlincFlags = append(kotlincFlags, "-Xuse-ir") + // If there are kotlin files, compile them first but pass all the kotlin and java files // kotlinc will use the java files to resolve types referenced by the kotlin files, but // won't emit any classes for them. @@ -3080,21 +3083,21 @@ func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) { dexOutputFile := android.PathForModuleOut(ctx, ctx.ModuleName()+".jar") if j.dexpreopter.uncompressedDex { - rule := android.NewRuleBuilder() + rule := android.NewRuleBuilder(pctx, ctx) temporary := android.PathForModuleOut(ctx, ctx.ModuleName()+".jar.unaligned") rule.Temporary(temporary) // use zip2zip to uncompress classes*.dex files rule.Command(). - BuiltTool(ctx, "zip2zip"). + BuiltTool("zip2zip"). FlagWithInput("-i ", inputJar). FlagWithOutput("-o ", temporary). FlagWithArg("-0 ", "'classes*.dex'") // use zipalign to align uncompressed classes*.dex files rule.Command(). - BuiltTool(ctx, "zipalign"). + BuiltTool("zipalign"). Flag("-f"). Text("4"). Input(temporary). @@ -3102,7 +3105,7 @@ func (j *DexImport) GenerateAndroidBuildActions(ctx android.ModuleContext) { rule.DeleteTemporaryFiles() - rule.Build(pctx, ctx, "uncompress_dex", "uncompress dex") + rule.Build("uncompress_dex", "uncompress dex") } else { ctx.Build(pctx, android.BuildParams{ Rule: android.Cp, |