Intellij Idea + Lombok + Gradle 5 = broken build

Answered

I'm trying to get Lombok to work with Gradle and Intellij Idea (2018.2.6).

I have the following dependencies in my build.gradle:

compileOnly "org.projectlombok:lombok:1.18.6" 
annotationProcessor "org.projectlombok:lombok:1.18.6"

Everything works fine in Gradle 4.10, but as soon as I update to any version of Gradle 5, it breaks.  If I remove the "compileOnly" dependency, Intellij is happy, but Gradle breaks.

Does anyone know how I can get Lombok to work in Intellij Idea with Gradle 5?

 

Thanks in advance,

Steve Saliman

0
4 comments

Sounds like: https://youtrack.jetbrains.com/issue/IDEA-208205 Does it look similar? What exactly breaks?

0
Avatar
Permanently deleted user

I think my error may be slightly different.  In my case, the issue is best seen in the module's dependencies.  Under Gradle 4, there is a lombok dependency in the "PROVIDED" scope.  Under Gradle 5, there isn't.  If I remove the "compileOnly" dependency, it works, but Gradle doesn't.  I uploaded test-project.tgz to https://uploads.services.jetbrains.com to show the issue. 

This does seem to work in Idea 2019.1, but I can't upgrade to that version at the moment, is there a way to get this working in 2018.2?

0

I see. There was a related issue: https://youtrack.jetbrains.com/issue/IDEA-201974 that is fixed since 2018.3.X versions. I'm afraid back-ports to 2018.2 are not possible. The will be no updates for 2018.2.X versions since the are 2018.3.X and 2019.1.X versions already.

By the way attached project works with 2018.2.7 version for me.

0
Avatar
Permanently deleted user

Thank you for the response.  I hadn't even thought of checking WHICH version of 2018.2 I had.  Turns out I had 2018.2.6.  I updated to .7, and it now works for me as well.

Thanks again,

Steve

0

Please sign in to leave a comment.