Pass annotation processors to kotlinc
Enable the kotlin-annotation-processing plugin and pass annotation
processors to it.
Bug: 122251693
Test: m checkbuild
Test: TestKapt in kotlin_test.go
Change-Id: I841df454beaaa7edd263eea714ca0d958a03c9de
diff --git a/java/builder.go b/java/builder.go
index f1a6ead..40f72e1 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -200,7 +200,7 @@
// ensure java does not fall back to the default bootclasspath.
bootClasspath = `--bootclasspath ""`
} else {
- bootClasspath = strings.Join(flags.bootClasspath.FormTurbineClasspath("--bootclasspath"), " ")
+ bootClasspath = strings.Join(flags.bootClasspath.FormTurbineClasspath("--bootclasspath "), " ")
}
ctx.Build(pctx, android.BuildParams{
@@ -213,7 +213,7 @@
"javacFlags": flags.javacFlags,
"bootClasspath": bootClasspath,
"srcJars": strings.Join(srcJars.Strings(), " "),
- "classpath": strings.Join(flags.classpath.FormTurbineClasspath("--classpath"), " "),
+ "classpath": strings.Join(flags.classpath.FormTurbineClasspath("--classpath "), " "),
"outDir": android.PathForModuleOut(ctx, "turbine", "classes").String(),
"javaVersion": flags.javaVersion,
},
@@ -415,7 +415,7 @@
}
flags := make([]string, len(*x))
for i, v := range *x {
- flags[i] = optName + " " + v.String()
+ flags[i] = optName + v.String()
}
return flags