diff options
author | Kousik Kumar <kousikk@google.com> | 2020-05-29 03:31:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-05-29 03:31:20 +0000 |
commit | c4cdba07d33b7946d8ef47437e9f79473878103b (patch) | |
tree | 45f8f705de9621f0d949e30ba1551797a5b29e05 /java/java.go | |
parent | ad43500655f54ae1f21f94c0540473e9d2952d71 (diff) | |
parent | 366afc5011ca300d6bd14246c29e08b77387a12d (diff) |
Merge "Add support for remote-execution / caching of jar/zip actions"
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go index 032aee610..162141d83 100644 --- a/java/java.go +++ b/java/java.go @@ -1456,13 +1456,19 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { serviceFile := file.String() zipargs = append(zipargs, "-C", filepath.Dir(serviceFile), "-f", serviceFile) } + rule := zip + args := map[string]string{ + "jarArgs": "-P META-INF/services/ " + strings.Join(proptools.NinjaAndShellEscapeList(zipargs), " "), + } + if ctx.Config().IsEnvTrue("RBE_ZIP") { + rule = zipRE + args["implicits"] = strings.Join(services.Strings(), ",") + } ctx.Build(pctx, android.BuildParams{ - Rule: zip, + Rule: rule, Output: servicesJar, Implicits: services, - Args: map[string]string{ - "jarArgs": "-P META-INF/services/ " + strings.Join(proptools.NinjaAndShellEscapeList(zipargs), " "), - }, + Args: args, }) jars = append(jars, servicesJar) } |