From 6981f658ef04976437ff69e4ba634d213843d531 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 7 Mar 2018 15:14:50 -0800 Subject: [PATCH] Use turbine's native source jar support Turbine doesn't need extract_srcjars.sh, just pass the source jars with --source_jars. Bug: 74339924 Test: m checkbuild Change-Id: Ie7fe06f5a9f5e29287cf79c2d46b23a676a03d41 --- java/builder.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/builder.go b/java/builder.go index b8f8351fb..6d894a338 100644 --- a/java/builder.go +++ b/java/builder.go @@ -104,10 +104,9 @@ var ( turbine = pctx.AndroidStaticRule("turbine", blueprint.RuleParams{ - Command: `rm -rf "$outDir" "$srcJarDir" && mkdir -p "$outDir" "$srcJarDir" && ` + - `${config.ExtractSrcJarsCmd} $srcJarDir $srcJarDir/list $srcJars && ` + + Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` + `${config.JavaCmd} -jar ${config.TurbineJar} --output $out.tmp ` + - `--temp_dir "$outDir" --sources @$out.rsp @$srcJarDir/list ` + + `--temp_dir "$outDir" --sources @$out.rsp --source_jars $srcJars ` + `--javacopts ${config.CommonJdkFlags} ` + `$javacFlags -source $javaVersion -target $javaVersion $bootClasspath $classpath && ` + `${config.Ziptime} $out.tmp && ` + @@ -116,14 +115,12 @@ var ( "${config.TurbineJar}", "${config.JavaCmd}", "${config.Ziptime}", - "${config.ExtractSrcJarsCmd}", }, Rspfile: "$out.rsp", RspfileContent: "$in", Restat: true, }, - "javacFlags", "bootClasspath", "classpath", "srcJars", "srcJarDir", - "outDir", "javaVersion") + "javacFlags", "bootClasspath", "classpath", "srcJars", "outDir", "javaVersion") jar = pctx.AndroidStaticRule("jar", blueprint.RuleParams{ @@ -258,7 +255,6 @@ func TransformJavaToHeaderClasses(ctx android.ModuleContext, outputFile android. "javacFlags": flags.javacFlags, "bootClasspath": bootClasspath, "srcJars": strings.Join(srcJars.Strings(), " "), - "srcJarDir": android.PathForModuleOut(ctx, "turbine", "srcjars").String(), "classpath": flags.classpath.FormJavaClassPath("--classpath"), "outDir": android.PathForModuleOut(ctx, "turbine", "classes").String(), "javaVersion": flags.javaVersion,