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
This commit is contained in:
Colin Cross
2023-07-26 16:16:47 -07:00
parent c7c29b9b8e
commit 49889c088b
2 changed files with 2 additions and 2 deletions

View File

@@ -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}",