Can I use Lombok with Kotlin?

I have a Kotlin Gradle project. I added Kotlin as a dependency, and also registered it with kapt

compileOnly("org.projectlombok:lombok:$lombokVersion")
kapt("org.projectlombok:lombok:$lombokVersion")

I would like to use only the announcement @Slf4jfor automatic creation log. It works for Java classes, but not for Kotlin ones.

Is using Kotling and Lombok together even possible at the moment?

EDIT: Add More Information

If I annotate the Kotlin class with @Slf4jand use loginside it, I get

Unauthorized link: log

Obviously, annotation processing does not apply.

+4
source share
3 answers

, . , , Java. Kotlin . . fooobar.com/questions/166334/... .

+3

, , .

+1

, lombok. , , , Java.

0

Source: https://habr.com/ru/post/1684994/


All Articles