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
This commit is contained in:
Colin Cross
2019-01-17 15:42:52 -08:00
parent 21fc9bbe19
commit afbb1734f6
8 changed files with 248 additions and 14 deletions

View File

@@ -200,7 +200,7 @@ func TransformJavaToHeaderClasses(ctx android.ModuleContext, outputFile android.
// 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 @@ func TransformJavaToHeaderClasses(ctx android.ModuleContext, outputFile android.
"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 @@ func (x *classpath) FormTurbineClasspath(optName string) []string {
}
flags := make([]string, len(*x))
for i, v := range *x {
flags[i] = optName + " " + v.String()
flags[i] = optName + v.String()
}
return flags