top of page
droidcon+icon.png
DroidCon_icon_rotatet.png

16-17 JULY 2026

ORLANDO

Anita_Singh_edited.jpg

( SPEAKER )

Anthony Restaino

Principal SDE

( SESSION )

Metaprogramming with Kotlin Symbol Processing

From generating Moshi JSON adapters, to generating dependency injection code with Dagger, to generating database code with Room, most Android developers will interact with a code generator at some point throughout their career. However, the inner workings of these tools are opaque, and writing one can be even more daunting. This talk will walk through a simple example of generating log tags using Kotlin symbol processing. It will aim to make understanding code generators more accessible and to inspire listeners to solve problems with code generation. Key Takeaways: - A short history of code generation on the JVM. - How to identify whether a problem is appropriately solved using metaprogramming techniques. - How to set up a KSP project. - How to use KSP APIs to process code as input and use KotlinPoet to generate code as output. - Where code generation fits in a world where we generate code with LLMs.
bottom of page