Yan Zhulanow
Sep 6, 2018 · 1 min read

Kotlin developer here.

Lombok uses the private Java Compiler API to modify the AST tree of classes being compiled. Kotlin sources have its own AST tree (cause it’s a different language), and of course, Lombok knows nothing about it.

If you only want to use Lombok on Java classes, you don’t need to declare the kaptdependency. Just use annotationProcessor as before.

That said, there’s no reason to use Lombok in your Kotlin project unless you are gradually moving to it from Java.

    Yan Zhulanow

    Written by