Fix source jars
Source jars were not working as designed because javac will only
compile files from the -sourcepath if there are references to them
starting from files on the command line. Switch to extracting
the source jars into a directory and passing a list of the files
to javac.
Test: m checkbuild
Change-Id: I9f7d824f8538d081b2f5ad64ae3cbfd0e96213af
diff --git a/java/gen.go b/java/gen.go
index a0e090b..8fa199e 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -85,7 +85,7 @@
}
func (j *Module) genSources(ctx android.ModuleContext, srcFiles android.Paths,
- flags javaBuilderFlags) (android.Paths, classpath) {
+ flags javaBuilderFlags) (android.Paths, android.Paths) {
var protoFiles android.Paths
outSrcFiles := make(android.Paths, 0, len(srcFiles))
@@ -106,7 +106,7 @@
}
}
- var outSrcJars classpath
+ var outSrcJars android.Paths
if len(protoFiles) > 0 {
protoSrcJar := android.PathForModuleGen(ctx, "proto.src.jar")