projectlombok / lombok

Very spicy additions to the Java programming language.
https://projectlombok.org/
Other
12.83k stars 2.37k forks source link

[BUG] Lombok is not Performing Injections in Custom Gradle Task #2665

Open MorningSage opened 3 years ago

MorningSage commented 3 years ago

Describe the bug The annotation processor appears to be ignored when using custom gradle tasks.

To Reproduce Using IntelliJ and any version of Lombok >1.18.x, create a custom gradle task before running the main one. IntelliJ does not complain, but the compiler does not see any of Lombok's changes.

Here is a series of images in case what I'm saying doesn't make sense: https://imgur.com/a/tgj0Sqc

Expected behavior The expected behavior is for Lombok to correctly function as an annotation processor when running any task in Gradle.

Version info (please complete the following information):

Additional context Using Lombok version 1.16.22 works well. Whatever caused this to break was introduced in 1.18.x. If there's anything else I can provide, please let me know. This appears to be similar to https://github.com/gradle/gradle/issues/10997 but I don't know what I'm talking about.

Rawi01 commented 3 years ago

I don't think that there is a relevant change between 1.16.22 and 1.18.0. Have you tried to run your task without InteliJ?

MorningSage commented 3 years ago

I hadn't actually, but I still get the same error running gradlew generateData directly with IntelliJ closed.