NAPT - sergei-lapin/pimp-my-gradle-recipes GitHub Wiki

NAPT is a javac plugin that enables direct usage of Java APT with Kotlin skipping java stub generartion step, hence increasing APT performance by ~50%.

How does it work?

  1. NAPT is applied during Java compilation process
  2. It takes previously compiled Kotlin classes and puts them into javac classes option from within the same javac invocation
  3. Then Java APT does it's work and we get generated Java classes, which we can reference from our bridge classes
  4. Since we can reference Java bridge classes in Kotlin code — we transitively reference generated Java code.
  5. Profit!

For more info please refer to NAPT github repo