Free-DSL
I built Free-DSL to generate idiomatic Kotlin DSL builders for classes. It uses Kotlin Symbol Processing (KSP) to turn annotations into extension functions and builder classes, giving callers a type-safe syntax for constructing instances.
The generator supports data classes and regular classes with primary constructors, including nested DSL structures, nullable properties, and default values. It works with Kotlin Multiplatform projects.
Learning code generation with Kotlin
Kotlin is, simply put, the better Java. Many common Java idioms are simply a language feature in Kotlin. This greatly reduces the boilerplate needed to write Java-like code. As a fan of Object Oriented Programming (mostly because I haven’t learned how to design in any other paradigm), I love Java, and love Kotlin even more.
This project is also my first foray into writing a compiler plugin using the Kotlin Symbol Processing API.