diff options
author | Colin Cross <ccross@android.com> | 2019-01-23 15:39:50 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-01-23 16:14:21 -0800 |
commit | 3a3e94c09a68ff49686f78f9c8a862e2d646bf7d (patch) | |
tree | 2e6ac70c04f7c6496f7ca925ea141ca8acad8a76 /java/java.go | |
parent | 9f100ca0e3a80cf3ae3fc1db92e7f0c0c0eec5f5 (diff) |
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
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go index 7014668f4..89b09d10b 100644 --- a/java/java.go +++ b/java/java.go @@ -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) |