Version: 3.2

Koin 3.2

Setup Koin for your project

Version

info

Koin 3.2 is in Beta. Some changes can still occurs in terms of features.

koin_version= "3.2.0"

You can find all Koin packages on maven central.

Gradle dependencies

Add the following Gradle dependencies to add Koin to your project:

// Add Maven Central to your repositories if needed
repositories {
mavenCentral()
}

Kotlin

// Koin Core features
implementation "io.insert-koin:koin-core:$koin_version"
// Koin Test features
testImplementation "io.insert-koin:koin-test:$koin_version"

JUnit

// Koin for JUnit 4
testImplementation "io.insert-koin:koin-test-junit4:$koin_version"
// Koin for JUnit 5
testImplementation "io.insert-koin:koin-test-junit5:$koin_version"

Android

// Koin main features for Android
implementation "io.insert-koin:koin-android:$koin_version"
// No more koin-android-viewmodel, koin-android-scope, koin-android-fragment
// Java Compatibility
implementation "io.insert-koin:koin-android-compat:$koin_version"
// Jetpack WorkManager
implementation "io.insert-koin:koin-androidx-workmanager:$koin_version"
// Navigation Graph
implementation "io.insert-koin:koin-androidx-navigation:$koin_version"

Android Compose

// Jetpack Compose
implementation "io.insert-koin:koin-androidx-compose:$koin_version"

Ktor

// Koin for Ktor
implementation "io.insert-koin:koin-ktor:$koin_version"
// SLF4J Logger
implementation "io.insert-koin:koin-logger-slf4j:$koin_version"