generate-kotlin-multiple-rounds icon indicating copy to clipboard operation
generate-kotlin-multiple-rounds copied to clipboard

Android sample project demonstrating how to generate Kotlin code through annotation processing, and then feeding it into a second round of annotation processing.

Sample created for the article "Pushing the limits of Kotlin annotation processing".


This sample Android project demonstrates:

  1. Generating Kotlin code though an annotation processor.
  2. Feeding that generated code into a second round of annotation processing by putting it into a Gradle module and consuming it into another one.
  3. Testing that a second round of processing has happened. In this case Dagger 2 (used as an example) is consuming the previously generated code to generate additional classes.