Diving into Koin 3.2 & Koin Annotations 1.0
summary
Koin 3.2 adds a constructor DSL so you can declare dependencies with singleOf/factoryOf constructor DSL instead of hand-writing lots of get() calls, warns on constructors over ~10 args (planning ~15), and introduces an includes() for module hierarchy that flattens graphs and optimizes startup. Koin Annotations 1.0 uses Google KSP to generate DSL from annotations like KSP-powered @Single/@Factory annotations, supports component-scan, default generated module, multiplatform, and compiles a 1,000-component app in about 2 seconds.
AI-written summary · about
chapters (13)
- 0:00Introduction to Koin
- 4:18Constructor DSL improvements
- 9:42DSL options and readability
- 12:16Module includes for scalability
- 16:32Constructor DSL full example
- 18:57Introducing Koin Annotations
- 21:06Annotating components
- 25:21Module scanning with annotations
- 27:51KSP generation and setup
- 31:27Koin Annotations setup guide
- 33:38Koin Annotations demos
- 34:22Koin roadmap and future
- 36:11Community and resources
related talks
42mAndroid Architecture Design with Koin
31mKoin in Action - Dependency Injection for Kotlin
49mDependency injection from zero to hero with Koin
28mInsert Koin
44mKoin + Kotlin Compiler = ♥️
40mSimplify your Android development with Koin
36mInvesting in Koin
48mAndroid, Compose, Multiplatform & Server - Inject them all with Koin
