summaryrefslogtreecommitdiff
path: root/java/builder.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-07-26 16:16:47 -0700
committer Colin Cross <ccross@android.com> 2023-07-27 14:57:45 +0000
commit49889c088b22278436d754ee6d2fbc666df59477 (patch)
treed17c9bda2c025913e2e78dd3efb273d81eb60b84 /java/builder.go
parentc7c29b9b8e3c5063d33f646788caeb7748daa564 (diff)
Delete the javac/classes directory after zipping it
javac produces a directory containing class files, which is then zipped with soong_zip into a jar file. The class files are never used outside of the rule, so delete them after zipping them. This should save 19 GB of disk space in checkbuilds. Do the same for kotlinc/classes directories for consistency. Bug: 293352015 Test: treehugger Change-Id: Id1e889cfbee47eab552a5bb27134fa4b3b4c4d14
Diffstat (limited to 'java/builder.go')
-rw-r--r--java/builder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/builder.go b/java/builder.go
index afbd69ee4..debf49a00 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -55,7 +55,7 @@ var (
`$zipTemplate${config.SoongZipCmd} -jar -o $out.tmp -C $outDir -D $outDir && ` +
`if ! cmp -s "$out.tmp" "$out"; then mv "$out.tmp" "$out"; fi && ` +
`if ! cmp -s "$annoSrcJar.tmp" "$annoSrcJar"; then mv "$annoSrcJar.tmp" "$annoSrcJar"; fi && ` +
- `rm -rf "$srcJarDir"`,
+ `rm -rf "$srcJarDir" "$outDir"`,
CommandDeps: []string{
"${config.JavacCmd}",
"${config.SoongZipCmd}",