summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ulf Adams <ulf@engflow.com> 2020-11-25 23:07:23 +0100
committer Ulf Adams <ulf@engflow.com> 2020-11-25 23:07:23 +0100
commit7e7ef56077a6a138d8e4d07295f0b6d09dee18f7 (patch)
tree6ff7eed5af0b741ec2801cd021b161cf1ec98cfe
parent0066864a0235c7ce2bd57de775a39db2bc806cfa (diff)
Soong: remove output file before running signapk
It looks like there is a bug in rewrapper/reproxy that makes it upload the output file as an input if it still exists in the output tree. This causes unnecessary cache misses on incremental builds, and can also cause the action to fail remotely (depending on the service). By removing the output file at the beginning of the action, we ensure that it can't be uploaded. Test: ran against a remote execution server; actions no longer fail remotely Change-Id: Iaac2b23b35d2c876c0244edbfd4a8f159df0563c
-rw-r--r--java/app_builder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/app_builder.go b/java/app_builder.go
index 69e462c3d..b53c15ab4 100644
--- a/java/app_builder.go
+++ b/java/app_builder.go
@@ -32,7 +32,7 @@ import (
var (
Signapk, SignapkRE = remoteexec.StaticRules(pctx, "signapk",
blueprint.RuleParams{
- Command: `$reTemplate${config.JavaCmd} ${config.JavaVmFlags} -Djava.library.path=$$(dirname ${config.SignapkJniLibrary}) ` +
+ Command: `rm -f $out && $reTemplate${config.JavaCmd} ${config.JavaVmFlags} -Djava.library.path=$$(dirname ${config.SignapkJniLibrary}) ` +
`-jar ${config.SignapkCmd} $flags $certificates $in $out`,
CommandDeps: []string{"${config.SignapkCmd}", "${config.SignapkJniLibrary}"},
},