From b716ceb832680df341f1644bb7c8c6b18862ff99 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 3 Oct 2023 09:40:06 -0700 Subject: [PATCH] Don't delete withres-withoutdex jar from R8 rules R8 rules produce a depfile generated by R8. R8 sees the withres-withoutdex jar as an input, and so adds it to the depfile. If the jar is deleted after running R8 then ninja will always consider the rule dirty, as the input file listed in the depfile is missing. Fixes: 303064127 Test: m Calendar && m Calendar Test: m framework-minus-apex && m framework-minus-apex Change-Id: I5cbd780b56fc131b58598d6e569a8a78b7fe9395 --- java/dex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/dex.go b/java/dex.go index 3468a7054..1aa4d1c69 100644 --- a/java/dex.go +++ b/java/dex.go @@ -154,7 +154,7 @@ var r8, r8RE = pctx.MultiCommandRemoteStaticRules("r8", `rm -rf ${outUsageDir} && ` + `$zipTemplate${config.SoongZipCmd} $zipFlags -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` + `${config.MergeZipsCmd} -D -stripFile "**/*.class" $mergeZipsFlags $out $outDir/classes.dex.jar $in && ` + - `rm -f "$tmpJar" "$outDir/classes*.dex" "$outDir/classes.dex.jar"`, + `rm -f "$outDir/classes*.dex" "$outDir/classes.dex.jar"`, Depfile: "${out}.d", Deps: blueprint.DepsGCC, CommandDeps: []string{