Koin
Koin is a lighter framework that is suitable for smaller apps. It requires no code generation and is built based on Kotlin's functional extensions. It is also a Domain Specific language (DSL). You may have noticed that when using Dagger, there's a lot of code that must be written in order to set up the DI. Koin's approach to DI solves most of those issues, allowing faster integration.
Koin can be added to your project by adding the following dependency to your build.gradle
file:
implementation 'org.koin:koin-android:2.2.0-rc-4'
In order to set up Koin in your application, you need the startKoin
call with the DSL syntax:
class MyApplication : Application() { override fun onCreate() { super.onCreate() startKoin { androidLogger(Level.INFO) ...