Repeat kapt processor argument for multiple processors
kapt claims to support a comma separated list of annotation processors, but it errors if multiple annotation processors are given. Surrounding the the list with {} does not error, but it also doesn't even warn if the second element in the list is garbage, so it may not be running the second processor. Repeat the processor argument for each annotation processor class instead. Bug: 154736649 Test: TestKapt Test: m checkbuild Change-Id: I4c7c161dbf867d7fba1aaf16fd5e502647e3f682
This commit is contained in:
@@ -1130,7 +1130,8 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB
|
||||
flags.java9Classpath = append(flags.java9Classpath, deps.java9Classpath...)
|
||||
flags.processorPath = append(flags.processorPath, deps.processorPath...)
|
||||
|
||||
flags.processor = strings.Join(deps.processorClasses, ",")
|
||||
flags.processors = append(flags.processors, deps.processorClasses...)
|
||||
flags.processors = android.FirstUniqueStrings(flags.processors)
|
||||
|
||||
if len(flags.bootClasspath) == 0 && ctx.Host() && !flags.javaVersion.usesJavaModules() &&
|
||||
decodeSdkDep(ctx, sdkContext(j)).hasStandardLibs() {
|
||||
@@ -1265,7 +1266,7 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
|
||||
srcJars = append(srcJars, kaptSrcJar)
|
||||
// Disable annotation processing in javac, it's already been handled by kapt
|
||||
flags.processorPath = nil
|
||||
flags.processor = ""
|
||||
flags.processors = nil
|
||||
}
|
||||
|
||||
kotlinJar := android.PathForModuleOut(ctx, "kotlin", jarName)
|
||||
|
Reference in New Issue
Block a user