summaryrefslogtreecommitdiff
path: root/java/builder.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-04-22 11:44:34 -0700
committer Colin Cross <ccross@android.com> 2020-04-22 20:43:37 -0700
commit5a11686e64d7c6665589458a94f183d0823dc833 (patch)
tree5150006a20ea968879aecb7dc02a90f222ed206b /java/builder.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/builder.go')
-rw-r--r--java/builder.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/java/builder.go b/java/builder.go
index 3a0247d1e..770e25559 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -191,7 +191,7 @@ type javaBuilderFlags struct {
classpath classpath
java9Classpath classpath
processorPath classpath
- processor string
+ processors []string
systemModules *systemModules
aidlFlags string
aidlDeps android.Paths
@@ -265,8 +265,8 @@ func emitXrefRule(ctx android.ModuleContext, xrefFile android.WritablePath, idx
deps = append(deps, flags.processorPath...)
processor := "-proc:none"
- if flags.processor != "" {
- processor = "-processor " + flags.processor
+ if len(flags.processors) > 0 {
+ processor = "-processor " + strings.Join(flags.processors, ",")
}
intermediatesDir := "xref"
@@ -380,8 +380,8 @@ func transformJavaToClasses(ctx android.ModuleContext, outputFile android.Writab
deps = append(deps, flags.processorPath...)
processor := "-proc:none"
- if flags.processor != "" {
- processor = "-processor " + flags.processor
+ if len(flags.processors) > 0 {
+ processor = "-processor " + strings.Join(flags.processors, ",")
}
srcJarDir := "srcjars"