I have received the following message when working with a gradle 4.7 project
The following annotation processors were detected on the compile classpath: 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor' and 'lombok.launch.AnnotationProcessorHider$ClaimingProcessor'. Detecting annotation processors on the compile classpath is
Deprecated and Gradle 5.0 will ignore them. Please add them to the annotation processor path instead. If you did not intend to use annotation processors, you can use the '-proc:none' compiler argument to ignore them.
when running
gradlew build --warning-mode=all
on a project with the following Gradle configuration
compileOnly('org.projectlombok:lombok')
testCompileOnly('org.projectlombok:lombok')
As the warning suggests, it is recommended to place these on the annotationProcessor
(and testAnnotationProcessor
) configurations in order to be compatible with gradle 5.0
annotationProcessor('org.projectlombok:lombok')
testAnnotationProcessor('org.projectlombok:lombok')
However, with a simple test:
@Slf4j
public class LombokTests {
@Test
public void lombokCompiles() {
log.info("foobar");
}
}
That configuration fails:
> Task :compileTestJava FAILED
D:\Users\bobjones\repos\my-new-app\src\test\java\com\example\app\LombokTests.java:10: error: cannot find symbol
@Slf4j
^
symbol: class Slf4j
1 error
Am I missing something?