I’ve followed some online information on how to setup Project Lombok (http://projectlombok.org/) with Gradle. My build script looks like this:
apply plugin: "java"
apply plugin: "eclipse"
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
}
configurations {
compileOnly
testCompileOnly { extendsFrom compileOnly }
}
sourceSets {
main {
compileClasspath += configurations.compileOnly
}
test {
compileClasspath += configurations.compileOnly + configurations.testCompileOnly
}
}
dependencies {
compileOnly group: "org.projectlombok", name: "lombok", version: "0.10.1"
// etc...
}
This works very well except when I generate an eclipse project (using “gradle eclipse”), the lombok jar isn’t added to eclipse’s .classpath config file.
How do I reconfigure the gradle eclipse plugin to add the “compileOnly” configuration to the eclipse .classpath file generation?