What is Koin?


A pragmatic lightweight dependency injection framework for Kotlin developers. Written in pure Kotlin using functional resolution only: no proxy, no code generation, no reflection!


Koin is a DSL, a lightweight container and a pragmatic API.


repositories {
  jcenter()    
}
dependencies {
    // Koin for Kotlin
    compile 'org.koin:koin-core:$koin_version'
}
repositories {
  jcenter()    
}
dependencies {
    // Koin for Android
    compile 'org.koin:koin-android:$koin_version'
    // or Koin for Lifecycle scoping
    compile 'org.koin:koin-android-scope:$koin_version'
    // or Koin for Android Architecture ViewModel
    compile 'org.koin:koin-android-viewmodel:$koin_version'
}
repositories {
  jcenter()    
}
dependencies {
    // Koin for Android
    compile 'org.koin:koin-android:$koin_version'
    // or Koin for Lifecycle scoping
    compile 'org.koin:koin-androidx-scope:$koin_version'
    // or Koin for Android Architecture ViewModel
    compile 'org.koin:koin-androidx-viewmodel:$koin_version'
    // or Koin for Android Fragment Factory (unstable version)
    compile 'org.koin:koin-androidx-fragment:$koin_version'
}
repositories {
  jcenter()    
}
dependencies {
    // Koin for SparkKotlin
    compile 'org.koin:koin-spark:$koin_version'
}
repositories {
  jcenter()    
}
dependencies {
    // Koin for Ktor
    compile 'org.koin:koin-ktor:$koin_version'
}