While Dagger has been the go to library for DI in Android, in this talk we explore Koin (which recently hit 2.0) and see whether it can be a viable alternative for you and how it compares with Dagger.
val kClass = T"::class lateinit var instance: T val ctor = kClass.getFirstJavaConstructor() val args = getArguments(ctor, context) instance = ctor.makeInstance(args) return instance }
✓ Ideal for large projects x Complexity x Build times KOIN ✓ Easy to learn ✓ Quick build times ✓ Ideal for mid sized projects x Breaks at runtime x Manual graph maintenance x Scales poorly