diff --git a/Android.bp b/Android.bp index 8eeb4e860..b9414cede 100644 --- a/Android.bp +++ b/Android.bp @@ -224,6 +224,7 @@ bootstrap_go_package { "java/system_modules.go", ], testSrcs: [ + "java/app_test.go", "java/java_test.go", ], pluginFor: ["soong_build"], diff --git a/java/aapt2.go b/java/aapt2.go index ce307fe79..cebd6d157 100644 --- a/java/aapt2.go +++ b/java/aapt2.go @@ -54,7 +54,7 @@ func pathsToAapt2Paths(ctx android.ModuleContext, resPaths android.Paths) androi var aapt2CompileRule = pctx.AndroidStaticRule("aapt2Compile", blueprint.RuleParams{ - Command: `${config.Aapt2Cmd compile -o $outDir $cFlags --legacy $in`, + Command: `${config.Aapt2Cmd} compile -o $outDir $cFlags --legacy $in`, CommandDeps: []string{"${config.Aapt2Cmd}"}, }, "outDir", "cFlags") @@ -90,10 +90,10 @@ func aapt2Compile(ctx android.ModuleContext, dir android.Path, paths android.Pat var aapt2LinkRule = pctx.AndroidStaticRule("aapt2Link", blueprint.RuleParams{ - Command: `$aapt2Cmd link -o $out $flags --java $genDir --proguard $proguardOptions $inFlags && ` + + Command: `${config.Aapt2Cmd} link -o $out $flags --java $genDir --proguard $proguardOptions $inFlags && ` + `${config.SoongZipCmd} -write_if_changed -jar -o $genJar -C $genDir -D $genDir`, CommandDeps: []string{ - "$aapt2Cmd", + "${config.Aapt2Cmd}", "${config.SoongZipCmd}", }, Restat: true,