Code generation for the masses
summary
Shows why code generation pays off and how to build one: common Android tools used are Moshi codegen, Dagger, Room, AutoValue, Protocol Buffers, SQLDelight and Swagger/OpenAPI, plus templating with KotlinPoet or FreeMarker/Mustache. Demonstrates a working generator that curls the IANA top‑level domain list and emits a static lookup for faster checks, and a template that generates API call classes from a Swagger spec. Recommends strict JSON schemas, CI to regenerate artifacts, and prefers model‑file generators over complex annotation processors.
AI-written summary · about
chapters (6)
- 0:00Introduction to code generators
- 6:49Annotation processor examples
- 13:50Model-based code generators
- 20:09Building your own generator
- 33:48Long-term benefits of generators
- 40:25Q&A on code generation
related talks
54mCode Generation from A to Z
51mGenerate You Some Code for Great Good
38mCode Generation and How to Use It Effectively
51mCode generation tips you didn't ask for
51mCode generation tips you didn't ask for
42mC# Code Generators: Writing Code That Writes Code
48mCode Generation in 2024: How AI Will Take Your Job…to the Next Level!
37mThings I learned after a decade of writing code generators
