Convert soong java from soong_zip to jar

soong_zip produces jar files that are not compatible with java's
ZipInputStream.  Switch to jar using ugly sed scripts to munge
file lists into the alternating -C and file arguments required
by jar.

Bug: 64536066
Test: m -j checkbuild
Test: build/soong/scripts/jar_args.sh --test
Change-Id: Ifcc4bdab25e7d02342720eb246c673ff9a58bddb
This commit is contained in:
Colin Cross
2017-08-10 17:58:12 -07:00
parent 10a0349d98
commit b852a58aa6
4 changed files with 125 additions and 28 deletions

View File

@@ -53,7 +53,8 @@ func init() {
pctx.SourcePathVariable("JarCmd", "${JavaToolchain}/jar")
pctx.SourcePathVariable("JavadocCmd", "${JavaToolchain}/javadoc")
pctx.StaticVariable("SoongZipCmd", filepath.Join("${bootstrap.ToolDir}", "soong_zip"))
pctx.StaticVariable("Zip2ZipCmd", filepath.Join("${bootstrap.ToolDir}", "zip2zip"))
pctx.SourcePathVariable("JarArgsCmd", "build/soong/scripts/jar-args.sh")
pctx.HostBinToolVariable("DxCmd", "dx")
pctx.HostJavaToolVariable("JarjarCmd", "jarjar.jar")