Type safe experimentation
summary
Generates type-safe Kotlin accessors for Optimizely features and experiments to eliminate string-typo bugs and make unused flags discoverable, using Optimizely as source, KotlinPoet to emit sealed classes/objects and a generic variable type, and kotlin-compile-testing plus reflection to compile and assert generated code contains expected instance and key values. Adds a Gradle plugin and task that fetches flags, writes code into a package, and is verified with Gradle test runs; the demo generation and tests succeed.
AI-written summary · about
chapters (10)
- 0:00Type safe experimentation intro
- 2:12String-based feature flag problems
- 3:14Type safe flag accessors
- 5:44JavaPoet basics
- 7:31Sealed classes for flags
- 11:48Runtime compilation testing
- 15:02Gradle plugin for codegen
- 18:15Plugin implementation testing
- 20:43Demo and showcase
- 21:06Closing remarks & Q&A








