summaryrefslogtreecommitdiff
path: root/java/kotlin.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-04-22 11:44:34 -0700
committerColin Cross <ccross@android.com>2020-04-22 20:43:37 -0700
commit5a11686e64d7c6665589458a94f183d0823dc833 (patch)
tree5150006a20ea968879aecb7dc02a90f222ed206b /java/kotlin.go
parentff550f3e13ea87e4759898ef1a82590ca57a955b (diff)
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
Diffstat (limited to 'java/kotlin.go')
-rw-r--r--java/kotlin.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/java/kotlin.go b/java/kotlin.go
index cb7da20f8..9b160a082 100644
--- a/java/kotlin.go
+++ b/java/kotlin.go
@@ -136,8 +136,11 @@ func kotlinKapt(ctx android.ModuleContext, outputFile android.WritablePath,
kaptProcessorPath := flags.processorPath.FormRepeatedClassPath("-P plugin:org.jetbrains.kotlin.kapt3:apclasspath=")
kaptProcessor := ""
- if flags.processor != "" {
- kaptProcessor = "-P plugin:org.jetbrains.kotlin.kapt3:processors=" + flags.processor
+ for i, p := range flags.processors {
+ if i > 0 {
+ kaptProcessor += " "
+ }
+ kaptProcessor += "-P plugin:org.jetbrains.kotlin.kapt3:processors=" + p
}
encodedJavacFlags := kaptEncodeFlags([][2]string{