I was about building a gradle 5 project in IDEA. The lombok dependency was set to compileOnly in the build.gradle file and running it resulted in success from command line and IDEA gradle tool as well.
"Funny" fact, that lombok isn't included in Source Sets, so my lombok imports are failing....
In the reality, it does not work. Any Gradle plugin, or idea to solve this issue? :)
Thanks.
ui.:
VERSION 1 Using compileOnly & annotationProcessor both for prod code and tests resulted in
- from command-line, gradle is able to run everything with SUCCESS
- from IDEA, it's impossible, imports are failing with lombok
VERSION 2 Using compile & annotationProcessor
- from command-line, gradle is able to run everything with SUCCESS
- from IDEA, imports are OK, everything is fine
dependencies {...compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}")...}