diff --git a/README.md b/README.md index b7b7450b4..53d24651b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![logo](./docs/img/koin_main_logo.png) -[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.22-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org) +[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.24-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org) ![Github Actions](https://github.com/InsertKoinIO/koin/actions/workflows/build.yml/badge.svg) [![Apache 2 License](https://img.shields.io/github/license/InsertKoinIO/koin)](https://github.com/InsertKoinIO/koin/blob/main/LICENSE.txt) [![Slack channel](https://img.shields.io/badge/Chat-Slack-orange.svg?style=flat&logo=slack)](https://kotlinlang.slack.com/messages/koin/) @@ -15,29 +15,33 @@ Koin is a pragmatic lightweight dependency injection framework for Kotlin develo ## Setup & Current Version -Here are the current available Koin project versions: -- stable: `3.5.5` -- unstable: `3.6.0-Beta2` +Here are the current available Koin project versions: ![](https://img.shields.io/badge/stable-version-blue) ![](https://img.shields.io/badge/unstable-version-orange) + +- Koin ![](https://img.shields.io/badge/3.5.6-blue) ![](https://img.shields.io/badge/3.6.0-Beta4-orange) +- Koin for Compose ![](https://img.shields.io/badge/1.1.5-blue) ![](https://img.shields.io/badge/1.2.0-Beta4-orange) +- Koin Annotations ![](https://img.shields.io/badge/1.3.1-blue) ![](https://img.shields.io/badge/1.4.0-Alpha1-orange) ## Koin Packages -| Project | Version | +| Project | Versions | |----------|:-------------:| -| koin-bom | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-bom)](https://mvnrepository.com/artifact/io.insert-koin/koin-bom) | -| koin-core | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-core)](https://mvnrepository.com/artifact/io.insert-koin/koin-core) | -| koin-core-coroutines | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-core-coroutines)](https://mvnrepository.com/artifact/io.insert-koin/koin-core-coroutines) | -| koin-test | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-test)](https://mvnrepository.com/artifact/io.insert-koin/koin-test) | -| koin-android | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-android)](https://mvnrepository.com/artifact/io.insert-koin/koin-android) | -| koin-android-test | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-android-test)](https://mvnrepository.com/artifact/io.insert-koin/koin-android-test) | -| koin-android-compat | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-android-compat)](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compat) | -| koin-androidx-navigation | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-androidx-navigation)](https://mvnrepository.com/artifact/io.insert-koin/koin-androidx-navigation) | -| koin-androidx-workmanager | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-androidx-workmanager)](https://mvnrepository.com/artifact/io.insert-koin/koin-androidx-workmanager) | -| koin-androidx-compose | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-androidx-compose)](https://mvnrepository.com/artifact/io.insert-koin/koin-androidx-compose) | -| koin-androidx-compose-navigation | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-androidx-compose-navigation)](https://mvnrepository.com/artifact/io.insert-koin/koin-androidx-compose-navigation) | -| koin-compose | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-compose)](https://mvnrepository.com/artifact/io.insert-koin/koin-compose) | -| koin-ktor | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-ktor)](https://mvnrepository.com/artifact/io.insert-koin/koin-ktor) | -| koin-logger-slf4j | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-logger-slf4j)](https://mvnrepository.com/artifact/io.insert-koin/koin-logger-slf4j) | -| koin-annotations | [![Maven Central](https://img.shields.io/maven-central/v/io.insert-koin/koin-annotations)](https://mvnrepository.com/artifact/io.insert-koin/koin-annotations) | +| [koin-bom](https://mvnrepository.com/artifact/io.insert-koin/koin-bom) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-core](https://mvnrepository.com/artifact/io.insert-koin/koin-core) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-core-coroutines](https://mvnrepository.com/artifact/io.insert-koin/koin-core-coroutines) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-test](https://mvnrepository.com/artifact/io.insert-koin/koin-test) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android](https://mvnrepository.com/artifact/io.insert-koin/koin-android) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-test](https://mvnrepository.com/artifact/io.insert-koin/koin-android-test) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-compat](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compat) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-navigation](https://mvnrepository.com/artifact/io.insert-koin/koin-android-navigation) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-workmanager](https://mvnrepository.com/artifact/io.insert-koin/koin-android-workmanager) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-compose](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compose) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-android-compose-navigation](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compose-navigation) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-ktor](https://mvnrepository.com/artifact/io.insert-koin/koin-ktor) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-compose](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compose-navigation) | ![](https://img.shields.io/badge/1.1.5-blue) - ![](https://img.shields.io/badge/1.2.0-Beta4-orange) | +| [koin-compose-viewmodel](https://mvnrepository.com/artifact/io.insert-koin/koin-android-compose-navigation) | ![](https://img.shields.io/badge/1.2.0-Beta4-orange) | +| [koin-ktor](https://mvnrepository.com/artifact/io.insert-koin/koin-ktor) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-logger-slf4](https://mvnrepository.com/artifact/io.insert-koin/koin-logger-slf4) | ![](https://img.shields.io/badge/3.5.6-blue) - ![](https://img.shields.io/badge/3.6.0-Beta4-orange) | +| [koin-annotations](https://mvnrepository.com/artifact/io.insert-koin/koin-annotations) | ![](https://img.shields.io/badge/1.3.1-blue) - ![](https://img.shields.io/badge/1.4.0-alpha1-orange) | 🔎 Check the [latest changes](https://github.com/InsertKoinIO/koin/blob/main/CHANGELOG.md) to update your Koin project. diff --git a/docs/setup/koin.md b/docs/setup/koin.md index 5fc2a4e66..5e18503be 100644 --- a/docs/setup/koin.md +++ b/docs/setup/koin.md @@ -169,7 +169,7 @@ dependencies { ``` :::info -From now you can continue on Koin Tutorials to learn about using Koin: [Kotlin Multiplatform App Tutorial](/docs/quickstart/kmm) +From now you can continue on Koin Tutorials to learn about using Koin: [Kotlin Multiplatform App Tutorial](/docs/quickstart/kmp) ::: ### **Ktor** diff --git a/projects/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt b/projects/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt index 8d7ffcf39..52715c520 100644 --- a/projects/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt +++ b/projects/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt @@ -56,15 +56,15 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication { koin.logger.info("[init] declare Android Context") } - if (androidContext is Application) { - koin.loadModules(listOf(module { - single { androidContext } bind Context::class - })) - } else { - koin.loadModules(listOf(module { - single { androidContext } - })) - } + koin.loadModules(listOf( + module { + if (androidContext is Application) { + single { androidContext } bind Context::class + } else { + single { androidContext } + } + } + )) return this } diff --git a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt index 007104127..815cff190 100644 --- a/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt +++ b/projects/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt @@ -52,6 +52,6 @@ inline fun qualifier() = TypeQualifier(T::class) inline fun _q() = TypeQualifier(T::class) val > Enum.qualifier - get(): Qualifier { - return StringQualifier(this.toString().toLowerCase()) + get() : Qualifier { + return StringQualifier(toString().lowercase()) }