Skip to content

Commit 57529c8

Browse files
committed
append the semanticdb annotation processor to the testAnnotationProcessor configuration
1 parent b66a423 commit 57529c8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

semanticdb-gradle-plugin/src/main/scala/SemanticdbGradlePlugin.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,15 @@ class SemanticdbGradlePlugin extends Plugin[Project] {
7979

8080
val compilerPluginAdded =
8181
try {
82-
project.getDependencies().add("compileOnly", javacPluginDep)
82+
val dependencies = project.getDependencies()
83+
dependencies.add("compileOnly", javacPluginDep)
84+
dependencies.add("testCompileOnly", javacPluginDep)
8385

8486
if (hasAnnotationPath) {
85-
project
86-
.getDependencies()
87-
.add("annotationProcessor", javacPluginDep)
87+
dependencies.add("annotationProcessor", javacPluginDep)
88+
dependencies.add("testAnnotationProcessor", javacPluginDep)
8889
}
8990

90-
project.getDependencies().add("testCompileOnly", javacPluginDep)
91-
9291
true
9392
} catch {
9493
case exc: Exception =>

0 commit comments

Comments
 (0)