After upgrading to gradle 4.7, my previously warning-free build now emits this warning:
The following annotation processors were detected on the compile c
Gradle added annotationProcessor in 4.6 and Lombok is an annotation processor even though their documentation is not really clear about this when using Gradle they are also aware of it as they recommend it when using Android Studio. So short answer is to use:
dependencies {
compileOnly('org.projectlombok:lombok:1.18.0')
annotationProcessor('org.projectlombok:lombok:1.18.0')
}