franzbecker / gradle-lombok

Gradle plugin for Lombok support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use new "compileOnly" dependency type

florian-negre-cbp opened this issue · comments

Hi,
When I use the task war on my project, Lombok is included in the package.
The fix done in #16 doesn't resolve my usecase.

To exclude the library, I have to write : compileOnly 'org.projectlombok:lombok:1.16.20' in my project.
I'm using Gradle 4.5

I agree it’s probably time to remove the Gradle 2.x support ;-) I’ll hopefully find time to do that as soon as possible.

I upgraded Gradle (3.0) and now I can't use Lombok annotations in JUnit Tests. I think its related to dependency type.

dependencies {
	compileOnly 'org.projectlombok:lombok:1.16.20'
        testCompileOnly 'org.projectlombok:lombok:1.16.20'
	annotationProcessor 'org.projectlombok:lombok:1.16.20'
}

We have to specify testAnnotationProcessor processor separately now.

dependencies {
	compileOnly 'org.projectlombok:lombok:1.16.20'
        testCompileOnly 'org.projectlombok:lombok:1.16.20'
	annotationProcessor 'org.projectlombok:lombok:1.16.20'
        testAnnotationProcessor 'org.projectlombok:lombok:1.16.20'
}

Using the compileOnly scope directly introduced a few issues with the Delombok task. The proposed solution in #35 should fix this issue.