Let’s kickoff 2025 with a fresh new episode of The Developers’ Bakery! 🎉
Today, we talk about KotlinPoet with Egor Andreevich. KotlinPoet is a library from Square used to generate Kotlin code. It’s a great tool to generate code at compile time, and it’s used by many libraries and frameworks for Android and not only.
Egor has been involved with KotlinPoet for multiple years and today will share with us how KotlinPoet works, when to use it, and how to contribute to the project.
Enjoy the show 👨🍳
Show Notes
- 00.00 Intro
- 00.46 Episode Start
- 01.07 Egor’s Introduction
- 02.07 What is Kotlinpoet?
- 06.34 KotlinPoet use case
- 08.43 When to use code generation?
- 13.58 Templates vs KotlinPoet
- 17.32 Generating code that definitely compiles
- 19.46 Kotlin Poet 2.0
- 24.13 The challenges of KotlinPoet
- 27.44 Doing OSS at Square
- 32.55 Who’s maintaining KotlinPoet?
- 34.01 How to contribute to KotlinPoet?
- 36.53 How Egor got involved with KotlinPoet?
- 38.48 What’s next for KotlinPoet?
- 42.05 Further reading
- 43.38 Where people can find you online?
Resources
- square/kotlinpoet on GitHub
- KotlinPoet Official Website
- Exploring Kotlin Symbol Processing: A Practical Guide - Video From Droidcon London
- @Egorand on GitHub
- @egorand.dev on Bluesky
- Egor’s Blog