Fix kotlin annotation processing after java_plugin
I37c1e80eba71ae2d6a06199fb102194a51994989 broke kotlin annotation processing with a typo in the processors flag to kapt and by passing -processor to javac with an empty processorpath. Bug: 77284273 Bug: 122251693 Test: kotlin_test.go Test: m checkbuild Change-Id: I17c45d5b3f9df089231af5d2930646ad0e6bf9be
This commit is contained in:
@@ -493,7 +493,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
||||
// TODO(ccross): move this to a mutator pass that can tell if generated sources contain
|
||||
// Kotlin files
|
||||
ctx.AddVariationDependencies(nil, kotlinStdlibTag, "kotlin-stdlib")
|
||||
if len(j.properties.Annotation_processors) > 0 {
|
||||
if len(j.properties.Annotation_processors) > 0 || len(j.properties.Plugins) > 0 {
|
||||
ctx.AddVariationDependencies(nil, kotlinAnnotationsTag, "kotlin-annotations")
|
||||
}
|
||||
}
|
||||
@@ -1017,6 +1017,7 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
|
||||
srcJars = append(srcJars, kaptSrcJar)
|
||||
// Disable annotation processing in javac, it's already been handled by kapt
|
||||
flags.processorPath = nil
|
||||
flags.processor = ""
|
||||
}
|
||||
|
||||
kotlinJar := android.PathForModuleOut(ctx, "kotlin", jarName)
|
||||
|
Reference in New Issue
Block a user