Koin
Pragmatic dependency injection.
What is Koin
Koin is a lightweight DI framework configured with a readable Kotlin DSL — no annotations or codegen.
Install
implementation("io.insert-koin:koin-core:4.0.0")Usage
val appModule = module {
single { UserRepository() }
factory { UserService(get()) }
}
startKoin { modules(appModule) }Docs
Official documentation: Koin.