From fff847ea9f6a1131c5f39b62f7bd0fb0f8142109 Mon Sep 17 00:00:00 2001 From: Zak Henry Date: Wed, 24 May 2023 05:31:57 +1200 Subject: [PATCH 01/55] feat(Ktor extension): Change extension to store the koin application in the ktor application pipeline attributes to ensure context isolation between concurrent ktor applications. --- .../org/koin/ktor/ext/ApplicationCallExt.kt | 5 +++-- .../org/koin/ktor/ext/ApplicationExt.kt | 6 +++--- .../main/kotlin/org/koin/ktor/ext/RouteExt.kt | 4 +++- .../kotlin/org/koin/ktor/ext/RoutingExt.kt | 4 +++- .../kotlin/org/koin/ktor/plugin/KoinPlugin.kt | 20 +++++++++++-------- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt index 6dcdb1d5d..9d7dd06cb 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt @@ -16,9 +16,10 @@ package org.koin.ktor.ext import io.ktor.server.application.* -import org.koin.core.context.GlobalContext +import org.koin.core.Koin import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier +import org.koin.ktor.plugin.koinKey /** * Ktor Koin extensions for ApplicationCall class @@ -69,4 +70,4 @@ fun ApplicationCall.getProperty(key: String, defaultValue: String) = /** * Help work on ModuleDefinition */ -fun ApplicationCall.getKoin() = GlobalContext.get() +fun ApplicationCall.getKoin(): Koin = application.attributes.get(koinKey).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt index 437259dcd..b5b81b884 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt @@ -17,9 +17,9 @@ package org.koin.ktor.ext import io.ktor.server.application.* import org.koin.core.Koin -import org.koin.core.context.GlobalContext import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier +import org.koin.ktor.plugin.koinKey /** * Ktor Koin extensions @@ -31,7 +31,7 @@ import org.koin.core.qualifier.Qualifier /** * Help work on ModuleDefinition */ -fun Application.getKoin(): Koin = GlobalContext.get() +fun Application.getKoin(): Koin = attributes.get(koinKey).koin /** * inject lazily given dependency @@ -73,4 +73,4 @@ fun Application.getProperty(key: String) = * */ fun Application.getProperty(key: String, defaultValue: String) = - getKoin().getProperty(key) ?: defaultValue \ No newline at end of file + getKoin().getProperty(key) ?: defaultValue diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt index 2e9944a4b..09297824e 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt @@ -16,9 +16,11 @@ package org.koin.ktor.ext import io.ktor.server.routing.* +import org.koin.core.Koin import org.koin.core.context.GlobalContext import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier +import org.koin.ktor.plugin.koinKey /** * Ktor Koin extensions for Routing class @@ -70,4 +72,4 @@ fun Route.getProperty(key: String, defaultValue: String) = /** * Help work on ModuleDefinition */ -fun Route.getKoin() = GlobalContext.get() \ No newline at end of file +fun Route.getKoin(): Koin = application.attributes.get(koinKey).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt index ac7600df5..da8721433 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt @@ -16,9 +16,11 @@ package org.koin.ktor.ext import io.ktor.server.routing.* +import org.koin.core.Koin import org.koin.core.context.GlobalContext import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier +import org.koin.ktor.plugin.koinKey /** * Ktor Koin extensions for Routing class @@ -70,4 +72,4 @@ inline fun Routing.getProperty(key: String, defaultValue: T) = /** * Help work on ModuleDefinition */ -fun Routing.getKoin() = GlobalContext.get() \ No newline at end of file +fun Routing.getKoin(): Koin = application.attributes.get(koinKey).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt index 8834b851f..c136a75b8 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt @@ -16,34 +16,38 @@ package org.koin.ktor.plugin import io.ktor.server.application.* +import io.ktor.util.* import org.koin.core.KoinApplication -import org.koin.core.context.GlobalContext -import org.koin.core.context.startKoin -import org.koin.core.context.stopKoin import org.koin.dsl.KoinAppDeclaration +import org.koin.dsl.koinApplication /** * @author Arnaud Giuliani * @author Vinicius Carvalho * @author Victor Alenkov + * @author Zak Henry * * Ktor Feature class. Allows Koin Context to start using Ktor default install() method. * */ // Plugin -val Koin = createApplicationPlugin(name = "Koin", createConfiguration = { KoinApplication.init() }) { +val Koin = createApplicationPlugin(name = "Koin", createConfiguration = ::koinApplication) { + val koinApplication = pluginConfig + application.attributes.put(koinKey, koinApplication) + val monitor = environment?.monitor - val koinApplication = startKoin(pluginConfig) monitor?.raise(KoinApplicationStarted, koinApplication) monitor?.subscribe(ApplicationStopping) { monitor.raise(KoinApplicationStopPreparing, koinApplication) - stopKoin() + koinApplication.koin.close() monitor.raise(KoinApplicationStopped, koinApplication) } } fun Application.koin(configuration: KoinAppDeclaration) = pluginOrNull(Koin)?.let { - GlobalContext.getKoinApplicationOrNull()?.apply(configuration) -} ?: install(Koin, configuration) \ No newline at end of file + attributes.getOrNull(koinKey)?.apply(configuration) +} ?: install(Koin, configuration) + +val koinKey = AttributeKey("KoinKey") From c06ae39d0fa88817087fb70bda06b42bed04f1c0 Mon Sep 17 00:00:00 2001 From: Deishelon Date: Sat, 3 Jun 2023 21:05:33 +1200 Subject: [PATCH 02/55] Update context-isolation.md Fixed a typo --- docs/reference/koin-core/context-isolation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/koin-core/context-isolation.md b/docs/reference/koin-core/context-isolation.md index 6b55c97a4..e6dd63b74 100644 --- a/docs/reference/koin-core/context-isolation.md +++ b/docs/reference/koin-core/context-isolation.md @@ -16,7 +16,7 @@ startKoin { } ``` -This uses teh default Koin context to register your dependencies. +This uses the default Koin context to register your dependencies. But if we want to use an isolated Koin instance, you need declare an instance and store it in a class to hold your instance. You will have to keep your Koin Application instance available in your library and pass it to your custom KoinComponent implementation: From 77dc8ecd687aeb056ab411af6313dc8c33b44340 Mon Sep 17 00:00:00 2001 From: Marcus Dunn <51931484+MarcusDunn@users.noreply.github.com> Date: Mon, 19 Jun 2023 12:31:00 -0700 Subject: [PATCH 03/55] Pointed to correct dependancy for koin-test-junit5 --- docs/reference/koin-test/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/koin-test/testing.md b/docs/reference/koin-test/testing.md index 68651e363..52618c5f0 100644 --- a/docs/reference/koin-test/testing.md +++ b/docs/reference/koin-test/testing.md @@ -164,7 +164,7 @@ Take attention to stop your koin instance (if you use `startKoin` in your tests) JUnit 5 support provides [Extensions]([url](https://junit.org/junit5/docs/current/user-guide/#extensions)) that will handle the starting and stopping of Koin context. This means that if you are using the extension you don't need to use the `AutoCloseKoinTest`. ### Dependency -For testing with JUnit5 you need to use `koin-junit5` dependency. +For testing with JUnit5 you need to use `koin-test-junit5` dependency. ### Writing tests You need to Register the `KoinTestExtension` and provide your module configuration. After this is done From 2fe5b495297188f70781d2ff88fd6a12403cac65 Mon Sep 17 00:00:00 2001 From: Jorge <46056498+jorgectf@users.noreply.github.com> Date: Mon, 3 Jul 2023 09:17:45 +0200 Subject: [PATCH 04/55] Add CodeQL workflow --- .github/workflows/codeql.yml | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..0a557794f --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,69 @@ +name: "CodeQL" + +on: + push: + branches: [ 'main' ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ 'main' ] + schedule: + - cron: '52 13 * * 6' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Build core + working-directory: core + run: ./install.sh + + - name: Build android + working-directory: android + run: ./install.sh + + - name: Build compose + working-directory: compose + run: ./install.sh + + - name: Build ktor + working-directory: ktor + run: ./install.sh + + - name: Build plugins + working-directory: plugins + run: ./install.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 2b5c640ac5bc9713d62d900e925f098bdfc03bfd Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 13 Jul 2023 15:34:32 +0200 Subject: [PATCH 05/55] docs: Fix a typo in the context isolation reference Signed-off-by: Sebastian Schuberth --- docs/reference/koin-core/context-isolation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/koin-core/context-isolation.md b/docs/reference/koin-core/context-isolation.md index 6b55c97a4..e6dd63b74 100644 --- a/docs/reference/koin-core/context-isolation.md +++ b/docs/reference/koin-core/context-isolation.md @@ -16,7 +16,7 @@ startKoin { } ``` -This uses teh default Koin context to register your dependencies. +This uses the default Koin context to register your dependencies. But if we want to use an isolated Koin instance, you need declare an instance and store it in a class to hold your instance. You will have to keep your Koin Application instance available in your library and pass it to your custom KoinComponent implementation: From fa6b157b5646be8a9f9805f577a38e5d25564cee Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 28 Jul 2023 00:23:01 +0800 Subject: [PATCH 06/55] Use more gradle-build-action Use more [gradle/gradle-build-action@v2](https://github.com/gradle/gradle-build-action) to cache Gradle. --- .github/workflows/build.yml | 11 +++-------- .github/workflows/release-android.yml | 3 +++ .github/workflows/release-compose.yml | 3 +++ .github/workflows/release-core.yml | 3 +++ .github/workflows/release-ktor.yml | 3 +++ .github/workflows/release-plugins.yml | 3 +++ 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a07dbd01..02e9cf388 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,14 +110,9 @@ jobs: with: distribution: 'zulu' java-version: 11 - - - name: Cache build tooling - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.konan - key: ${{ runner.os }}-v1-${{ hashFiles('*.gradle.kts') }} + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 - name: Run Core run: cd core && ../gradlew macosX64Test --no-daemon --stacktrace diff --git a/.github/workflows/release-android.yml b/.github/workflows/release-android.yml index d6ce34247..4102a4f3b 100644 --- a/.github/workflows/release-android.yml +++ b/.github/workflows/release-android.yml @@ -30,6 +30,9 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Install Core run: cd core && ./install.sh diff --git a/.github/workflows/release-compose.yml b/.github/workflows/release-compose.yml index 563a1fa94..32e681820 100644 --- a/.github/workflows/release-compose.yml +++ b/.github/workflows/release-compose.yml @@ -30,6 +30,9 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Install Core run: cd core && ./install.sh diff --git a/.github/workflows/release-core.yml b/.github/workflows/release-core.yml index 99f34833c..a37a32239 100644 --- a/.github/workflows/release-core.yml +++ b/.github/workflows/release-core.yml @@ -30,6 +30,9 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Install Core run: cd core && ./install.sh diff --git a/.github/workflows/release-ktor.yml b/.github/workflows/release-ktor.yml index 4f0c248df..e93384b2f 100644 --- a/.github/workflows/release-ktor.yml +++ b/.github/workflows/release-ktor.yml @@ -30,6 +30,9 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Install Core run: cd core && ./install.sh diff --git a/.github/workflows/release-plugins.yml b/.github/workflows/release-plugins.yml index 73ccff2b9..c81ca8b86 100644 --- a/.github/workflows/release-plugins.yml +++ b/.github/workflows/release-plugins.yml @@ -30,6 +30,9 @@ jobs: distribution: 'zulu' java-version: 11 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Install Core run: cd core && ./install.sh From 7cce3e5eafad288731ea91b577275c5ff3adbe31 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Fri, 4 Aug 2023 15:39:57 +0200 Subject: [PATCH 07/55] date cleanup --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79659e11d..42a4ccf8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,9 +44,9 @@ Badges: `[UPDATED]`, `[FIXED]`, `[NEW]`, `[DEPRECATED]`, `[REMOVED]`, `[BREAKIN -- -## 3.4.1 +## 3.4.1 - 2023-05-31 -## [android-3.4.1](https://github.com/InsertKoinIO/koin/milestone/50?closed=1) - 2023-05-31 +## [android-3.4.1](https://github.com/InsertKoinIO/koin/milestone/50?closed=1) * `[FIXED]` - Fix broken API `workerOf` and `worker` - #1582 #1554 * `[UPDATED]` - Remove borken imports in sample - PR #1577 - Thanks to @pedrofsn * `[FIXED]` - Fix java static overload - #1579 @@ -57,12 +57,12 @@ Badges: `[UPDATED]`, `[FIXED]`, `[NEW]`, `[DEPRECATED]`, `[REMOVED]`, `[BREAKIN * `[UPDATED]` - lib update `androidx.work:work-runtime-ktx:2.8.1` -## [core-coroutines-3.4.1](https://github.com/InsertKoinIO/koin/milestone/48?closed=1) - 2023-05-31 +## [core-coroutines-3.4.1](https://github.com/InsertKoinIO/koin/milestone/48?closed=1) * `[FIXED]` - Fix kotlin files duplication issues, when importing to an Android project * `[UPDATED]` - coroutines update `1.7.1` -## [core-3.4.1](https://github.com/InsertKoinIO/koin/milestone/48?closed=1) - 2023-05-31 +## [core-3.4.1](https://github.com/InsertKoinIO/koin/milestone/48?closed=1) * `[UPDATED]` - PR for Documentation updates - #1558 #1587 #1591 #1575 #1555 #1553 #1528 #1520 #1514 #1524 - Thanks to @Pitel @GrzegorzBobryk @lammertw @zsmb13 @christxph @sezikim @enzosego @igorwojda @lalnuo @mecoFarid * `[FIXED]` - Allow `getScopeId` & `getScopeName` to use reified type - Fix for #1536 * `[UPDATED]` - Better error message for `checkModules` - PR #1569 - Thanks @mreichelt @@ -70,7 +70,7 @@ Badges: `[UPDATED]`, `[FIXED]`, `[NEW]`, `[DEPRECATED]`, `[REMOVED]`, `[BREAKIN * `[UPDATED]` - Kotlin `1.8.21` -## [compose-1.0.3](https://github.com/InsertKoinIO/koin/milestone/51?closed=1) - 2023-05-16 +## [compose-1.0.3](https://github.com/InsertKoinIO/koin/milestone/51?closed=1) * `[UPDATED]` - `koin-compose` 1.0.3 * `[UPDATED]` - `koin-androidx-compose` 3.4.5 * `[UPDATED]` - lib update `androidx.compose.runtime:runtime:1.4.3` From 80e391af0dc43cea571a7566c8f5c9c0eb459294 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Fri, 4 Aug 2023 16:03:18 +0200 Subject: [PATCH 08/55] update issue template --- .github/ISSUE_TEMPLATE/Bug_report.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 0fd860f05..44f0c8471 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -17,8 +17,8 @@ Steps to reproduce the behavior: **Expected behavior** A clear and concise description of what you expected to happen. -**Koin project used and used version (please complete the following information):** - [e.g]: `koin-core version 0.9.2` +**Koin module and version:** + [e.g]: `koin-core:3.4.3` -**Additional moduleDefinition** -Add any other moduleDefinition about the problem here. +**Snippet or Sample project to help reproduce** +Add a snippet or even a small sample project to hel reproduce your case. From 29d565bb2e1be147d6f895ec2e105e23c5d9671b Mon Sep 17 00:00:00 2001 From: kamosama <837080904@qq.com> Date: Sun, 27 Aug 2023 23:55:04 +0800 Subject: [PATCH 09/55] perf The module flattening function can reduce GC using MutableSet --- .../kotlin/org/koin/core/module/Module.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index 9f95ac3d5..35465de4d 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -236,16 +236,17 @@ operator fun List.plus(module: Module): List = this + listOf(mod * Run through the module list to flatten all modules & submodules */ @OptIn(KoinInternalApi::class) -tailrec fun flatten(modules: List, newModules: Set = emptySet()): Set { - return if (modules.isEmpty()) { - newModules - } else { - val head = modules.first() ?: error("Flatten - No head element in list") +tailrec fun flatten(modules: List, newModules: MutableSet = mutableSetOf()): Set { + if (modules.isNotEmpty()) { + val head = modules.first() val tail = modules.subList(1, modules.size) - if (head.includedModules.isEmpty()) { - flatten(tail, newModules + head) + newModules.add(head) + if (head.importedModules.isEmpty()) { + return flatten(tail, newModules) } else { - flatten(head.includedModules + tail, newModules + head) + return flatten(head.importedModules + tail, newModules) } + } else { + return newModules } } \ No newline at end of file From 50bfa99bf1b66972cb260f5f0c5d06e773ac88c4 Mon Sep 17 00:00:00 2001 From: kamosama <837080904@qq.com> Date: Mon, 28 Aug 2023 13:55:10 +0800 Subject: [PATCH 10/55] perf The module flattening function can reduce GC using MutableSet --- .../commonMain/kotlin/org/koin/core/module/Module.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index 35465de4d..422eef27d 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -237,16 +237,16 @@ operator fun List.plus(module: Module): List = this + listOf(mod */ @OptIn(KoinInternalApi::class) tailrec fun flatten(modules: List, newModules: MutableSet = mutableSetOf()): Set { - if (modules.isNotEmpty()) { + return if (modules.isNotEmpty()) { val head = modules.first() val tail = modules.subList(1, modules.size) newModules.add(head) - if (head.importedModules.isEmpty()) { - return flatten(tail, newModules) + if (head.includedModules.isEmpty()) { + flatten(tail, newModules) } else { - return flatten(head.importedModules + tail, newModules) + flatten(head.includedModules + tail, newModules) } } else { - return newModules + newModules } } \ No newline at end of file From afc74ca6818965fef71044d405a66c737e8b6dce Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 3 Aug 2023 16:26:02 +0200 Subject: [PATCH 11/55] upgrade configuration for kotlin 1.9 --- core/gradle.properties | 4 +- core/gradle/versions.gradle | 6 +- core/koin-core-coroutines/build.gradle | 22 +- core/koin-core/build.gradle | 18 +- core/koin-test/build.gradle | 16 +- core/kotlin-js-store/yarn.lock | 1373 +++++++++++++++++++----- 6 files changed, 1170 insertions(+), 269 deletions(-) diff --git a/core/gradle.properties b/core/gradle.properties index 925fe183a..19058b8e2 100644 --- a/core/gradle.properties +++ b/core/gradle.properties @@ -24,5 +24,5 @@ org.gradle.configureondemand=false # Kotlin kotlin.incremental=true org.gradle.caching=true -kotlin.mpp.enableGranularSourceSetsMetadata=true -kotlin.native.enableDependencyPropagation=false \ No newline at end of file +#kotlin.mpp.enableGranularSourceSetsMetadata=true +#kotlin.native.enableDependencyPropagation=false \ No newline at end of file diff --git a/core/gradle/versions.gradle b/core/gradle/versions.gradle index ef2c76f06..9aa0a9da8 100644 --- a/core/gradle/versions.gradle +++ b/core/gradle/versions.gradle @@ -1,11 +1,11 @@ ext { // Koin Versions - koin_version = '3.4.3' + koin_version = '3.5.0' // Kotlin - kotlin_version = '1.8.21' + kotlin_version = '1.9.0' - coroutines_version = "1.7.1" + coroutines_version = "1.7.3" // Dokka dokka_version = '1.8.10' diff --git a/core/koin-core-coroutines/build.gradle b/core/koin-core-coroutines/build.gradle index ee97b37bf..c7ec689b1 100644 --- a/core/koin-core-coroutines/build.gradle +++ b/core/koin-core-coroutines/build.gradle @@ -12,21 +12,23 @@ kotlin { jvm { withJava() } - js(BOTH) { + js(IR) { nodejs() browser() + binaries.executable() // not applicable to BOTH, see details below } macosX64() macosArm64() iosX64() + iosX64() iosArm64() - iosArm32() +// iosArm32() iosSimulatorArm64() - watchosArm32() +// watchosArm32() watchosArm64() watchosSimulatorArm64() - watchosX86() +// watchosX86() watchosX64() tvosArm64() tvosSimulatorArm64() @@ -111,9 +113,9 @@ kotlin { configure([ targets.macosX64, targets.macosArm64, - targets.watchosArm32, +// targets.watchosArm32, targets.watchosArm64, - targets.watchosX86, +// targets.watchosX86, targets.watchosX64, targets.watchosSimulatorArm64, targets.tvosArm64, @@ -121,7 +123,7 @@ kotlin { targets.tvosSimulatorArm64, targets.iosX64, targets.iosSimulatorArm64, - targets.iosArm32, +// targets.iosArm32, targets.iosArm64 ]) { compilations.main.source(sourceSets.darwinMain) @@ -129,10 +131,10 @@ kotlin { } // configure([ // targets.linuxX64, -// targets.linuxArm32Hfp, -// targets.linuxMips32, +//// targets.linuxArm32Hfp, +//// targets.linuxMips32, // targets.mingwX64, -// targets.mingwX86 +//// targets.mingwX86 // ]) { // compilations.main.source(sourceSets.otherMain) // compilations.test.source(sourceSets.nativeTest) diff --git a/core/koin-core/build.gradle b/core/koin-core/build.gradle index de1c0bf63..f2dd62fa8 100644 --- a/core/koin-core/build.gradle +++ b/core/koin-core/build.gradle @@ -12,21 +12,25 @@ kotlin { jvm { withJava() } - js(BOTH) { +// js(BOTH) { +// } + js(IR) { // or: LEGACY, BOTH + // ... nodejs() browser() + binaries.executable() // not applicable to BOTH, see details below } macosX64() macosArm64() iosX64() iosArm64() - iosArm32() +// iosArm32() iosSimulatorArm64() - watchosArm32() +// watchosArm32() watchosArm64() watchosSimulatorArm64() - watchosX86() +// watchosX86() watchosX64() tvosArm64() tvosSimulatorArm64() @@ -107,9 +111,9 @@ kotlin { configure([ targets.macosX64, targets.macosArm64, - targets.watchosArm32, +// targets.watchosArm32, targets.watchosArm64, - targets.watchosX86, +// targets.watchosX86, targets.watchosX64, targets.watchosSimulatorArm64, targets.tvosArm64, @@ -117,7 +121,7 @@ kotlin { targets.tvosSimulatorArm64, targets.iosX64, targets.iosSimulatorArm64, - targets.iosArm32, +// targets.iosArm32, targets.iosArm64 ]) { compilations.main.source(sourceSets.darwinMain) diff --git a/core/koin-test/build.gradle b/core/koin-test/build.gradle index 0d2328442..c515b939b 100644 --- a/core/koin-test/build.gradle +++ b/core/koin-test/build.gradle @@ -12,21 +12,25 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlin { jvm() - js(BOTH) { +// js(BOTH) { +// } + js(IR) { // or: LEGACY, BOTH + // ... nodejs() browser() + binaries.executable() // not applicable to BOTH, see details below } macosX64() macosArm64() iosX64() iosArm64() - iosArm32() +// iosArm32() iosSimulatorArm64() - watchosArm32() +// watchosArm32() watchosArm64() watchosSimulatorArm64() - watchosX86() +// watchosX86() watchosX64() tvosArm64() tvosSimulatorArm64() @@ -101,17 +105,13 @@ kotlin { configure([ targets.macosX64, targets.macosArm64, - targets.watchosArm32, targets.watchosArm64, - targets.watchosX86, targets.watchosX64, targets.watchosSimulatorArm64, targets.tvosArm64, - targets.tvosX64, targets.tvosSimulatorArm64, targets.iosX64, targets.iosSimulatorArm64, - targets.iosArm32, targets.iosArm64, targets.linuxX64, targets.mingwX64, diff --git a/core/kotlin-js-store/yarn.lock b/core/kotlin-js-store/yarn.lock index b8ef63f0e..f3dcd67e6 100644 --- a/core/kotlin-js-store/yarn.lock +++ b/core/kotlin-js-store/yarn.lock @@ -31,10 +31,10 @@ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.2.tgz#f45351aaed4527a298512ec72f81040c998580fb" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== +"@jridgewell/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== dependencies: "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" @@ -52,11 +52,46 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@leichtgewicht/ip-codec@^2.0.1": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" + integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== + "@socket.io/component-emitter@~3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== +"@types/body-parser@*": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" + integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + dependencies: + "@types/connect" "*" + "@types/node" "*" + +"@types/bonjour@^3.5.9": + version "3.5.10" + resolved "https://registry.yarnpkg.com/@types/bonjour/-/bonjour-3.5.10.tgz#0f6aadfe00ea414edc86f5d106357cda9701e275" + integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== + dependencies: + "@types/node" "*" + +"@types/connect-history-api-fallback@^1.3.5": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#9fd20b3974bdc2bcd4ac6567e2e0f6885cb2cf41" + integrity sha512-4x5FkPpLipqwthjPsF7ZRbOv3uoLUFkTA9G9v583qi4pACvq0uTELrB8OLUzPWUI4IJIyvM85vzkV1nyiI2Lig== + dependencies: + "@types/express-serve-static-core" "*" + "@types/node" "*" + +"@types/connect@*": + version "3.4.35" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" + integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + dependencies: + "@types/node" "*" + "@types/cookie@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" @@ -90,163 +125,256 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== +"@types/estree@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== + +"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": + version "4.17.35" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz#c95dd4424f0d32e525d23812aa8ab8e4d3906c4f" + integrity sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg== + dependencies: + "@types/node" "*" + "@types/qs" "*" + "@types/range-parser" "*" + "@types/send" "*" + +"@types/express@*", "@types/express@^4.17.13": + version "4.17.17" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.17.tgz#01d5437f6ef9cfa8668e616e13c2f2ac9a491ae4" + integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== + dependencies: + "@types/body-parser" "*" + "@types/express-serve-static-core" "^4.17.33" + "@types/qs" "*" + "@types/serve-static" "*" + +"@types/http-errors@*": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.1.tgz#20172f9578b225f6c7da63446f56d4ce108d5a65" + integrity sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ== + +"@types/http-proxy@^1.17.8": + version "1.17.11" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.11.tgz#0ca21949a5588d55ac2b659b69035c84bd5da293" + integrity sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA== + dependencies: + "@types/node" "*" "@types/json-schema@*", "@types/json-schema@^7.0.8": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json-schema@^7.0.9": + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + +"@types/mime@*": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" + integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== + +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + "@types/node@*", "@types/node@>=10.0.0": version "18.15.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.3.tgz#f0b991c32cfc6a4e7f3399d6cb4b8cf9a0315014" integrity sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw== -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== - -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== - -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== - -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" +"@types/qs@*": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/range-parser@*": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" + integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + +"@types/retry@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + +"@types/send@*": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" + integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + +"@types/serve-index@^1.9.1": + version "1.9.1" + resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" + integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== + dependencies: + "@types/express" "*" + +"@types/serve-static@*", "@types/serve-static@^1.13.10": + version "1.15.2" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.2.tgz#3e5419ecd1e40e7405d34093f10befb43f63381a" + integrity sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw== + dependencies: + "@types/http-errors" "*" + "@types/mime" "*" + "@types/node" "*" + +"@types/sockjs@^0.3.33": + version "0.3.33" + resolved "https://registry.yarnpkg.com/@types/sockjs/-/sockjs-0.3.33.tgz#570d3a0b99ac995360e3136fd6045113b1bd236f" + integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== + dependencies: + "@types/node" "*" + +"@types/ws@^8.5.1": + version "8.5.5" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.5.tgz#af587964aa06682702ee6dcbc7be41a80e4b28eb" + integrity sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg== + dependencies: + "@types/node" "*" + +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== +"@webassemblyjs/helper-wasm-section@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== - -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" - -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== - dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" - -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== - dependencies: - "@webassemblyjs/ast" "1.11.1" +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-opt" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/wast-printer" "1.11.6" + +"@webassemblyjs/wasm-gen@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== + dependencies: + "@webassemblyjs/ast" "1.11.6" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" - integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== +"@webpack-cli/configtest@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== -"@webpack-cli/info@^1.5.0": - version "1.5.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" - integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== - dependencies: - envinfo "^7.7.3" +"@webpack-cli/info@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" - integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== +"@webpack-cli/serve@^2.0.3": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -263,7 +391,7 @@ abab@^2.0.6: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -accepts@~1.3.4: +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -276,16 +404,35 @@ acorn-import-assertions@^1.7.6: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== -acorn@^8.5.0, acorn@^8.7.1: +acorn@^8.7.1: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== +acorn@^8.8.2: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +ajv-formats@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520" + integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== + dependencies: + ajv "^8.0.0" + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== +ajv-keywords@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" + integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== + dependencies: + fast-deep-equal "^3.1.3" + ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -296,11 +443,26 @@ ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.0.0, ajv@^8.9.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-html-community@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" + integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -326,6 +488,16 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-flatten@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -336,11 +508,34 @@ base64id@2.0.0, base64id@~2.0.0: resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + body-parser@^1.19.0: version "1.20.2" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" @@ -359,6 +554,16 @@ body-parser@^1.19.0: type-is "~1.6.18" unpipe "1.0.0" +bonjour-service@^1.0.11: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bonjour-service/-/bonjour-service-1.1.1.tgz#960948fa0e0153f5d26743ab15baf8e33752c135" + integrity sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg== + dependencies: + array-flatten "^2.1.2" + dns-equal "^1.0.0" + fast-deep-equal "^3.1.3" + multicast-dns "^7.2.5" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -401,6 +606,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== + bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -432,7 +642,7 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@3.5.3, chokidar@^3.5.1: +chokidar@3.5.3, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -482,26 +692,56 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^2.0.10: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + colorette@^2.0.14: version "2.0.19" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +connect-history-api-fallback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8" + integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== + connect@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" @@ -512,16 +752,38 @@ connect@^3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" -content-type@~1.0.5: +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + cookie@~0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + cors@~2.8.5: version "2.8.5" resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" @@ -556,7 +818,7 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4.3.4, debug@^4.1.0, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -568,16 +830,38 @@ decamelize@^4.0.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +default-gateway@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-6.0.3.tgz#819494c888053bdb743edbf343d6cdf7f2943a71" + integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== + dependencies: + execa "^5.0.0" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== +detect-node@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" + integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== + di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" @@ -588,6 +872,18 @@ diff@5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + integrity sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg== + +dns-packet@^5.2.2: + version "5.6.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.0.tgz#2202c947845c7a63c23ece58f2f70ff6ab4c2f7d" + integrity sha512-rza3UH1LwdHh9qyPXp8lkwpjSNk/AMD3dPytUoRoqnypDUhY0xvbdmVhWOfxO68frEfV9BU8V12Ez7ZsHGZpCQ== + dependencies: + "@leichtgewicht/ip-codec" "^2.0.1" + dom-serialize@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" @@ -639,10 +935,10 @@ engine.io@~6.4.1: engine.io-parser "~5.0.3" ws "~8.11.0" -enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== +enhanced-resolve@^5.13.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -657,10 +953,10 @@ envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-module-lexer@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" + integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== escalade@^3.1.1: version "3.1.1" @@ -702,6 +998,11 @@ estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -712,12 +1013,64 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== +execa@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +express@^4.17.3: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + extend@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -732,6 +1085,13 @@ fastest-levenshtein@^1.0.12: resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== +faye-websocket@^0.11.3: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -752,6 +1112,19 @@ finalhandler@1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + find-up@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -783,11 +1156,21 @@ follow-redirects@^1.0.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== -format-util@1.0.5: +format-util@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -797,6 +1180,11 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-monkey@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.4.tgz#ee8c1b53d3fe8bb7e5d2c5c5dfc0168afdd2f747" + integrity sha512-INM/fWAxMICjttnD0DX1rBvinKskj5G1w+oy/pnm9u/tSlnBrzFonJMcalKJ30P8RRsPzKcCG7Q8l0jx5Fh9YQ== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -826,6 +1214,11 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.3" +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -862,11 +1255,16 @@ glob@^7.1.3, glob@^7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -889,6 +1287,26 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.4.0.tgz#edd0cee70402584c8c76cc2c0556db09d1f45061" + integrity sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ== + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== + http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -900,6 +1318,32 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + +http-proxy-middleware@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz#e1a4dd6979572c7ab5a4e4b55095d1f32a74963f" + integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== + dependencies: + "@types/http-proxy" "^1.17.8" + http-proxy "^1.18.1" + is-glob "^4.0.1" + is-plain-obj "^3.0.0" + micromatch "^4.0.2" + http-proxy@^1.18.1: version "1.18.1" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" @@ -909,6 +1353,11 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -939,15 +1388,30 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -interpret@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" - integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +ipaddr.js@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz#2119bc447ff8c257753b196fc5f1ce08a4cdf39f" + integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== is-binary-path@~2.1.0: version "2.1.0" @@ -956,13 +1420,18 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== +is-core-module@^2.11.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" + integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== dependencies: has "^1.0.3" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -990,6 +1459,11 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-plain-obj@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" + integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== + is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -997,11 +1471,28 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isbinaryfile@^4.0.8: version "4.0.10" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" @@ -1043,6 +1534,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -1050,10 +1546,10 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -karma-chrome-launcher@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz#baca9cc071b1562a1db241827257bfe5cab597ea" - integrity sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ== +karma-chrome-launcher@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== dependencies: which "^1.2.1" @@ -1064,12 +1560,12 @@ karma-mocha@2.0.1: dependencies: minimist "^1.2.3" -karma-sourcemap-loader@0.3.8: - version "0.3.8" - resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz#d4bae72fb7a8397328a62b75013d2df937bdcf9c" - integrity sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g== +karma-sourcemap-loader@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" + integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== dependencies: - graceful-fs "^4.1.2" + graceful-fs "^4.2.10" karma-webpack@5.0.0: version "5.0.0" @@ -1080,10 +1576,10 @@ karma-webpack@5.0.0: minimatch "^3.0.4" webpack-merge "^4.1.5" -karma@6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.0.tgz#82652dfecdd853ec227b74ed718a997028a99508" - integrity sha512-s8m7z0IF5g/bS5ONT7wsOavhW4i4aFkzD4u4wgzAQWT4HGUeWI3i21cK2Yz6jndMAeHETp5XuNsRoyGJZXVd4w== +karma@6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.2.tgz#a983f874cee6f35990c4b2dcc3d274653714de8e" + integrity sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ== dependencies: "@colors/colors" "1.5.0" body-parser "^1.19.0" @@ -1115,6 +1611,14 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +launch-editor@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.0.tgz#4c0c1a6ac126c572bd9ff9a30da1d2cae66defd7" + integrity sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ== + dependencies: + picocolors "^1.0.0" + shell-quote "^1.7.3" + loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" @@ -1163,28 +1667,68 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== +memfs@^3.4.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.6.0.tgz#d7a2110f86f79dd950a8b6df6d57bc984aa185f6" + integrity sha512-EGowvkkgbMcIChjMTMkESFDbZeSh8xZ7kNSF0hAiAN4Jh6jgHCRS0Ga/+C8y6Au+oqpezRHCfPsmJ2+DwAgiwQ== + dependencies: + fs-monkey "^1.0.4" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -mime-db@1.52.0: +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.2: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + mime@^2.5.2: version "2.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + minimatch@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" @@ -1211,12 +1755,11 @@ mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -mocha@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" - integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== +mocha@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== dependencies: - "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" @@ -1254,6 +1797,14 @@ ms@2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== +multicast-dns@^7.2.5: + version "7.2.5" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" + integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== + dependencies: + dns-packet "^5.2.2" + thunky "^1.0.2" + nanoid@3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" @@ -1269,6 +1820,11 @@ neo-async@^2.6.2: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== +node-forge@^1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + node-releases@^2.0.8: version "2.0.10" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f" @@ -1279,6 +1835,13 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -1289,6 +1852,11 @@ object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -1303,6 +1871,11 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -1310,6 +1883,22 @@ once@^1.3.0: dependencies: wrappy "1" +onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.0.9: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -1338,12 +1927,20 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-retry@^4.5.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.2.tgz#9baae7184057edd4e17231cee04264106e092a16" + integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== + dependencies: + "@types/retry" "0.12.0" + retry "^0.13.1" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -parseurl@~1.3.3: +parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== @@ -1358,7 +1955,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^3.1.0: +path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -1368,12 +1965,17 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -1385,6 +1987,19 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + punycode@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" @@ -1409,11 +2024,21 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@^1.2.1: +range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + raw-body@2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" @@ -1424,6 +2049,28 @@ raw-body@2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" +readable-stream@^2.0.1: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -1431,18 +2078,23 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@^0.7.0: - version "0.7.1" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" - integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== dependencies: - resolve "^1.9.0" + resolve "^1.20.0" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -1460,15 +2112,20 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.9.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== +resolve@^1.20.0: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== dependencies: - is-core-module "^2.9.0" + is-core-module "^2.11.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +retry@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.13.1.tgz#185b1587acf67919d63b357349e03537b2484658" + integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== + rfdc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" @@ -1481,7 +2138,12 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -safe-buffer@^5.1.0: +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -1491,7 +2153,7 @@ safe-buffer@^5.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -schema-utils@^3.1.0, schema-utils@^3.1.1: +schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== @@ -1500,6 +2162,56 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" +schema-utils@^3.1.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + dependencies: + "@types/json-schema" "^7.0.9" + ajv "^8.9.0" + ajv-formats "^2.1.1" + ajv-keywords "^5.1.0" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== + +selfsigned@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-2.1.1.tgz#18a7613d714c0cd3385c48af0075abf3f266af61" + integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== + dependencies: + node-forge "^1" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -1514,6 +2226,34 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" @@ -1538,6 +2278,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +shell-quote@^1.7.3: + version "1.8.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" + integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -1547,6 +2292,11 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + socket.io-adapter@~2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" @@ -1574,15 +2324,24 @@ socket.io@^4.4.1: socket.io-adapter "~2.5.2" socket.io-parser "~4.2.1" +sockjs@^0.3.24: + version "0.3.24" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.24.tgz#c9bc8995f33a111bea0395ec30aa3206bdb5ccce" + integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== + dependencies: + faye-websocket "^0.11.3" + uuid "^8.3.2" + websocket-driver "^0.7.4" + source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-loader@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.0.tgz#bdc6b118bc6c87ee4d8d851f2d4efcc5abdb2ef5" - integrity sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw== +source-map-loader@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.1.tgz#72f00d05f5d1f90f80974eda781cbd7107c125f2" + integrity sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA== dependencies: abab "^2.0.6" iconv-lite "^0.6.3" @@ -1601,12 +2360,35 @@ source-map@^0.6.0, source-map@^0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.2.tgz#b74f466203a3eda452c02492b91fb9e84a27677b" + integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -statuses@~1.5.0: +"statuses@>= 1.4.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== @@ -1629,6 +2411,20 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -1636,6 +2432,11 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -1665,27 +2466,32 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -terser-webpack-plugin@^5.1.3: - version "5.3.7" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz#ef760632d24991760f339fe9290deb936ad1ffc7" - integrity sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw== +terser-webpack-plugin@^5.3.7: + version "5.3.9" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" + integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== dependencies: "@jridgewell/trace-mapping" "^0.3.17" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.1" - terser "^5.16.5" + terser "^5.16.8" -terser@^5.16.5: - version "5.16.6" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.6.tgz#f6c7a14a378ee0630fbe3ac8d1f41b4681109533" - integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== +terser@^5.16.8: + version "5.19.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.2.tgz#bdb8017a9a4a8de4663a7983f45c506534f9234e" + integrity sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA== dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" commander "^2.20.0" source-map-support "~0.5.20" +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + tmp@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" @@ -1713,6 +2519,11 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + ua-parser-js@^0.7.30: version "0.7.34" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.34.tgz#afb439e2e3e394bdc90080acb661a39c685b67d7" @@ -1743,12 +2554,22 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -vary@^1: +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== @@ -1766,24 +2587,79 @@ watchpack@^2.4.0: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" -webpack-cli@4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" - integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +webpack-cli@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.0.tgz#abc4b1f44b50250f2632d8b8b536cfe2f6257891" + integrity sha512-a7KRJnCxejFoDpYTOwzm5o21ZXMaNqtRlvS183XzGDUPRdVEzJNImcQokqYZ8BNTnk9DkKiuWxw75+DCCoZ26w== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.2.0" - "@webpack-cli/info" "^1.5.0" - "@webpack-cli/serve" "^1.7.0" + "@webpack-cli/configtest" "^2.1.0" + "@webpack-cli/info" "^2.0.1" + "@webpack-cli/serve" "^2.0.3" colorette "^2.0.14" - commander "^7.0.0" + commander "^10.0.1" cross-spawn "^7.0.3" + envinfo "^7.7.3" fastest-levenshtein "^1.0.12" import-local "^3.0.2" - interpret "^2.2.0" - rechoir "^0.7.0" + interpret "^3.1.1" + rechoir "^0.8.0" webpack-merge "^5.7.3" +webpack-dev-middleware@^5.3.1: + version "5.3.3" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz#efae67c2793908e7311f1d9b06f2a08dcc97e51f" + integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== + dependencies: + colorette "^2.0.10" + memfs "^3.4.3" + mime-types "^2.1.31" + range-parser "^1.2.1" + schema-utils "^4.0.0" + +webpack-dev-server@4.15.0: + version "4.15.0" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.0.tgz#87ba9006eca53c551607ea0d663f4ae88be7af21" + integrity sha512-HmNB5QeSl1KpulTBQ8UT4FPrByYyaLxpJoQ0+s7EvUrMc16m0ZS1sgb1XGqzmgCPk0c9y+aaXxn11tbLzuM7NQ== + dependencies: + "@types/bonjour" "^3.5.9" + "@types/connect-history-api-fallback" "^1.3.5" + "@types/express" "^4.17.13" + "@types/serve-index" "^1.9.1" + "@types/serve-static" "^1.13.10" + "@types/sockjs" "^0.3.33" + "@types/ws" "^8.5.1" + ansi-html-community "^0.0.8" + bonjour-service "^1.0.11" + chokidar "^3.5.3" + colorette "^2.0.10" + compression "^1.7.4" + connect-history-api-fallback "^2.0.0" + default-gateway "^6.0.3" + express "^4.17.3" + graceful-fs "^4.2.6" + html-entities "^2.3.2" + http-proxy-middleware "^2.0.3" + ipaddr.js "^2.0.1" + launch-editor "^2.6.0" + open "^8.0.9" + p-retry "^4.5.0" + rimraf "^3.0.2" + schema-utils "^4.0.0" + selfsigned "^2.1.1" + serve-index "^1.9.1" + sockjs "^0.3.24" + spdy "^4.0.2" + webpack-dev-middleware "^5.3.1" + ws "^8.13.0" + webpack-merge@^4.1.5: version "4.2.2" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" @@ -1804,22 +2680,22 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.74.0: - version "5.74.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" - integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== +webpack@5.82.0: + version "5.82.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.0.tgz#3c0d074dec79401db026b4ba0fb23d6333f88e7d" + integrity sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg== dependencies: "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" + enhanced-resolve "^5.13.0" + es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" @@ -1828,12 +2704,26 @@ webpack@5.74.0: loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - schema-utils "^3.1.0" + schema-utils "^3.1.2" tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" + terser-webpack-plugin "^5.3.7" watchpack "^2.4.0" webpack-sources "^3.2.3" +websocket-driver@>=0.5.1, websocket-driver@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + which@^1.2.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -1872,6 +2762,11 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@^8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" + integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== + ws@~8.11.0: version "8.11.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" From 313f6dc00d934dbc6bfe185d4d4189010b7d3612 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 3 Aug 2023 16:26:18 +0200 Subject: [PATCH 12/55] remove old native memory mananegment --- .../org/koin/mp/native/MainThreadSafety.kt | 10 +-- .../org/koin/core/context/GlobalContext.kt | 62 +------------------ .../kotlin/org/koin/mp/KoinPlatformTools.kt | 10 +-- .../org/koin/mp/native/MainThreadSafety.kt | 52 ++++++++-------- .../kotlin/org/koin/core/Helpers.kt | 5 -- .../koin/core/state/PlatformThreadingTest.kt | 16 ++--- .../org/koin/mp/native/MainThreadSafety.kt | 32 +++++----- 7 files changed, 56 insertions(+), 131 deletions(-) diff --git a/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index 1eff1cd0c..d7a1c5e95 100644 --- a/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,5 +1,5 @@ -package org.koin.mp.native - -import platform.Foundation.NSThread - -actual val isMainThread: Boolean = NSThread.isMainThread \ No newline at end of file +//package org.koin.mp.native +// +//import platform.Foundation.NSThread +// +//actual val isMainThread: Boolean = NSThread.isMainThread \ No newline at end of file diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index ae1bd5c80..56bdf3a5f 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -22,68 +22,8 @@ import org.koin.core.KoinApplication import org.koin.core.error.KoinAppAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration -import org.koin.mp.native.MainThreadValue -@OptIn(ExperimentalStdlibApi::class) -internal fun globalContextByMemoryModel(): KoinContext = if (isExperimentalMM()) { - MutableGlobalContext() -} else { - StrictGlobalContext() -} - -/** - * Main thread only global context for the strict memory model - */ -internal class StrictGlobalContext: KoinContext { - data class KoinInstanceHolder(var koin: Koin? = null) - - private val contextHolder = MainThreadValue(KoinInstanceHolder(null)) - - override fun getOrNull(): Koin? = contextHolder.get().koin - override fun get(): Koin = getOrNull() ?: error("KoinApplication has not been started") - - private fun register(koinApplication: KoinApplication) { - if (getOrNull() != null) { - throw KoinAppAlreadyStartedException("A Koin Application has already been started") - } - contextHolder.get().koin = koinApplication.koin - } - - override fun stopKoin() { - contextHolder.get().koin?.close() - contextHolder.get().koin = null - } - - override fun startKoin(koinApplication: KoinApplication): KoinApplication { - register(koinApplication) - koinApplication.createEagerInstances() - return koinApplication - } - - override fun startKoin(appDeclaration: KoinAppDeclaration): KoinApplication { - val koinApplication = KoinApplication.init() - register(koinApplication) - appDeclaration(koinApplication) - koinApplication.createEagerInstances() - return koinApplication - } - - override fun loadKoinModules(module: Module) { - get().loadModules(listOf(module)) - } - - override fun loadKoinModules(modules: List) { - get().loadModules(modules) - } - - override fun unloadKoinModules(module: Module) { - get().unloadModules(listOf(module)) - } - - override fun unloadKoinModules(modules: List) { - get().unloadModules(modules) - } -} +internal fun globalContextByMemoryModel(): KoinContext = MutableGlobalContext() /** * Mutable global context for the new memory model. Very similar to how the JVM global context works. diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt index c0ae18836..6a6085288 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -7,7 +7,6 @@ import org.koin.core.context.globalContextByMemoryModel import org.koin.core.logger.Level import org.koin.core.logger.Logger import org.koin.core.logger.PrintLogger -import org.koin.mp.native.assertMainThread import kotlin.random.Random import kotlin.reflect.KClass @@ -25,13 +24,8 @@ actual object KoinPlatformTools { actual fun defaultLazyMode(): LazyThreadSafetyMode = LazyThreadSafetyMode.PUBLICATION actual fun defaultLogger(level: Level): Logger = PrintLogger(level) actual fun defaultContext(): KoinContext = defaultContext - @OptIn(ExperimentalStdlibApi::class) - actual fun synchronized(lock: Lockable, block: () -> R): R = if(isExperimentalMM()){ - lock.lock.withLock { block() } - } else { - assertMainThread() - block() - } + + actual fun synchronized(lock: Lockable, block: () -> R): R = lock.lock.withLock { block() } actual fun safeHashMap(): MutableMap = HashMap() } diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index ff64b2f3b..81d9896c4 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,26 +1,26 @@ -package org.koin.mp.native - -import kotlinx.cinterop.StableRef -import kotlin.native.concurrent.ensureNeverFrozen -import kotlin.native.concurrent.freeze - -class MainThreadValue(startVal: T) { - private val stableRef = StableRef.create(startVal) - - init { - assertMainThread() - startVal.ensureNeverFrozen() - freeze() - } - - fun get(): T { - assertMainThread() - return stableRef.get() - } -} - -expect val isMainThread: Boolean// = NSThread.isMainThread - -internal fun assertMainThread() { - if (!isMainThread) throw IllegalStateException("Must be main thread") -} \ No newline at end of file +//package org.koin.mp.native +// +//import kotlinx.cinterop.StableRef +//import kotlin.native.concurrent.ensureNeverFrozen +//import kotlin.native.concurrent.freeze +// +//class MainThreadValue(startVal: T) { +// private val stableRef = StableRef.create(startVal) +// +// init { +// assertMainThread() +// startVal.ensureNeverFrozen() +// freeze() +// } +// +// fun get(): T { +// assertMainThread() +// return stableRef.get() +// } +//} +// +//expect val isMainThread: Boolean// = NSThread.isMainThread +// +//internal fun assertMainThread() { +// if (!isMainThread) throw IllegalStateException("Must be main thread") +//} \ No newline at end of file diff --git a/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt b/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt index c38d31f86..6f3255eca 100644 --- a/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt +++ b/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt @@ -2,14 +2,9 @@ package org.koin.core import kotlin.native.concurrent.TransferMode import kotlin.native.concurrent.Worker -import kotlin.native.concurrent.freeze -@OptIn(ExperimentalStdlibApi::class) fun runBackground(block: () -> R):R { val result = worker.execute(TransferMode.SAFE, { - if(!isExperimentalMM()) { - block.freeze() - } block }){ it() diff --git a/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt b/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt index 37ac5a80c..42da5821d 100644 --- a/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt +++ b/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt @@ -4,20 +4,20 @@ import org.koin.core.qualifier.named import org.koin.core.runBackground import org.koin.dsl.koinApplication import org.koin.dsl.module -import kotlin.test.* +import kotlin.test.Test +import kotlin.test.assertNull class PlatformThreadingTest { val scopeKey = named("KEY") val koin = koinApplication { modules( - module { - scope(scopeKey) { - } + module { + scope(scopeKey) { } + } ) }.koin - @OptIn(ExperimentalStdlibApi::class) @Test fun scopeInBackgroundFails() { val theException = runBackground { @@ -32,10 +32,6 @@ class PlatformThreadingTest { } theException?.printStackTrace() - if (isExperimentalMM()) { - assertNull(theException) - } else { - assertNotNull(theException) - } + assertNull(theException) } } \ No newline at end of file diff --git a/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index b74130d6a..f26f3b239 100644 --- a/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,16 +1,16 @@ -package org.koin.mp.native - -actual val isMainThread: Boolean - get() { - return try { - //Trying to access a global val on a background thread will throw an exception - dummyData - true - } catch (t: Throwable) { - false - } - } - -private data class DummyData(val s: String) - -private val dummyData = DummyData("arst") \ No newline at end of file +//package org.koin.mp.native +// +//actual val isMainThread: Boolean +// get() { +// return try { +// //Trying to access a global val on a background thread will throw an exception +// dummyData +// true +// } catch (t: Throwable) { +// false +// } +// } +// +//private data class DummyData(val s: String) +// +//private val dummyData = DummyData("arst") \ No newline at end of file From 56242eb53d239df20828a53e6644434491996d29 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 3 Aug 2023 16:33:37 +0200 Subject: [PATCH 13/55] replace licence for perpetual licence dates --- .../commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt | 2 +- .../commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt | 2 +- .../kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt | 2 +- .../kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt | 2 +- .../src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt | 2 +- .../kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt | 2 +- .../src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt | 2 +- .../src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt | 2 +- .../jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt | 2 +- .../kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt | 2 +- core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/KoinApplication.kt | 2 +- .../kotlin/org/koin/core/annotation/KoinAnnotations.kt | 2 +- .../commonMain/kotlin/org/koin/core/component/KoinComponent.kt | 2 +- .../kotlin/org/koin/core/component/KoinScopeComponent.kt | 2 +- .../kotlin/org/koin/core/context/DefaultContextExt.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/context/KoinContext.kt | 2 +- .../kotlin/org/koin/core/definition/BeanDefinition.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt | 2 +- .../kotlin/org/koin/core/error/ClosedScopeException.kt | 2 +- .../kotlin/org/koin/core/error/DefinitionOverrideException.kt | 2 +- .../kotlin/org/koin/core/error/InstanceCreationException.kt | 2 +- .../org/koin/core/error/KoinAppAlreadyStartedException.kt | 2 +- .../kotlin/org/koin/core/error/MissingPropertyException.kt | 2 +- .../kotlin/org/koin/core/error/NoBeanDefFoundException.kt | 2 +- .../kotlin/org/koin/core/error/NoParameterFoundException.kt | 2 +- .../kotlin/org/koin/core/error/NoPropertyFileFoundException.kt | 2 +- .../kotlin/org/koin/core/error/NoScopeDefFoundException.kt | 2 +- .../kotlin/org/koin/core/error/ScopeAlreadyCreatedException.kt | 2 +- .../kotlin/org/koin/core/error/ScopeNotCreatedException.kt | 2 +- .../kotlin/org/koin/core/extension/ExtensionManager.kt | 2 +- .../commonMain/kotlin/org/koin/core/extension/KoinExtension.kt | 2 +- .../kotlin/org/koin/core/instance/FactoryInstanceFactory.kt | 2 +- .../commonMain/kotlin/org/koin/core/instance/InstanceContext.kt | 2 +- .../commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt | 2 +- .../kotlin/org/koin/core/instance/ScopedInstanceFactory.kt | 2 +- .../kotlin/org/koin/core/instance/SingleInstanceFactory.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/logger/Logger.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/Module.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/dsl/New.kt | 2 +- .../kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt | 2 +- .../kotlin/org/koin/core/parameter/ParametersHolder.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt | 2 +- .../kotlin/org/koin/core/qualifier/StringQualifier.kt | 2 +- .../commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt | 2 +- .../kotlin/org/koin/core/registry/InstanceRegistry.kt | 2 +- .../kotlin/org/koin/core/registry/PropertyRegistry.kt | 2 +- .../commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/scope/Scope.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/scope/ScopeCallback.kt | 2 +- .../src/commonMain/kotlin/org/koin/core/time/Measure.kt | 2 +- .../src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt | 2 +- .../src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt | 2 +- core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt | 2 +- core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt | 2 +- core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt | 2 +- core/koin-core/src/commonMain/kotlin/org/koin/ext/StringExt.kt | 2 +- .../koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt | 2 +- .../src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt | 2 +- .../src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt | 2 +- .../src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt | 2 +- .../src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt | 2 +- .../src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt | 2 +- .../src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt | 2 +- .../nativeMain/kotlin/org/koin/core/context/GlobalContext.kt | 2 +- .../src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt | 2 +- .../src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt | 2 +- .../src/main/kotlin/org/koin/test/KoinTestRule.kt | 2 +- .../src/main/kotlin/org/koin/test/mock/MockProviderRule.kt | 2 +- .../src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt | 2 +- .../src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt | 2 +- .../kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt | 2 +- core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt | 2 +- .../commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt | 2 +- .../src/commonMain/kotlin/org/koin/test/check/CheckModules.kt | 2 +- .../commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt | 2 +- 82 files changed, 82 insertions(+), 82 deletions(-) diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt index 3fc06b3c2..2997916e8 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt index 494a8bba8..b9a93d6a7 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt index 0318503a1..d11319f8a 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt index 2d2868102..2102e44ef 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt index 1943c4ee0..1a98b8b4f 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt index 718f028d7..6e6cdf85d 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt index 66fdbfbd5..bfd19a6a0 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index 33abca926..fca39d919 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt index f6a6d8f61..2122955e8 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt index cd2ad96ec..57ddede9e 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index 9f949b100..e8d150124 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index e50a55c43..88bbcee73 100644 --- a/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index 6e2fa8aac..991ac36ac 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt index 1109194a4..465d142a0 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt index ba2886f1c..ad1878fb2 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt index c63578cd4..d5117af16 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt index 28b70b90f..c8feca4ac 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt index 88702e8e5..aa0500680 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt index 3411b0e55..8aab3a1f3 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt index 6ecd969ed..bed4c1dcc 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt index f77c6dd9f..ba409bf46 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt index 525994db8..816874a40 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt index d06a598e5..96fd24248 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/InstanceCreationException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/InstanceCreationException.kt index cd131d942..ae0dcfdad 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/InstanceCreationException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/InstanceCreationException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt index 9497d2421..bf0eb6916 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/MissingPropertyException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/MissingPropertyException.kt index a1cfa3937..804496345 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/MissingPropertyException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/MissingPropertyException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt index bbc2f0afb..8b00621b8 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoParameterFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoParameterFoundException.kt index 4b0a67b66..3aa313011 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoParameterFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoParameterFoundException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt index e0292f44f..3cf53016e 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoScopeDefFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoScopeDefFoundException.kt index e8150a9eb..848fe467f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoScopeDefFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoScopeDefFoundException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeAlreadyCreatedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeAlreadyCreatedException.kt index ee423e3a7..a5ad8ebdc 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeAlreadyCreatedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeAlreadyCreatedException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt index 5c56dd244..fad5b7968 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt index 2fc0e814e..39a4ce427 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt index 1f971a850..7388edee8 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt index ad10ea64b..6ad62d310 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt index 282593447..b2b0617da 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt index 006e9a77a..da17ddd54 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt index 8828f4c9d..26b01c294 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt index c12c3d445..0dc39d943 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt index 778e84812..8d4c684eb 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt index d814a9261..8441176ca 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index 9f95ac3d5..fdc5844a8 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt index 5dd27969f..fd281752c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt index 3f41e1c57..9437d00e0 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt index a97f9d715..fe252cd07 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt index 4a97c25a5..cbea32697 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt index 01423e66c..3d2de0abb 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt index 15114cdaa..f207794fa 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt index 1747a57e7..215a76ae0 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt index 63b917f7f..62deb30d5 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt index 99ecb88bb..61faccfd5 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt index 36ae9a1a3..50f899104 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt index 6c7f662b3..dfe6fdcd2 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt index 2b7f83ff1..9bae6338d 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index 247b7ee43..dae1e2ed0 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeCallback.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeCallback.kt index 2c182c877..4ee5bdc92 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeCallback.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeCallback.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt index 3ae525d5e..d29d49666 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt index edf58438e..59f99ca5e 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt index e5b9ab162..a07ceaa1f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt index ffb33583e..1db492973 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt index 631930a3f..3b9dc1154 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt b/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt index 7ba9a217d..ab188ab2a 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/ext/StringExt.kt b/core/koin-core/src/commonMain/kotlin/org/koin/ext/StringExt.kt index 2d017b35d..fc1255e5e 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/ext/StringExt.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/ext/StringExt.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt index 27cf8a0a5..26b20c714 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt index 3ee980f2d..3705077de 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt index b177e0852..aa3a6e062 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt index 29c8b22cf..1ffe648bf 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt index 6a8d00344..ad2e0ea09 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt index 8554f226d..d516ff07f 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt index 261d45b7e..abf1f86a6 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index 56bdf3a5f..6f73f19c5 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt index 6a8d00344..ad2e0ea09 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt index 2162ee631..e88ed5749 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt index 851f93101..af566b5e0 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt index 3860a51a3..5a211e8bb 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt index b17b1e9c2..ce90d928e 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt index 5c2a45816..9812c1ba5 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt index fa9706e68..ee1fc299c 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt index 176911823..f904250cd 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt index 363502ba0..11eb39b80 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt index 7c114bd4d..9f0518c48 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt index 0af395dfd..b0b778acf 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 the original author or authors. + * Copyright 2017-Present the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 699ffe88ee7e0f859b35b13697aa6f49d40fdd4a Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Fri, 4 Aug 2023 11:50:04 +0200 Subject: [PATCH 14/55] clean commented code --- .../kotlin/org/koin/core/component/KoinComponent.kt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt index d5117af16..263614b83 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt @@ -60,11 +60,3 @@ inline fun KoinComponent.inject( ): Lazy = lazy(mode) { get(qualifier, parameters) } -///** -// * Get instance instance from Koin by Primary Type P, as secondary type S -// * @param parameters -// */ -//inline fun KoinComponent.bind( -// noinline parameters: ParametersDefinition? = null -//): S = -// getKoin().bind(parameters) From 0a91bceaba452c8e45aa409b90b10297bc74b299 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Tue, 29 Aug 2023 17:33:58 +0200 Subject: [PATCH 15/55] Kotlin 1.9.10 + native time API --- core/gradle/versions.gradle | 2 +- .../nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/gradle/versions.gradle b/core/gradle/versions.gradle index 9aa0a9da8..fdb5038af 100644 --- a/core/gradle/versions.gradle +++ b/core/gradle/versions.gradle @@ -3,7 +3,7 @@ ext { koin_version = '3.5.0' // Kotlin - kotlin_version = '1.9.0' + kotlin_version = '1.9.10' coroutines_version = "1.7.3" diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt index 10a8d1624..4e9a73ad2 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt @@ -1,9 +1,9 @@ package org.koin.mp -import kotlin.system.getTimeNanos +import kotlin.time.TimeSource actual object KoinPlatformTimeTools { - actual fun getTimeInNanoSeconds() : Long { - return getTimeNanos() + actual fun getTimeInNanoSeconds(): Long { + return TimeSource.Monotonic.markNow().elapsedNow().inWholeNanoseconds } } \ No newline at end of file From 901b0cccddc96cd2a9fb096bc31ec58a30a715e3 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Tue, 29 Aug 2023 17:42:27 +0200 Subject: [PATCH 16/55] Exception type alias to help rename NoBeanDefFoundException -> NoDefinitionFoundException & KoinAppAlreadyStartedException -> ApplicationAlreadyStartedException --- .../core/error/ApplicationAlreadyStartedException.kt | 3 +++ .../koin/core/error/KoinAppAlreadyStartedException.kt | 1 + .../org/koin/core/error/NoBeanDefFoundException.kt | 1 + .../org/koin/core/error/NoDefinitionFoundException.kt | 3 +++ .../src/commonMain/kotlin/org/koin/core/scope/Scope.kt | 9 +++++---- .../kotlin/org/koin/dsl/KoinAppCreationTest.kt | 1 + .../jsMain/kotlin/org/koin/core/context/GlobalContext.kt | 4 ++-- .../kotlin/org/koin/core/context/GlobalContext.kt | 3 ++- .../kotlin/org/koin/core/context/GlobalContext.kt | 3 ++- 9 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt create mode 100644 core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt new file mode 100644 index 000000000..a974a84f0 --- /dev/null +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt @@ -0,0 +1,3 @@ +package org.koin.core.error + +typealias ApplicationAlreadyStartedException = KoinAppAlreadyStartedException \ No newline at end of file diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt index bf0eb6916..d9904fd1f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt @@ -18,4 +18,5 @@ package org.koin.core.error /** * Koin standalone app is already started error */ +@Deprecated("Will be renamed in ApplicationAlreadyStartedException") class KoinAppAlreadyStartedException(msg: String) : Exception(msg) \ No newline at end of file diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt index 8b00621b8..7a2019645 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoBeanDefFoundException.kt @@ -18,4 +18,5 @@ package org.koin.core.error /** * Definition not Found */ +@Deprecated("Will be renamed in NoDefinitionFoundException") class NoBeanDefFoundException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt new file mode 100644 index 000000000..3b28cb068 --- /dev/null +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt @@ -0,0 +1,3 @@ +package org.koin.core.error + +typealias NoDefinitionFoundException = NoBeanDefFoundException \ No newline at end of file diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index dae1e2ed0..e04c7303b 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -20,6 +20,7 @@ import org.koin.core.annotation.KoinInternalApi import org.koin.core.error.ClosedScopeException import org.koin.core.error.MissingPropertyException import org.koin.core.error.NoBeanDefFoundException +import org.koin.core.error.NoDefinitionFoundException import org.koin.core.instance.InstanceContext import org.koin.core.logger.Level import org.koin.core.logger.Logger @@ -177,7 +178,7 @@ data class Scope( _koin.logger.debug("* Scope closed - no instance found for ${clazz.getFullName()} on scope ${toString()}") null } catch (e: NoBeanDefFoundException) { - _koin.logger.debug("* No instance found for ${clazz.getFullName()} on scope ${toString()}") + _koin.logger.debug("* No instance found for type '${clazz.getFullName()}' on scope '${toString()}'") null } } @@ -300,9 +301,9 @@ data class Scope( qualifier: Qualifier?, clazz: KClass<*> ): Nothing { - val qualifierString = qualifier?.let { " & qualifier:'$qualifier'" } ?: "" - throw NoBeanDefFoundException( - "No definition found for class:'${clazz.getFullName()}' q:'$qualifierString'. Check your definitions!" + val qualifierString = qualifier?.let { " and qualifier '$qualifier'" } ?: "" + throw NoDefinitionFoundException( + "No definition found for type '${clazz.getFullName()}'$qualifierString. Check your Modules configuration and add missing type and/or qualifier!" ) } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt index f6eaf6aa8..5799f9e41 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt @@ -46,6 +46,7 @@ class KoinAppCreationTest { startKoin { } fail("should throw KoinAppAlreadyStartedException") } catch (e: KoinAppAlreadyStartedException) { + e.printStackTrace() } } diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt index 1ffe648bf..6fd45e6ac 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -17,7 +17,7 @@ package org.koin.core.context import org.koin.core.Koin import org.koin.core.KoinApplication -import org.koin.core.error.KoinAppAlreadyStartedException +import org.koin.core.error.ApplicationAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -38,7 +38,7 @@ object GlobalContext : KoinContext { private fun register(koinApplication: KoinApplication) { if (_koin != null) { - throw KoinAppAlreadyStartedException("A Koin Application has already been started") + throw ApplicationAlreadyStartedException("A Koin Application has already been started") } _koin = koinApplication.koin } diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt index d516ff07f..222f542df 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -17,6 +17,7 @@ package org.koin.core.context import org.koin.core.Koin import org.koin.core.KoinApplication +import org.koin.core.error.ApplicationAlreadyStartedException import org.koin.core.error.KoinAppAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -41,7 +42,7 @@ object GlobalContext : KoinContext { private fun register(koinApplication: KoinApplication) { if (_koin != null) { - throw KoinAppAlreadyStartedException("A Koin Application has already been started") + throw ApplicationAlreadyStartedException("A Koin Application has already been started") } _koinApplication = koinApplication _koin = koinApplication.koin diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index 6f73f19c5..5efb86b75 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -19,6 +19,7 @@ import co.touchlab.stately.concurrency.Lock import co.touchlab.stately.concurrency.withLock import org.koin.core.Koin import org.koin.core.KoinApplication +import org.koin.core.error.ApplicationAlreadyStartedException import org.koin.core.error.KoinAppAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -41,7 +42,7 @@ internal class MutableGlobalContext:KoinContext { private fun register(koinApplication: KoinApplication) { if (_koin != null) { - throw KoinAppAlreadyStartedException("A Koin Application has already been started") + throw ApplicationAlreadyStartedException("A Koin Application has already been started") } _koinApplication = koinApplication _koin = koinApplication.koin From c839ae16fd693f4538202e4808ac45058bc18449 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Tue, 29 Aug 2023 18:18:08 +0200 Subject: [PATCH 17/55] add binary compat checker --- android/build.gradle | 4 + .../api/koin-android-compat.api | 48 ++ .../api/koin-android-test.api | 19 + android/koin-android/api/koin-android.api | 251 +++++++ .../api/koin-androidx-navigation.api | 7 + .../api/koin-androidx-workmanager.api | 17 + compose/build.gradle | 4 + .../api/koin-androidx-compose-navigation.api | 11 + .../api/koin-androidx-compose.api | 20 + compose/koin-compose/api/koin-compose.api | 44 ++ .../api/sample-android-compose.api | 128 ++++ .../api/sample-desktop-compose.api | 24 + core/build.gradle | 4 + .../api/koin-core-coroutines.api | 58 ++ core/koin-core/api/koin-core.api | 659 ++++++++++++++++++ .../koin-test-junit4/api/koin-test-junit4.api | 36 + .../koin-test-junit5/api/koin-test-junit5.api | 38 + core/koin-test/api/koin-test.api | 130 ++++ ktor/build.gradle | 4 + ktor/examples/hello-ktor/api/hello-ktor.api | 34 + ktor/koin-ktor/api/koin-ktor.api | 34 + .../api/koin-logger-slf4j.api | 12 + 22 files changed, 1586 insertions(+) create mode 100644 android/koin-android-compat/api/koin-android-compat.api create mode 100644 android/koin-android-test/api/koin-android-test.api create mode 100644 android/koin-android/api/koin-android.api create mode 100644 android/koin-androidx-navigation/api/koin-androidx-navigation.api create mode 100644 android/koin-androidx-workmanager/api/koin-androidx-workmanager.api create mode 100644 compose/koin-androidx-compose-navigation/api/koin-androidx-compose-navigation.api create mode 100644 compose/koin-androidx-compose/api/koin-androidx-compose.api create mode 100644 compose/koin-compose/api/koin-compose.api create mode 100644 compose/sample-android-compose/api/sample-android-compose.api create mode 100644 compose/sample-desktop-compose/api/sample-desktop-compose.api create mode 100644 core/koin-core-coroutines/api/koin-core-coroutines.api create mode 100644 core/koin-core/api/koin-core.api create mode 100644 core/koin-test-junit4/api/koin-test-junit4.api create mode 100644 core/koin-test-junit5/api/koin-test-junit5.api create mode 100644 core/koin-test/api/koin-test.api create mode 100644 ktor/examples/hello-ktor/api/hello-ktor.api create mode 100644 ktor/koin-ktor/api/koin-ktor.api create mode 100644 ktor/koin-logger-slf4j/api/koin-logger-slf4j.api diff --git a/android/build.gradle b/android/build.gradle index 72698facc..55643a5f1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -19,6 +19,10 @@ buildscript { } } +plugins { + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' +} + wrapper { distributionType = Wrapper.DistributionType.ALL } diff --git a/android/koin-android-compat/api/koin-android-compat.api b/android/koin-android-compat/api/koin-android-compat.api new file mode 100644 index 000000000..e88029387 --- /dev/null +++ b/android/koin-android-compat/api/koin-android-compat.api @@ -0,0 +1,48 @@ +public final class org/koin/android/compat/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/android/compat/GetViewModelCompatKt { + public static final fun resolveViewModelCompat (Ljava/lang/Class;Landroidx/lifecycle/ViewModelStore;Ljava/lang/String;Landroidx/lifecycle/viewmodel/CreationExtras;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun resolveViewModelCompat$default (Ljava/lang/Class;Landroidx/lifecycle/ViewModelStore;Ljava/lang/String;Landroidx/lifecycle/viewmodel/CreationExtras;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; +} + +public final class org/koin/android/compat/ScopeCompat { + public static final field INSTANCE Lorg/koin/android/compat/ScopeCompat; + public static final fun getViewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; + public static final fun getViewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Landroidx/lifecycle/ViewModel; + public static final fun getViewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun getViewModel$default (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; + public static final fun viewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;)Lkotlin/Lazy; + public static final fun viewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Lkotlin/Lazy; + public static final fun viewModel (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun viewModel$default (Lorg/koin/core/scope/Scope;Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + +public final class org/koin/android/compat/SharedViewModelCompat { + public static final field INSTANCE Lorg/koin/android/compat/SharedViewModelCompat; + public static final fun getSharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; + public static final fun getSharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Landroidx/lifecycle/ViewModel; + public static final fun getSharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun getSharedViewModel$default (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; + public static final fun sharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;)Lkotlin/Lazy; + public static final fun sharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Lkotlin/Lazy; + public static final fun sharedViewModel (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun sharedViewModel$default (Landroidx/fragment/app/Fragment;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + +public final class org/koin/android/compat/ViewModelCompat { + public static final field INSTANCE Lorg/koin/android/compat/ViewModelCompat; + public static final fun getViewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; + public static final fun getViewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Landroidx/lifecycle/ViewModel; + public static final fun getViewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun getViewModel$default (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; + public static final fun viewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;)Lkotlin/Lazy; + public static final fun viewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Lkotlin/Lazy; + public static final fun viewModel (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun viewModel$default (Landroidx/lifecycle/ViewModelStoreOwner;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + diff --git a/android/koin-android-test/api/koin-android-test.api b/android/koin-android-test/api/koin-android-test.api new file mode 100644 index 000000000..d74c30f43 --- /dev/null +++ b/android/koin-android-test/api/koin-android-test.api @@ -0,0 +1,19 @@ +public final class org/koin/android/test/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/android/test/verify/AndroidVerify { + public static final field INSTANCE Lorg/koin/android/test/verify/AndroidVerify; + public final fun getAndroidTypes ()Ljava/util/List; +} + +public final class org/koin/android/test/verify/AndroidVerifyKt { + public static final fun androidVerify (Lorg/koin/core/module/Module;Ljava/util/List;)V + public static synthetic fun androidVerify$default (Lorg/koin/core/module/Module;Ljava/util/List;ILjava/lang/Object;)V + public static final fun verify (Lorg/koin/core/module/Module;Ljava/util/List;)V + public static synthetic fun verify$default (Lorg/koin/core/module/Module;Ljava/util/List;ILjava/lang/Object;)V +} + diff --git a/android/koin-android/api/koin-android.api b/android/koin-android/api/koin-android.api new file mode 100644 index 000000000..6149856f9 --- /dev/null +++ b/android/koin-android/api/koin-android.api @@ -0,0 +1,251 @@ +public final class androidx/lifecycle/StateViewModelFactory : androidx/lifecycle/AbstractSavedStateViewModelFactory { + public fun (Lorg/koin/core/scope/Scope;Lorg/koin/androidx/viewmodel/ViewModelParameter;)V + public final fun getParameters ()Lorg/koin/androidx/viewmodel/ViewModelParameter; + public final fun getScope ()Lorg/koin/core/scope/Scope; +} + +public final class org/koin/android/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/android/error/MissingAndroidContextException : java/lang/Throwable { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/android/ext/android/AndroidKoinScopeExtKt { + public static final fun getKoinScope (Landroid/content/ComponentCallbacks;)Lorg/koin/core/scope/Scope; +} + +public final class org/koin/android/ext/android/ComponentCallbackExtKt { + public static final fun getKoin (Landroid/content/ComponentCallbacks;)Lorg/koin/core/Koin; +} + +public final class org/koin/android/ext/koin/KoinExtKt { + public static final fun androidContext (Lorg/koin/core/KoinApplication;Landroid/content/Context;)Lorg/koin/core/KoinApplication; + public static final fun androidFileProperties (Lorg/koin/core/KoinApplication;Ljava/lang/String;)Lorg/koin/core/KoinApplication; + public static synthetic fun androidFileProperties$default (Lorg/koin/core/KoinApplication;Ljava/lang/String;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; + public static final fun androidLogger (Lorg/koin/core/KoinApplication;Lorg/koin/core/logger/Level;)Lorg/koin/core/KoinApplication; + public static synthetic fun androidLogger$default (Lorg/koin/core/KoinApplication;Lorg/koin/core/logger/Level;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; +} + +public final class org/koin/android/ext/koin/ModuleExtKt { + public static final field ERROR_MSG Ljava/lang/String; + public static final fun androidApplication (Lorg/koin/core/scope/Scope;)Landroid/app/Application; + public static final fun androidContext (Lorg/koin/core/scope/Scope;)Landroid/content/Context; +} + +public final class org/koin/android/java/KoinAndroidApplication { + public static final field INSTANCE Lorg/koin/android/java/KoinAndroidApplication; + public static final fun create (Landroid/content/Context;)Lorg/koin/core/KoinApplication; + public static final fun create (Landroid/content/Context;Lorg/koin/core/logger/Level;)Lorg/koin/core/KoinApplication; + public static synthetic fun create$default (Landroid/content/Context;Lorg/koin/core/logger/Level;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; +} + +public final class org/koin/android/logger/AndroidLogger : org/koin/core/logger/Logger { + public fun ()V + public fun (Lorg/koin/core/logger/Level;)V + public synthetic fun (Lorg/koin/core/logger/Level;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun display (Lorg/koin/core/logger/Level;Ljava/lang/String;)V +} + +public abstract interface class org/koin/android/scope/AndroidScopeComponent { + public abstract fun getScope ()Lorg/koin/core/scope/Scope; + public abstract fun onCloseScope ()V +} + +public final class org/koin/android/scope/AndroidScopeComponent$DefaultImpls { + public static fun onCloseScope (Lorg/koin/android/scope/AndroidScopeComponent;)V +} + +public final class org/koin/android/scope/ComponentCallbacksExtKt { + public static final fun createScope (Landroid/content/ComponentCallbacks;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Landroid/content/ComponentCallbacks;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public static final fun getOrCreateScope (Landroid/content/ComponentCallbacks;)Lkotlin/Lazy; + public static final fun getScopeOrNull (Landroid/content/ComponentCallbacks;)Lorg/koin/core/scope/Scope; + public static final fun newScope (Landroid/content/ComponentCallbacks;)Lkotlin/Lazy; +} + +public abstract class org/koin/android/scope/ScopeService : android/app/Service, org/koin/android/scope/AndroidScopeComponent { + public fun ()V + public fun getScope ()Lorg/koin/core/scope/Scope; + public fun onCloseScope ()V + public fun onCreate ()V + public fun onDestroy ()V +} + +public final class org/koin/android/scope/ServiceExtKt { + public static final fun createScope (Landroid/app/Service;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Landroid/app/Service;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public static final fun createServiceScope (Landroid/app/Service;)Lorg/koin/core/scope/Scope; + public static final fun destroyServiceScope (Landroid/app/Service;)V + public static final fun getScopeOrNull (Landroid/app/Service;)Lorg/koin/core/scope/Scope; + public static final fun serviceScope (Landroid/app/Service;)Lkotlin/Lazy; +} + +public final class org/koin/androidx/fragment/android/ActivityExtKt { + public static final fun setupKoinFragmentFactory (Landroidx/fragment/app/FragmentActivity;Lorg/koin/core/scope/Scope;)V + public static synthetic fun setupKoinFragmentFactory$default (Landroidx/fragment/app/FragmentActivity;Lorg/koin/core/scope/Scope;ILjava/lang/Object;)V +} + +public final class org/koin/androidx/fragment/android/KoinFragmentFactory : androidx/fragment/app/FragmentFactory, org/koin/core/component/KoinComponent { + public fun ()V + public fun (Lorg/koin/core/scope/Scope;)V + public synthetic fun (Lorg/koin/core/scope/Scope;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getKoin ()Lorg/koin/core/Koin; + public fun instantiate (Ljava/lang/ClassLoader;Ljava/lang/String;)Landroidx/fragment/app/Fragment; +} + +public final class org/koin/androidx/fragment/koin/KoinApplicationExtKt { + public static final fun fragmentFactory (Lorg/koin/core/KoinApplication;)V +} + +public final class org/koin/androidx/scope/ComponentActivityExtKt { + public static final fun activityRetainedScope (Landroidx/activity/ComponentActivity;)Lkotlin/Lazy; + public static final fun activityScope (Landroidx/activity/ComponentActivity;)Lkotlin/Lazy; + public static final fun createActivityRetainedScope (Landroidx/activity/ComponentActivity;)Lorg/koin/core/scope/Scope; + public static final fun createActivityScope (Landroidx/activity/ComponentActivity;)Lorg/koin/core/scope/Scope; + public static final fun createScope (Landroidx/activity/ComponentActivity;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Landroidx/activity/ComponentActivity;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public static final fun getScopeOrNull (Landroidx/activity/ComponentActivity;)Lorg/koin/core/scope/Scope; +} + +public final class org/koin/androidx/scope/FragmentExtKt { + public static final fun createFragmentScope (Landroidx/fragment/app/Fragment;Z)Lorg/koin/core/scope/Scope; + public static synthetic fun createFragmentScope$default (Landroidx/fragment/app/Fragment;ZILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public static final fun fragmentScope (Landroidx/fragment/app/Fragment;Z)Lkotlin/Lazy; + public static synthetic fun fragmentScope$default (Landroidx/fragment/app/Fragment;ZILjava/lang/Object;)Lkotlin/Lazy; + public static final fun getScopeActivity (Landroidx/fragment/app/Fragment;)Lorg/koin/androidx/scope/ScopeActivity; + public static final fun getScopeOrNull (Landroidx/fragment/app/Fragment;)Lorg/koin/core/scope/Scope; +} + +public final class org/koin/androidx/scope/LifecycleOwnerExtKt { + public static final fun getCurrentScope (Landroidx/lifecycle/LifecycleOwner;)Lorg/koin/core/scope/Scope; + public static final fun getLifecycleScope (Landroidx/lifecycle/LifecycleOwner;)Lorg/koin/core/scope/Scope; + public static final fun getScope (Landroidx/lifecycle/LifecycleOwner;)Lorg/koin/core/scope/Scope; +} + +public final class org/koin/androidx/scope/LifecycleViewModelScopeDelegate : kotlin/properties/ReadOnlyProperty { + public fun (Landroidx/activity/ComponentActivity;Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function1;)V + public synthetic fun (Landroidx/activity/ComponentActivity;Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getValue (Landroidx/lifecycle/LifecycleOwner;Lkotlin/reflect/KProperty;)Lorg/koin/core/scope/Scope; + public synthetic fun getValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; +} + +public abstract class org/koin/androidx/scope/RetainedScopeActivity : androidx/appcompat/app/AppCompatActivity, org/koin/android/scope/AndroidScopeComponent { + public fun ()V + public fun (I)V + public synthetic fun (IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getScope ()Lorg/koin/core/scope/Scope; + public fun onCloseScope ()V + protected fun onCreate (Landroid/os/Bundle;)V +} + +public abstract class org/koin/androidx/scope/ScopeActivity : androidx/appcompat/app/AppCompatActivity, org/koin/android/scope/AndroidScopeComponent { + public fun ()V + public fun (I)V + public synthetic fun (IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getScope ()Lorg/koin/core/scope/Scope; + public fun onCloseScope ()V + protected fun onCreate (Landroid/os/Bundle;)V +} + +public abstract class org/koin/androidx/scope/ScopeFragment : androidx/fragment/app/Fragment, org/koin/android/scope/AndroidScopeComponent { + public fun ()V + public fun (I)V + public synthetic fun (IILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getScope ()Lorg/koin/core/scope/Scope; + public fun onCloseScope ()V + public fun onViewCreated (Landroid/view/View;Landroid/os/Bundle;)V +} + +public final class org/koin/androidx/scope/ScopeHandlerViewModel : androidx/lifecycle/ViewModel { + public fun ()V + public final fun getScope ()Lorg/koin/core/scope/Scope; + public final fun setScope (Lorg/koin/core/scope/Scope;)V +} + +public final class org/koin/androidx/viewmodel/GetViewModelKt { + public static final fun lazyResolveViewModel (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun lazyResolveViewModel$default (Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; + public static final fun resolveViewModel (Lkotlin/reflect/KClass;Landroidx/lifecycle/ViewModelStore;Ljava/lang/String;Landroidx/lifecycle/viewmodel/CreationExtras;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun resolveViewModel$default (Lkotlin/reflect/KClass;Landroidx/lifecycle/ViewModelStore;Ljava/lang/String;Landroidx/lifecycle/viewmodel/CreationExtras;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; +} + +public final class org/koin/androidx/viewmodel/ViewModelOwner { + public static final field Companion Lorg/koin/androidx/viewmodel/ViewModelOwner$Companion; + public fun (Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;)V + public synthetic fun (Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getStateRegistry ()Landroidx/savedstate/SavedStateRegistryOwner; + public final fun getStoreOwner ()Landroidx/lifecycle/ViewModelStoreOwner; +} + +public final class org/koin/androidx/viewmodel/ViewModelOwner$Companion { + public final fun from (Landroidx/lifecycle/ViewModelStoreOwner;)Lorg/koin/androidx/viewmodel/ViewModelOwner; + public final fun from (Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;)Lorg/koin/androidx/viewmodel/ViewModelOwner; + public static synthetic fun from$default (Lorg/koin/androidx/viewmodel/ViewModelOwner$Companion;Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;ILjava/lang/Object;)Lorg/koin/androidx/viewmodel/ViewModelOwner; + public final fun fromAny (Ljava/lang/Object;)Lorg/koin/androidx/viewmodel/ViewModelOwner; +} + +public final class org/koin/androidx/viewmodel/ViewModelParameter { + public fun (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;)V + public synthetic fun (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/savedstate/SavedStateRegistryOwner;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getClazz ()Lkotlin/reflect/KClass; + public final fun getParameters ()Lkotlin/jvm/functions/Function0; + public final fun getQualifier ()Lorg/koin/core/qualifier/Qualifier; + public final fun getRegistryOwner ()Landroidx/savedstate/SavedStateRegistryOwner; + public final fun getState ()Lkotlin/jvm/functions/Function0; + public final fun getViewModelStoreOwner ()Landroidx/lifecycle/ViewModelStoreOwner; +} + +public final class org/koin/androidx/viewmodel/ViewModelResolverKt { + public static final fun pickFactory (Lorg/koin/core/scope/Scope;Lorg/koin/androidx/viewmodel/ViewModelParameter;)Landroidx/lifecycle/ViewModelProvider$Factory; +} + +public final class org/koin/androidx/viewmodel/ext/android/BundleExtKt { + public static final fun toExtras (Landroid/os/Bundle;Landroidx/lifecycle/ViewModelStoreOwner;)Landroidx/lifecycle/viewmodel/CreationExtras; +} + +public final class org/koin/androidx/viewmodel/ext/android/FragmentSharedStateVMKt { + public static final fun getSharedStateViewModel (Landroidx/fragment/app/Fragment;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;)Landroidx/lifecycle/ViewModel; + public static synthetic fun getSharedStateViewModel$default (Landroidx/fragment/app/Fragment;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Landroidx/lifecycle/ViewModel; + public static final fun sharedStateViewModel (Landroidx/fragment/app/Fragment;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun sharedStateViewModel$default (Landroidx/fragment/app/Fragment;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/reflect/KClass;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + +public final class org/koin/androidx/viewmodel/ext/android/ViewModelLazyKt { + public static final fun getLazyViewModelForClass (Lkotlin/reflect/KClass;Landroidx/lifecycle/ViewModelStoreOwner;Lorg/koin/core/scope/Scope;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun getLazyViewModelForClass$default (Lkotlin/reflect/KClass;Landroidx/lifecycle/ViewModelStoreOwner;Lorg/koin/core/scope/Scope;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; + public static final fun viewModelForClass (Landroidx/activity/ComponentActivity;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Landroidx/lifecycle/ViewModelStoreOwner;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static final fun viewModelForClass (Landroidx/fragment/app/Fragment;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun viewModelForClass$default (Landroidx/activity/ComponentActivity;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Landroidx/lifecycle/ViewModelStoreOwner;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; + public static synthetic fun viewModelForClass$default (Landroidx/fragment/app/Fragment;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + +public final class org/koin/androidx/viewmodel/factory/DefaultViewModelFactory : androidx/lifecycle/ViewModelProvider$Factory { + public fun (Lorg/koin/core/scope/Scope;Lorg/koin/androidx/viewmodel/ViewModelParameter;)V + public fun create (Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; + public final fun getParameters ()Lorg/koin/androidx/viewmodel/ViewModelParameter; + public final fun getScope ()Lorg/koin/core/scope/Scope; +} + +public final class org/koin/androidx/viewmodel/factory/KoinViewModelFactory : androidx/lifecycle/ViewModelProvider$Factory { + public fun (Lkotlin/reflect/KClass;Lorg/koin/core/scope/Scope;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)V + public synthetic fun (Lkotlin/reflect/KClass;Lorg/koin/core/scope/Scope;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun create (Ljava/lang/Class;Landroidx/lifecycle/viewmodel/CreationExtras;)Landroidx/lifecycle/ViewModel; +} + +public final class org/koin/androidx/viewmodel/parameter/AndroidParametersHolder : org/koin/core/parameter/ParametersHolder { + public fun (Lkotlin/jvm/functions/Function0;Landroidx/lifecycle/viewmodel/CreationExtras;)V + public synthetic fun (Lkotlin/jvm/functions/Function0;Landroidx/lifecycle/viewmodel/CreationExtras;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun elementAt (ILkotlin/reflect/KClass;)Ljava/lang/Object; + public final fun getExtras ()Landroidx/lifecycle/viewmodel/CreationExtras; + public fun getOrNull (Lkotlin/reflect/KClass;)Ljava/lang/Object; +} + +public final class org/koin/androidx/viewmodel/scope/ScopeExtKt { + public static final fun emptyState ()Lkotlin/jvm/functions/Function0; +} + diff --git a/android/koin-androidx-navigation/api/koin-androidx-navigation.api b/android/koin-androidx-navigation/api/koin-androidx-navigation.api new file mode 100644 index 000000000..9da3f686f --- /dev/null +++ b/android/koin-androidx-navigation/api/koin-androidx-navigation.api @@ -0,0 +1,7 @@ +public final class org/koin/androidx/navigation/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + diff --git a/android/koin-androidx-workmanager/api/koin-androidx-workmanager.api b/android/koin-androidx-workmanager/api/koin-androidx-workmanager.api new file mode 100644 index 000000000..1c5e40345 --- /dev/null +++ b/android/koin-androidx-workmanager/api/koin-androidx-workmanager.api @@ -0,0 +1,17 @@ +public final class org/koin/androidx/workmanager/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/androidx/workmanager/factory/KoinWorkerFactory : androidx/work/WorkerFactory, org/koin/core/component/KoinComponent { + public fun ()V + public fun createWorker (Landroid/content/Context;Ljava/lang/String;Landroidx/work/WorkerParameters;)Landroidx/work/ListenableWorker; + public fun getKoin ()Lorg/koin/core/Koin; +} + +public final class org/koin/androidx/workmanager/koin/KoinApplicationExtKt { + public static final fun workManagerFactory (Lorg/koin/core/KoinApplication;)V +} + diff --git a/compose/build.gradle b/compose/build.gradle index 9722f36e6..606ea3e16 100644 --- a/compose/build.gradle +++ b/compose/build.gradle @@ -21,6 +21,10 @@ buildscript { } } +plugins { + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' +} + wrapper { distributionType = Wrapper.DistributionType.ALL } diff --git a/compose/koin-androidx-compose-navigation/api/koin-androidx-compose-navigation.api b/compose/koin-androidx-compose-navigation/api/koin-androidx-compose-navigation.api new file mode 100644 index 000000000..7226c4511 --- /dev/null +++ b/compose/koin-androidx-compose-navigation/api/koin-androidx-compose-navigation.api @@ -0,0 +1,11 @@ +public final class org/koin/androidx/compose/navigation/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/androidx/compose/navigation/NavViewModelInternalsKt { + public static final fun defaultNavExtras (Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/compose/runtime/Composer;I)Landroidx/lifecycle/viewmodel/CreationExtras; +} + diff --git a/compose/koin-androidx-compose/api/koin-androidx-compose.api b/compose/koin-androidx-compose/api/koin-androidx-compose.api new file mode 100644 index 000000000..ef2a9d9b9 --- /dev/null +++ b/compose/koin-androidx-compose/api/koin-androidx-compose.api @@ -0,0 +1,20 @@ +public final class org/koin/androidx/compose/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/androidx/compose/GetExtKt { + public static final fun getKoin (Landroidx/compose/runtime/Composer;I)Lorg/koin/core/Koin; +} + +public final class org/koin/androidx/compose/ViewModelInternalsKt { + public static final fun defaultExtras (Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/compose/runtime/Composer;I)Landroidx/lifecycle/viewmodel/CreationExtras; +} + +public final class org/koin/androidx/compose/scope/KoinAndroidScopeKt { + public static final fun KoinActivityScope (Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V + public static final fun KoinFragmentScope (Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V +} + diff --git a/compose/koin-compose/api/koin-compose.api b/compose/koin-compose/api/koin-compose.api new file mode 100644 index 000000000..890f8a9e1 --- /dev/null +++ b/compose/koin-compose/api/koin-compose.api @@ -0,0 +1,44 @@ +public final class org/koin/compose/KoinApplicationKt { + public static final fun KoinApplication (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V + public static final fun KoinApplication (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V + public static final fun getKoin (Landroidx/compose/runtime/Composer;I)Lorg/koin/core/Koin; + public static final fun getLocalKoinApplication ()Landroidx/compose/runtime/ProvidableCompositionLocal; + public static final fun getLocalKoinScope ()Landroidx/compose/runtime/ProvidableCompositionLocal; +} + +public final class org/koin/compose/module/CompositionKoinModuleLoader : androidx/compose/runtime/RememberObserver { + public static final field $stable I + public fun (Ljava/util/List;Lorg/koin/core/Koin;ZZ)V + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun getModules ()Ljava/util/List; + public final fun getUnloadOnAbandoned ()Z + public final fun getUnloadOnForgotten ()Z + public fun onAbandoned ()V + public fun onForgotten ()V + public fun onRemembered ()V +} + +public final class org/koin/compose/module/RememberModulesKt { + public static final fun rememberKoinModules (Ljava/lang/Boolean;Ljava/lang/Boolean;ZLkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;II)V +} + +public final class org/koin/compose/scope/CompositionKoinScopeLoader : androidx/compose/runtime/RememberObserver { + public static final field $stable I + public fun (Lorg/koin/core/scope/Scope;Lorg/koin/core/Koin;)V + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun getScope ()Lorg/koin/core/scope/Scope; + public fun onAbandoned ()V + public fun onForgotten ()V + public fun onRemembered ()V +} + +public final class org/koin/compose/scope/KoinScopeKt { + public static final fun KoinScope (Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V + public static final fun KoinScope (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V + public static final fun RememberScope (Lorg/koin/core/scope/Scope;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V +} + +public final class org/koin/compose/scope/RememberScopesKt { + public static final fun rememberKoinScope (Lorg/koin/core/scope/Scope;Landroidx/compose/runtime/Composer;I)Lorg/koin/core/scope/Scope; +} + diff --git a/compose/sample-android-compose/api/sample-android-compose.api b/compose/sample-android-compose/api/sample-android-compose.api new file mode 100644 index 000000000..0f04d3bd4 --- /dev/null +++ b/compose/sample-android-compose/api/sample-android-compose.api @@ -0,0 +1,128 @@ +public final class org/koin/sample/androidx/compose/AppKt { + public static final fun App (Lorg/koin/sample/androidx/compose/viewmodel/UserViewModel;Landroidx/compose/runtime/Composer;II)V + public static final fun FactoryComposable (Ljava/lang/String;Lorg/koin/sample/androidx/compose/data/MyFactory;Landroidx/compose/runtime/Composer;II)V + public static final fun InnerFactoryComposable (Ljava/lang/String;Lorg/koin/sample/androidx/compose/data/MyInnerFactory;Landroidx/compose/runtime/Composer;II)V + public static final fun ScopeComposable (Ljava/lang/String;Ljava/lang/String;Lorg/koin/sample/androidx/compose/data/MyScoped;Landroidx/compose/runtime/Composer;II)V + public static final fun SingleComposable (Ljava/lang/String;Lorg/koin/sample/androidx/compose/data/MySingle;Landroidx/compose/runtime/Composer;II)V + public static final fun ViewModelComposable (Ljava/lang/String;Lorg/koin/sample/androidx/compose/viewmodel/SSHViewModel;Landroidx/compose/runtime/Composer;II)V +} + +public final class org/koin/sample/androidx/compose/BuildConfig { + public static final field APPLICATION_ID Ljava/lang/String; + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field VERSION_CODE I + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class org/koin/sample/androidx/compose/ComposableSingletons$AppKt { + public static final field INSTANCE Lorg/koin/sample/androidx/compose/ComposableSingletons$AppKt; + public static field lambda-1 Lkotlin/jvm/functions/Function3; + public static field lambda-2 Lkotlin/jvm/functions/Function3; + public static field lambda-3 Lkotlin/jvm/functions/Function3; + public static field lambda-4 Lkotlin/jvm/functions/Function3; + public fun ()V + public final fun getLambda-1$sample_android_compose_release ()Lkotlin/jvm/functions/Function3; + public final fun getLambda-2$sample_android_compose_release ()Lkotlin/jvm/functions/Function3; + public final fun getLambda-3$sample_android_compose_release ()Lkotlin/jvm/functions/Function3; + public final fun getLambda-4$sample_android_compose_release ()Lkotlin/jvm/functions/Function3; +} + +public final class org/koin/sample/androidx/compose/ComposableSingletons$MainActivityKt { + public static final field INSTANCE Lorg/koin/sample/androidx/compose/ComposableSingletons$MainActivityKt; + public static field lambda-1 Lkotlin/jvm/functions/Function2; + public static field lambda-2 Lkotlin/jvm/functions/Function2; + public fun ()V + public final fun getLambda-1$sample_android_compose_release ()Lkotlin/jvm/functions/Function2; + public final fun getLambda-2$sample_android_compose_release ()Lkotlin/jvm/functions/Function2; +} + +public final class org/koin/sample/androidx/compose/MainActivity : org/koin/androidx/scope/ScopeActivity { + public static final field $stable I + public static final field Companion Lorg/koin/sample/androidx/compose/MainActivity$Companion; + public fun ()V +} + +public final class org/koin/sample/androidx/compose/MainActivity$Companion { + public final fun getLogger ()Ljava/util/logging/Logger; +} + +public final class org/koin/sample/androidx/compose/MainApplication : android/app/Application { + public static final field $stable I + public fun ()V + public fun onCreate ()V +} + +public final class org/koin/sample/androidx/compose/UIComponentsKt { + public static final fun ButtonForCreate (Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V + public static final fun UsersView (Ljava/util/List;Landroidx/compose/runtime/Composer;I)V + public static final fun clickComponent (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V + public static final fun now ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/MyFactory { + public static final field $stable I + public fun (Ljava/lang/String;)V + public final fun getId ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/MyInnerFactory { + public static final field $stable I + public fun (Ljava/lang/String;)V + public final fun getId ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/MyScoped { + public static final field $stable I + public fun ()V + public final fun getId ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/MySingle { + public static final field $stable I + public fun ()V + public final fun getId ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/User { + public static final field $stable I + public fun (Ljava/lang/String;I)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()I + public final fun copy (Ljava/lang/String;I)Lorg/koin/sample/androidx/compose/data/User; + public static synthetic fun copy$default (Lorg/koin/sample/androidx/compose/data/User;Ljava/lang/String;IILjava/lang/Object;)Lorg/koin/sample/androidx/compose/data/User; + public fun equals (Ljava/lang/Object;)Z + public final fun getAge ()I + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/sample/androidx/compose/data/UserRepository { + public static final field $stable I + public fun ()V + public final fun getUsers ()Ljava/util/List; +} + +public final class org/koin/sample/androidx/compose/di/AppModuleKt { + public static final fun getAppModule ()Lorg/koin/core/module/Module; + public static final fun getSecondModule ()Lorg/koin/core/module/Module; + public static final fun getWALLET_SCOPE ()Lorg/koin/core/qualifier/StringQualifier; +} + +public final class org/koin/sample/androidx/compose/viewmodel/SSHViewModel : androidx/lifecycle/ViewModel { + public static final field $stable I + public fun (Ljava/lang/String;Landroidx/lifecycle/SavedStateHandle;)V + public final fun getId ()Ljava/lang/String; + public final fun getLastIds ()Ljava/util/Set; + public final fun saveId ()V + public final fun setLastIds (Ljava/util/Set;)V +} + +public final class org/koin/sample/androidx/compose/viewmodel/UserViewModel : androidx/lifecycle/ViewModel { + public static final field $stable I + public fun (Lorg/koin/sample/androidx/compose/data/UserRepository;)V + public final fun getUsers ()Ljava/util/List; +} + diff --git a/compose/sample-desktop-compose/api/sample-desktop-compose.api b/compose/sample-desktop-compose/api/sample-desktop-compose.api new file mode 100644 index 000000000..37f603c59 --- /dev/null +++ b/compose/sample-desktop-compose/api/sample-desktop-compose.api @@ -0,0 +1,24 @@ +public final class org/koin/sample/compose/desktop/ComposableSingletons$MainKt { + public static final field INSTANCE Lorg/koin/sample/compose/desktop/ComposableSingletons$MainKt; + public static field lambda-1 Lkotlin/jvm/functions/Function2; + public static field lambda-2 Lkotlin/jvm/functions/Function3; + public static field lambda-3 Lkotlin/jvm/functions/Function3; + public fun ()V + public final fun getLambda-1$sample_desktop_compose ()Lkotlin/jvm/functions/Function2; + public final fun getLambda-2$sample_desktop_compose ()Lkotlin/jvm/functions/Function3; + public final fun getLambda-3$sample_desktop_compose ()Lkotlin/jvm/functions/Function3; +} + +public final class org/koin/sample/compose/desktop/MainKt { + public static final fun App (Landroidx/compose/runtime/Composer;I)V + public static final fun getMod ()Lorg/koin/core/module/Module; + public static final fun main ()V + public static synthetic fun main ([Ljava/lang/String;)V +} + +public final class org/koin/sample/compose/desktop/Myfactory { + public static final field $stable I + public fun ()V + public final fun getId ()Ljava/lang/String; +} + diff --git a/core/build.gradle b/core/build.gradle index c00ca1b17..aacfcef24 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -15,6 +15,10 @@ buildscript { } } +plugins { + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' +} + wrapper { distributionType = Wrapper.DistributionType.ALL } diff --git a/core/koin-core-coroutines/api/koin-core-coroutines.api b/core/koin-core-coroutines/api/koin-core-coroutines.api new file mode 100644 index 000000000..45ca487e2 --- /dev/null +++ b/core/koin-core-coroutines/api/koin-core-coroutines.api @@ -0,0 +1,58 @@ +public final class org/koin/core/KoinApplicationLazyExtKt { + public static final fun lazyModules (Lorg/koin/core/KoinApplication;Ljava/util/List;)V + public static final fun lazyModules (Lorg/koin/core/KoinApplication;[Lkotlin/Lazy;)V +} + +public final class org/koin/core/KoinLazyExtKt { + public static final fun awaitAllStartJobs (Lorg/koin/core/Koin;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun isAllStartedJobsDone (Lorg/koin/core/Koin;)Z + public static final fun onKoinStarted (Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class org/koin/core/KoinWaitExtKt { + public static final fun runOnKoinStarted (Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function2;)V + public static final fun waitAllStartJobs (Lorg/koin/core/Koin;)V +} + +public final class org/koin/core/context/ContextWaitJVMKt { + public static final fun waitKoinStart ()V +} + +public final class org/koin/core/context/LoadLazyModulesKt { + public static final fun loadKoinModules (Lkotlin/Lazy;)V +} + +public final class org/koin/core/coroutine/KoinCoroutinesEngine : kotlinx/coroutines/CoroutineScope, org/koin/core/extension/KoinExtension { + public static final field Companion Lorg/koin/core/coroutine/KoinCoroutinesEngine$Companion; + public static final field EXTENSION_NAME Ljava/lang/String; + public field koin Lorg/koin/core/Koin; + public fun ()V + public final fun awaitAllStartJobs (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext; + public fun getKoin ()Lorg/koin/core/Koin; + public final fun launchStartJob (Lkotlin/jvm/functions/Function2;)V + public fun onClose ()V + public fun setKoin (Lorg/koin/core/Koin;)V +} + +public final class org/koin/core/coroutine/KoinCoroutinesEngine$Companion { +} + +public final class org/koin/core/extension/KoinCoroutinesExtensionKt { + public static final fun coroutinesEngine (Lorg/koin/core/KoinApplication;)V + public static final fun getCoroutinesEngine (Lorg/koin/core/Koin;)Lorg/koin/core/coroutine/KoinCoroutinesEngine; +} + +public final class org/koin/core/module/LazyModuleExtKt { + public static final fun includes (Lorg/koin/core/module/Module;[Lkotlin/Lazy;)V +} + +public final class org/koin/dsl/LazyModuleDSLKt { + public static final fun lazyModule (Lkotlin/jvm/functions/Function1;)Lkotlin/Lazy; +} + +public final class org/koin/mp/KoinPlatformCoroutinesTools { + public static final field INSTANCE Lorg/koin/mp/KoinPlatformCoroutinesTools; + public final fun defaultCoroutineDispatcher ()Lkotlinx/coroutines/CoroutineDispatcher; +} + diff --git a/core/koin-core/api/koin-core.api b/core/koin-core/api/koin-core.api new file mode 100644 index 000000000..7386b7f5d --- /dev/null +++ b/core/koin-core/api/koin-core.api @@ -0,0 +1,659 @@ +public final class org/koin/KoinApplicationExtKt { + public static final fun environmentProperties (Lorg/koin/core/KoinApplication;)Lorg/koin/core/KoinApplication; + public static final fun fileProperties (Lorg/koin/core/KoinApplication;Ljava/lang/String;)Lorg/koin/core/KoinApplication; + public static synthetic fun fileProperties$default (Lorg/koin/core/KoinApplication;Ljava/lang/String;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; +} + +public final class org/koin/core/Koin { + public fun ()V + public final fun close ()V + public final fun createEagerInstances ()V + public final fun createScope (Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public final fun createScope (Lorg/koin/core/component/KoinScopeComponent;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Lorg/koin/core/Koin;Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public final fun deleteProperty (Ljava/lang/String;)V + public final fun deleteScope (Ljava/lang/String;)V + public final fun get (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun get$default (Lorg/koin/core/Koin;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public final fun getExtensionManager ()Lorg/koin/core/extension/ExtensionManager; + public final fun getInstanceRegistry ()Lorg/koin/core/registry/InstanceRegistry; + public final fun getLogger ()Lorg/koin/core/logger/Logger; + public final fun getOrCreateScope (Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun getOrCreateScope$default (Lorg/koin/core/Koin;Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public final fun getOrNull (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun getOrNull$default (Lorg/koin/core/Koin;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public final fun getProperty (Ljava/lang/String;)Ljava/lang/Object; + public final fun getProperty (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; + public final fun getPropertyRegistry ()Lorg/koin/core/registry/PropertyRegistry; + public final fun getScope (Ljava/lang/String;)Lorg/koin/core/scope/Scope; + public final fun getScopeOrNull (Ljava/lang/String;)Lorg/koin/core/scope/Scope; + public final fun getScopeRegistry ()Lorg/koin/core/registry/ScopeRegistry; + public final fun loadModules (Ljava/util/List;Z)V + public static synthetic fun loadModules$default (Lorg/koin/core/Koin;Ljava/util/List;ZILjava/lang/Object;)V + public final fun setProperty (Ljava/lang/String;Ljava/lang/Object;)V + public final fun setupLogger (Lorg/koin/core/logger/Logger;)V + public final fun unloadModules (Ljava/util/List;)V +} + +public final class org/koin/core/KoinApplication { + public static final field Companion Lorg/koin/core/KoinApplication$Companion; + public final fun allowOverride (Z)V + public final fun close ()V + public final fun createEagerInstances ()V + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun logger (Lorg/koin/core/logger/Logger;)Lorg/koin/core/KoinApplication; + public final fun modules (Ljava/util/List;)Lorg/koin/core/KoinApplication; + public final fun modules (Lorg/koin/core/module/Module;)Lorg/koin/core/KoinApplication; + public final fun modules ([Lorg/koin/core/module/Module;)Lorg/koin/core/KoinApplication; + public final fun printLogger (Lorg/koin/core/logger/Level;)Lorg/koin/core/KoinApplication; + public static synthetic fun printLogger$default (Lorg/koin/core/KoinApplication;Lorg/koin/core/logger/Level;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; + public final fun properties (Ljava/util/Map;)Lorg/koin/core/KoinApplication; +} + +public final class org/koin/core/KoinApplication$Companion { + public final fun init ()Lorg/koin/core/KoinApplication; +} + +public abstract interface annotation class org/koin/core/annotation/KoinExperimentalAPI : java/lang/annotation/Annotation { +} + +public abstract interface annotation class org/koin/core/annotation/KoinInternalApi : java/lang/annotation/Annotation { +} + +public abstract interface annotation class org/koin/core/annotation/KoinReflectAPI : java/lang/annotation/Annotation { +} + +public abstract interface class org/koin/core/component/KoinComponent { + public abstract fun getKoin ()Lorg/koin/core/Koin; +} + +public final class org/koin/core/component/KoinComponent$DefaultImpls { + public static fun getKoin (Lorg/koin/core/component/KoinComponent;)Lorg/koin/core/Koin; +} + +public abstract interface class org/koin/core/component/KoinScopeComponent : org/koin/core/component/KoinComponent { + public abstract fun closeScope ()V + public abstract fun getScope ()Lorg/koin/core/scope/Scope; +} + +public final class org/koin/core/component/KoinScopeComponent$DefaultImpls { + public static fun closeScope (Lorg/koin/core/component/KoinScopeComponent;)V + public static fun getKoin (Lorg/koin/core/component/KoinScopeComponent;)Lorg/koin/core/Koin; +} + +public final class org/koin/core/component/KoinScopeComponentKt { + public static final fun createScope (Lorg/koin/core/component/KoinScopeComponent;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Lorg/koin/core/component/KoinScopeComponent;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public static final fun getOrCreateScope (Lorg/koin/core/component/KoinScopeComponent;)Lkotlin/Lazy; + public static final fun getScopeId (Ljava/lang/Object;)Ljava/lang/String; + public static final fun getScopeName (Ljava/lang/Object;)Lorg/koin/core/qualifier/TypeQualifier; + public static final fun getScopeOrNull (Lorg/koin/core/component/KoinScopeComponent;)Lorg/koin/core/scope/Scope; + public static final fun newScope (Lorg/koin/core/component/KoinScopeComponent;)Lkotlin/Lazy; +} + +public final class org/koin/core/context/DefaultContextExtKt { + public static final fun loadKoinModules (Ljava/util/List;)V + public static final fun loadKoinModules (Lorg/koin/core/module/Module;)V + public static final fun startKoin (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; + public static final fun startKoin (Lorg/koin/core/KoinApplication;)Lorg/koin/core/KoinApplication; + public static final fun stopKoin ()V + public static final fun unloadKoinModules (Ljava/util/List;)V + public static final fun unloadKoinModules (Lorg/koin/core/module/Module;)V +} + +public final class org/koin/core/context/GlobalContext : org/koin/core/context/KoinContext { + public static final field INSTANCE Lorg/koin/core/context/GlobalContext; + public fun get ()Lorg/koin/core/Koin; + public final fun getKoinApplicationOrNull ()Lorg/koin/core/KoinApplication; + public fun getOrNull ()Lorg/koin/core/Koin; + public fun loadKoinModules (Ljava/util/List;)V + public fun loadKoinModules (Lorg/koin/core/module/Module;)V + public fun startKoin (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; + public fun startKoin (Lorg/koin/core/KoinApplication;)Lorg/koin/core/KoinApplication; + public fun stopKoin ()V + public fun unloadKoinModules (Ljava/util/List;)V + public fun unloadKoinModules (Lorg/koin/core/module/Module;)V +} + +public abstract interface class org/koin/core/context/KoinContext { + public abstract fun get ()Lorg/koin/core/Koin; + public abstract fun getOrNull ()Lorg/koin/core/Koin; + public abstract fun loadKoinModules (Ljava/util/List;)V + public abstract fun loadKoinModules (Lorg/koin/core/module/Module;)V + public abstract fun startKoin (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; + public abstract fun startKoin (Lorg/koin/core/KoinApplication;)Lorg/koin/core/KoinApplication; + public abstract fun stopKoin ()V + public abstract fun unloadKoinModules (Ljava/util/List;)V + public abstract fun unloadKoinModules (Lorg/koin/core/module/Module;)V +} + +public final class org/koin/core/definition/BeanDefinition { + public fun (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function2;Lorg/koin/core/definition/Kind;Ljava/util/List;)V + public synthetic fun (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function2;Lorg/koin/core/definition/Kind;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lorg/koin/core/qualifier/Qualifier; + public final fun component2 ()Lkotlin/reflect/KClass; + public final fun component3 ()Lorg/koin/core/qualifier/Qualifier; + public final fun component4 ()Lkotlin/jvm/functions/Function2; + public final fun component5 ()Lorg/koin/core/definition/Kind; + public final fun component6 ()Ljava/util/List; + public final fun copy (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function2;Lorg/koin/core/definition/Kind;Ljava/util/List;)Lorg/koin/core/definition/BeanDefinition; + public static synthetic fun copy$default (Lorg/koin/core/definition/BeanDefinition;Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function2;Lorg/koin/core/definition/Kind;Ljava/util/List;ILjava/lang/Object;)Lorg/koin/core/definition/BeanDefinition; + public fun equals (Ljava/lang/Object;)Z + public final fun getCallbacks ()Lorg/koin/core/definition/Callbacks; + public final fun getDefinition ()Lkotlin/jvm/functions/Function2; + public final fun getKind ()Lorg/koin/core/definition/Kind; + public final fun getPrimaryType ()Lkotlin/reflect/KClass; + public final fun getQualifier ()Lorg/koin/core/qualifier/Qualifier; + public final fun getScopeQualifier ()Lorg/koin/core/qualifier/Qualifier; + public final fun getSecondaryTypes ()Ljava/util/List; + public final fun get_createdAtStart ()Z + public final fun hasType (Lkotlin/reflect/KClass;)Z + public fun hashCode ()I + public final fun is (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/qualifier/Qualifier;)Z + public final fun setCallbacks (Lorg/koin/core/definition/Callbacks;)V + public final fun setQualifier (Lorg/koin/core/qualifier/Qualifier;)V + public final fun setSecondaryTypes (Ljava/util/List;)V + public final fun set_createdAtStart (Z)V + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/definition/BeanDefinitionKt { + public static final fun indexKey (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/qualifier/Qualifier;)Ljava/lang/String; +} + +public final class org/koin/core/definition/Callbacks { + public fun ()V + public fun (Lkotlin/jvm/functions/Function1;)V + public synthetic fun (Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lkotlin/jvm/functions/Function1; + public final fun copy (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/definition/Callbacks; + public static synthetic fun copy$default (Lorg/koin/core/definition/Callbacks;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/definition/Callbacks; + public fun equals (Ljava/lang/Object;)Z + public final fun getOnClose ()Lkotlin/jvm/functions/Function1; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/definition/Kind : java/lang/Enum { + public static final field Factory Lorg/koin/core/definition/Kind; + public static final field Scoped Lorg/koin/core/definition/Kind; + public static final field Singleton Lorg/koin/core/definition/Kind; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lorg/koin/core/definition/Kind; + public static fun values ()[Lorg/koin/core/definition/Kind; +} + +public final class org/koin/core/definition/KoinDefinition { + public fun (Lorg/koin/core/module/Module;Lorg/koin/core/instance/InstanceFactory;)V + public final fun component1 ()Lorg/koin/core/module/Module; + public final fun component2 ()Lorg/koin/core/instance/InstanceFactory; + public final fun copy (Lorg/koin/core/module/Module;Lorg/koin/core/instance/InstanceFactory;)Lorg/koin/core/definition/KoinDefinition; + public static synthetic fun copy$default (Lorg/koin/core/definition/KoinDefinition;Lorg/koin/core/module/Module;Lorg/koin/core/instance/InstanceFactory;ILjava/lang/Object;)Lorg/koin/core/definition/KoinDefinition; + public fun equals (Ljava/lang/Object;)Z + public final fun getFactory ()Lorg/koin/core/instance/InstanceFactory; + public final fun getModule ()Lorg/koin/core/module/Module; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/error/ClosedScopeException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/DefinitionOverrideException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/DefinitionParameterException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/InstanceCreationException : java/lang/Exception { + public fun (Ljava/lang/String;Ljava/lang/Exception;)V +} + +public final class org/koin/core/error/KoinAppAlreadyStartedException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/MissingPropertyException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/NoBeanDefFoundException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/NoParameterFoundException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/NoPropertyFileFoundException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/NoScopeDefFoundException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/ScopeAlreadyCreatedException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/error/ScopeNotCreatedException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/core/extension/ExtensionManager { + public fun (Lorg/koin/core/Koin;)V + public final fun close ()V + public final fun getExtensions ()Ljava/util/HashMap; + public final fun registerExtension (Ljava/lang/String;Lorg/koin/core/extension/KoinExtension;)V +} + +public abstract interface class org/koin/core/extension/KoinExtension { + public abstract fun getKoin ()Lorg/koin/core/Koin; + public abstract fun onClose ()V + public abstract fun setKoin (Lorg/koin/core/Koin;)V +} + +public final class org/koin/core/instance/FactoryInstanceFactory : org/koin/core/instance/InstanceFactory { + public fun (Lorg/koin/core/definition/BeanDefinition;)V + public fun drop (Lorg/koin/core/scope/Scope;)V + public fun dropAll ()V + public fun get (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public fun isCreated (Lorg/koin/core/instance/InstanceContext;)Z +} + +public final class org/koin/core/instance/InstanceBuilderKt { + public static final fun newInstance (Lorg/koin/core/scope/Scope;Lkotlin/reflect/KClass;Lorg/koin/core/parameter/ParametersHolder;)Ljava/lang/Object; +} + +public final class org/koin/core/instance/InstanceContext { + public fun (Lorg/koin/core/logger/Logger;Lorg/koin/core/scope/Scope;Lorg/koin/core/parameter/ParametersHolder;)V + public synthetic fun (Lorg/koin/core/logger/Logger;Lorg/koin/core/scope/Scope;Lorg/koin/core/parameter/ParametersHolder;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getLogger ()Lorg/koin/core/logger/Logger; + public final fun getParameters ()Lorg/koin/core/parameter/ParametersHolder; + public final fun getScope ()Lorg/koin/core/scope/Scope; +} + +public abstract class org/koin/core/instance/InstanceFactory { + public static final field Companion Lorg/koin/core/instance/InstanceFactory$Companion; + public static final field ERROR_SEPARATOR Ljava/lang/String; + public fun (Lorg/koin/core/definition/BeanDefinition;)V + public fun create (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public abstract fun drop (Lorg/koin/core/scope/Scope;)V + public static synthetic fun drop$default (Lorg/koin/core/instance/InstanceFactory;Lorg/koin/core/scope/Scope;ILjava/lang/Object;)V + public abstract fun dropAll ()V + public fun equals (Ljava/lang/Object;)Z + public abstract fun get (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public final fun getBeanDefinition ()Lorg/koin/core/definition/BeanDefinition; + public fun hashCode ()I + public abstract fun isCreated (Lorg/koin/core/instance/InstanceContext;)Z + public static synthetic fun isCreated$default (Lorg/koin/core/instance/InstanceFactory;Lorg/koin/core/instance/InstanceContext;ILjava/lang/Object;)Z +} + +public final class org/koin/core/instance/InstanceFactory$Companion { +} + +public final class org/koin/core/instance/ScopedInstanceFactory : org/koin/core/instance/InstanceFactory { + public fun (Lorg/koin/core/definition/BeanDefinition;)V + public fun create (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public fun drop (Lorg/koin/core/scope/Scope;)V + public fun dropAll ()V + public fun get (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public fun isCreated (Lorg/koin/core/instance/InstanceContext;)Z + public final fun refreshInstance (Ljava/lang/String;Ljava/lang/Object;)V +} + +public final class org/koin/core/instance/SingleInstanceFactory : org/koin/core/instance/InstanceFactory { + public fun (Lorg/koin/core/definition/BeanDefinition;)V + public fun create (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public fun drop (Lorg/koin/core/scope/Scope;)V + public fun dropAll ()V + public fun get (Lorg/koin/core/instance/InstanceContext;)Ljava/lang/Object; + public fun isCreated (Lorg/koin/core/instance/InstanceContext;)Z +} + +public final class org/koin/core/logger/EmptyLogger : org/koin/core/logger/Logger { + public fun ()V + public fun display (Lorg/koin/core/logger/Level;Ljava/lang/String;)V +} + +public final class org/koin/core/logger/Level : java/lang/Enum { + public static final field DEBUG Lorg/koin/core/logger/Level; + public static final field ERROR Lorg/koin/core/logger/Level; + public static final field INFO Lorg/koin/core/logger/Level; + public static final field NONE Lorg/koin/core/logger/Level; + public static final field WARNING Lorg/koin/core/logger/Level; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lorg/koin/core/logger/Level; + public static fun values ()[Lorg/koin/core/logger/Level; +} + +public abstract class org/koin/core/logger/Logger { + public fun ()V + public fun (Lorg/koin/core/logger/Level;)V + public synthetic fun (Lorg/koin/core/logger/Level;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun debug (Ljava/lang/String;)V + public abstract fun display (Lorg/koin/core/logger/Level;Ljava/lang/String;)V + public final fun error (Ljava/lang/String;)V + public final fun getLevel ()Lorg/koin/core/logger/Level; + public final fun info (Ljava/lang/String;)V + public final fun isAt (Lorg/koin/core/logger/Level;)Z + public final fun log (Lorg/koin/core/logger/Level;Ljava/lang/String;)V + public final fun log (Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function0;)V + public final fun setLevel (Lorg/koin/core/logger/Level;)V + public final fun warn (Ljava/lang/String;)V +} + +public final class org/koin/core/logger/LoggerKt { + public static final field KOIN_TAG Ljava/lang/String; +} + +public final class org/koin/core/logger/PrintLogger : org/koin/core/logger/Logger { + public fun ()V + public fun (Lorg/koin/core/logger/Level;)V + public synthetic fun (Lorg/koin/core/logger/Level;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun display (Lorg/koin/core/logger/Level;Ljava/lang/String;)V +} + +public abstract interface annotation class org/koin/core/module/KoinApplicationDslMarker : java/lang/annotation/Annotation { +} + +public abstract interface annotation class org/koin/core/module/KoinDslMarker : java/lang/annotation/Annotation { +} + +public final class org/koin/core/module/Module { + public fun ()V + public fun (Z)V + public synthetic fun (ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getEagerInstances ()Ljava/util/HashSet; + public final fun getId ()Ljava/lang/String; + public final fun getIncludedModules ()Ljava/util/List; + public final fun getMappings ()Ljava/util/HashMap; + public final fun getScopes ()Ljava/util/HashSet; + public final fun get_createdAtStart ()Z + public fun hashCode ()I + public final fun includes (Ljava/util/List;)V + public final fun includes ([Lorg/koin/core/module/Module;)V + public final fun indexPrimaryType (Lorg/koin/core/instance/InstanceFactory;)V + public final fun indexSecondaryTypes (Lorg/koin/core/instance/InstanceFactory;)V + public final fun isLoaded ()Z + public final fun plus (Ljava/util/List;)Ljava/util/List; + public final fun plus (Lorg/koin/core/module/Module;)Ljava/util/List; + public final fun prepareForCreationAtStart (Lorg/koin/core/instance/SingleInstanceFactory;)V + public final fun saveMapping (Ljava/lang/String;Lorg/koin/core/instance/InstanceFactory;)V + public final fun scope (Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;)V +} + +public final class org/koin/core/module/ModuleKt { + public static final fun flatten (Ljava/util/List;Ljava/util/Set;)Ljava/util/Set; + public static synthetic fun flatten$default (Ljava/util/List;Ljava/util/Set;ILjava/lang/Object;)Ljava/util/Set; + public static final fun overrideError (Lorg/koin/core/instance/InstanceFactory;Ljava/lang/String;)V + public static final fun plus (Ljava/util/List;Lorg/koin/core/module/Module;)Ljava/util/List; +} + +public abstract interface annotation class org/koin/core/module/OptionDslMarker : java/lang/annotation/Annotation { +} + +public final class org/koin/core/module/dsl/OptionDSLKt { + public static final fun binds (Lorg/koin/core/definition/BeanDefinition;Ljava/util/List;)V + public static final fun createdAtStart (Lorg/koin/core/definition/BeanDefinition;)V + public static final fun named (Lorg/koin/core/definition/BeanDefinition;Ljava/lang/String;)V + public static final fun onClose (Lorg/koin/core/definition/BeanDefinition;Lkotlin/jvm/functions/Function1;)V + public static final fun onOptions (Lorg/koin/core/definition/KoinDefinition;Lkotlin/jvm/functions/Function1;)Lorg/koin/core/definition/KoinDefinition; + public static synthetic fun onOptions$default (Lorg/koin/core/definition/KoinDefinition;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/definition/KoinDefinition; + public static final fun withOptions (Lorg/koin/core/definition/KoinDefinition;Lkotlin/jvm/functions/Function1;)Lorg/koin/core/definition/KoinDefinition; +} + +public class org/koin/core/parameter/ParametersHolder { + public fun ()V + public fun (Ljava/util/List;Ljava/lang/Boolean;)V + public synthetic fun (Ljava/util/List;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun add (Ljava/lang/Object;)Lorg/koin/core/parameter/ParametersHolder; + public fun elementAt (ILkotlin/reflect/KClass;)Ljava/lang/Object; + public final fun get (I)Ljava/lang/Object; + public final fun getIndex ()I + public fun getOrNull (Lkotlin/reflect/KClass;)Ljava/lang/Object; + public final fun getUseIndexedValues ()Ljava/lang/Boolean; + public final fun getValues ()Ljava/util/List; + public final fun get_values ()Ljava/util/List; + public final fun increaseIndex ()V + public final fun insert (ILjava/lang/Object;)Lorg/koin/core/parameter/ParametersHolder; + public final fun isEmpty ()Z + public final fun isNotEmpty ()Z + public final fun set (ILjava/lang/Object;)V + public final fun setIndex (I)V + public final fun size ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/parameter/ParametersHolderKt { + public static final fun emptyParametersHolder ()Lorg/koin/core/parameter/ParametersHolder; + public static final fun parameterArrayOf ([Ljava/lang/Object;)Lorg/koin/core/parameter/ParametersHolder; + public static final fun parameterSetOf ([Ljava/lang/Object;)Lorg/koin/core/parameter/ParametersHolder; + public static final fun parametersOf ([Ljava/lang/Object;)Lorg/koin/core/parameter/ParametersHolder; +} + +public abstract interface class org/koin/core/qualifier/Qualifier { + public abstract fun getValue ()Ljava/lang/String; +} + +public final class org/koin/core/qualifier/QualifierKt { + public static final fun _q (Ljava/lang/String;)Lorg/koin/core/qualifier/StringQualifier; + public static final fun getQualifier (Ljava/lang/Enum;)Lorg/koin/core/qualifier/Qualifier; + public static final fun named (Ljava/lang/Enum;)Lorg/koin/core/qualifier/Qualifier; + public static final fun named (Ljava/lang/String;)Lorg/koin/core/qualifier/StringQualifier; + public static final fun qualifier (Ljava/lang/Enum;)Lorg/koin/core/qualifier/Qualifier; + public static final fun qualifier (Ljava/lang/String;)Lorg/koin/core/qualifier/StringQualifier; +} + +public final class org/koin/core/qualifier/StringQualifier : org/koin/core/qualifier/Qualifier { + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lorg/koin/core/qualifier/StringQualifier; + public static synthetic fun copy$default (Lorg/koin/core/qualifier/StringQualifier;Ljava/lang/String;ILjava/lang/Object;)Lorg/koin/core/qualifier/StringQualifier; + public fun equals (Ljava/lang/Object;)Z + public fun getValue ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/qualifier/TypeQualifier : org/koin/core/qualifier/Qualifier { + public fun (Lkotlin/reflect/KClass;)V + public fun equals (Ljava/lang/Object;)Z + public final fun getType ()Lkotlin/reflect/KClass; + public fun getValue ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/core/registry/InstanceRegistry { + public fun (Lorg/koin/core/Koin;)V + public final fun getInstances ()Ljava/util/Map; + public final fun get_koin ()Lorg/koin/core/Koin; + public final fun saveMapping (ZLjava/lang/String;Lorg/koin/core/instance/InstanceFactory;Z)V + public static synthetic fun saveMapping$default (Lorg/koin/core/registry/InstanceRegistry;ZLjava/lang/String;Lorg/koin/core/instance/InstanceFactory;ZILjava/lang/Object;)V + public final fun size ()I +} + +public final class org/koin/core/registry/PropertyRegistry { + public fun (Lorg/koin/core/Koin;)V + public final fun close ()V + public final fun deleteProperty (Ljava/lang/String;)V + public final fun getProperty (Ljava/lang/String;)Ljava/lang/Object; + public final fun saveProperties (Ljava/util/Map;)V +} + +public final class org/koin/core/registry/PropertyRegistryExtKt { + public static final fun loadEnvironmentProperties (Lorg/koin/core/registry/PropertyRegistry;)V + public static final fun loadPropertiesFromFile (Lorg/koin/core/registry/PropertyRegistry;Ljava/lang/String;)V + public static final fun saveProperties (Lorg/koin/core/registry/PropertyRegistry;Ljava/util/Properties;)V +} + +public final class org/koin/core/registry/ScopeRegistry { + public static final field Companion Lorg/koin/core/registry/ScopeRegistry$Companion; + public fun (Lorg/koin/core/Koin;)V + public final fun createScope (Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;)Lorg/koin/core/scope/Scope; + public static synthetic fun createScope$default (Lorg/koin/core/registry/ScopeRegistry;Ljava/lang/String;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/Object;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public final fun getRootScope ()Lorg/koin/core/scope/Scope; + public final fun getScopeDefinitions ()Ljava/util/Set; + public final fun getScopeOrNull (Ljava/lang/String;)Lorg/koin/core/scope/Scope; + public final fun loadScopes (Ljava/util/Set;)V +} + +public final class org/koin/core/registry/ScopeRegistry$Companion { + public final fun getRootScopeQualifier ()Lorg/koin/core/qualifier/StringQualifier; +} + +public final class org/koin/core/scope/Scope { + public fun (Lorg/koin/core/qualifier/Qualifier;Ljava/lang/String;ZLorg/koin/core/Koin;)V + public synthetic fun (Lorg/koin/core/qualifier/Qualifier;Ljava/lang/String;ZLorg/koin/core/Koin;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun close ()V + public final fun component1 ()Lorg/koin/core/qualifier/Qualifier; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Z + public final fun copy (Lorg/koin/core/qualifier/Qualifier;Ljava/lang/String;ZLorg/koin/core/Koin;)Lorg/koin/core/scope/Scope; + public static synthetic fun copy$default (Lorg/koin/core/scope/Scope;Lorg/koin/core/qualifier/Qualifier;Ljava/lang/String;ZLorg/koin/core/Koin;ILjava/lang/Object;)Lorg/koin/core/scope/Scope; + public fun equals (Ljava/lang/Object;)Z + public final fun get (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun get$default (Lorg/koin/core/scope/Scope;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public final fun getAll (Lkotlin/reflect/KClass;)Ljava/util/List; + public final fun getClosed ()Z + public final fun getId ()Ljava/lang/String; + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun getLogger ()Lorg/koin/core/logger/Logger; + public final fun getOrNull (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun getOrNull$default (Lorg/koin/core/scope/Scope;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public final fun getProperty (Ljava/lang/String;)Ljava/lang/Object; + public final fun getProperty (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; + public final fun getPropertyOrNull (Ljava/lang/String;)Ljava/lang/Object; + public final fun getScope (Ljava/lang/String;)Lorg/koin/core/scope/Scope; + public final fun getScopeQualifier ()Lorg/koin/core/qualifier/Qualifier; + public final fun get_koin ()Lorg/koin/core/Koin; + public final fun get_parameterStack ()Lkotlin/collections/ArrayDeque; + public final fun get_source ()Ljava/lang/Object; + public fun hashCode ()I + public final fun isNotClosed ()Z + public final fun isRoot ()Z + public final fun linkTo ([Lorg/koin/core/scope/Scope;)V + public final fun registerCallback (Lorg/koin/core/scope/ScopeCallback;)V + public final fun set_source (Ljava/lang/Object;)V + public fun toString ()Ljava/lang/String; + public final fun unlink ([Lorg/koin/core/scope/Scope;)V +} + +public abstract interface class org/koin/core/scope/ScopeCallback { + public abstract fun onScopeClose (Lorg/koin/core/scope/Scope;)V +} + +public final class org/koin/core/scope/ScopeJVMKt { + public static final fun get (Lorg/koin/core/scope/Scope;Ljava/lang/Class;)Ljava/lang/Object; + public static final fun get (Lorg/koin/core/scope/Scope;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Ljava/lang/Object; + public static final fun get (Lorg/koin/core/scope/Scope;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun get$default (Lorg/koin/core/scope/Scope;Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; +} + +public final class org/koin/core/time/MeasureKt { + public static final fun measureDuration (Lkotlin/jvm/functions/Function0;)D + public static final fun measureDurationForResult (Lkotlin/jvm/functions/Function0;)Lkotlin/Pair; + public static final fun measureTimedValue (Lkotlin/jvm/functions/Function0;)Lkotlin/Pair; +} + +public final class org/koin/core/time/Timer { + public static final field Companion Lorg/koin/core/time/Timer$Companion; + public static final field NANO_TO_MILLI D + public fun ()V + public final fun getEnd-UwyO8pc ()J + public final fun getStart-UwyO8pc ()J + public final fun getTimeInMillis ()D + public final fun getTimeInNanos ()D + public final fun getTimeInSeconds ()D + public final fun stop ()V +} + +public final class org/koin/core/time/Timer$Companion { + public final fun start ()Lorg/koin/core/time/Timer; +} + +public final class org/koin/dsl/DefinitionBindingKt { + public static final fun bind (Lorg/koin/core/definition/KoinDefinition;Lkotlin/reflect/KClass;)Lorg/koin/core/definition/KoinDefinition; + public static final fun binds (Lorg/koin/core/definition/KoinDefinition;[Lkotlin/reflect/KClass;)Lorg/koin/core/definition/KoinDefinition; + public static final fun onClose (Lorg/koin/core/definition/KoinDefinition;Lkotlin/jvm/functions/Function1;)Lorg/koin/core/definition/KoinDefinition; +} + +public final class org/koin/dsl/KoinApplicationKt { + public static final fun koinApplication (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; + public static synthetic fun koinApplication$default (Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; +} + +public final class org/koin/dsl/ModuleDSLKt { + public static final fun module (ZLkotlin/jvm/functions/Function1;)Lorg/koin/core/module/Module; + public static final fun module (ZZLkotlin/jvm/functions/Function1;)Lorg/koin/core/module/Module; + public static synthetic fun module$default (ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/module/Module; + public static synthetic fun module$default (ZZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/module/Module; +} + +public final class org/koin/dsl/ScopeDSL { + public fun (Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/module/Module;)V + public final fun getModule ()Lorg/koin/core/module/Module; + public final fun getScopeQualifier ()Lorg/koin/core/qualifier/Qualifier; +} + +public final class org/koin/ext/KClassExtKt { + public static final fun getFullName (Lkotlin/reflect/KClass;)Ljava/lang/String; + public static final fun saveCache (Lkotlin/reflect/KClass;)Ljava/lang/String; +} + +public final class org/koin/ext/StringExtKt { + public static final fun clearQuotes (Ljava/lang/String;)Ljava/lang/String; +} + +public final class org/koin/java/KoinJavaComponent { + public static final field INSTANCE Lorg/koin/java/KoinJavaComponent; + public static final fun get (Ljava/lang/Class;)Ljava/lang/Object; + public static final fun get (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Ljava/lang/Object; + public static final fun get (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun get$default (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun getKoin ()Lorg/koin/core/Koin; + public static final fun getOrNull (Ljava/lang/Class;)Ljava/lang/Object; + public static final fun getOrNull (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Ljava/lang/Object; + public static final fun getOrNull (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; + public static synthetic fun getOrNull$default (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun inject (Ljava/lang/Class;)Lkotlin/Lazy; + public static final fun inject (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Lkotlin/Lazy; + public static final fun inject (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun inject$default (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; + public static final fun injectOrNull (Ljava/lang/Class;)Lkotlin/Lazy; + public static final fun injectOrNull (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;)Lkotlin/Lazy; + public static final fun injectOrNull (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;)Lkotlin/Lazy; + public static synthetic fun injectOrNull$default (Ljava/lang/Class;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lkotlin/Lazy; +} + +public final class org/koin/mp/KoinPlatform { + public static final field INSTANCE Lorg/koin/mp/KoinPlatform; + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun startKoin (Ljava/util/List;Lorg/koin/core/logger/Level;)V + public final fun stopKoin ()V +} + +public final class org/koin/mp/KoinPlatformTimeTools { + public static final field INSTANCE Lorg/koin/mp/KoinPlatformTimeTools; + public final fun getTimeInNanoSeconds ()J +} + +public final class org/koin/mp/KoinPlatformTools { + public static final field INSTANCE Lorg/koin/mp/KoinPlatformTools; + public final fun defaultContext ()Lorg/koin/core/context/KoinContext; + public final fun defaultLazyMode ()Lkotlin/LazyThreadSafetyMode; + public final fun defaultLogger (Lorg/koin/core/logger/Level;)Lorg/koin/core/logger/Logger; + public static synthetic fun defaultLogger$default (Lorg/koin/mp/KoinPlatformTools;Lorg/koin/core/logger/Level;ILjava/lang/Object;)Lorg/koin/core/logger/Logger; + public final fun generateId ()Ljava/lang/String; + public final fun getClassName (Lkotlin/reflect/KClass;)Ljava/lang/String; + public final fun getStackTrace (Ljava/lang/Exception;)Ljava/lang/String; + public final fun safeHashMap ()Ljava/util/Map; + public final fun synchronized (Ljava/lang/Object;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object; +} + diff --git a/core/koin-test-junit4/api/koin-test-junit4.api b/core/koin-test-junit4/api/koin-test-junit4.api new file mode 100644 index 000000000..5975a5866 --- /dev/null +++ b/core/koin-test-junit4/api/koin-test-junit4.api @@ -0,0 +1,36 @@ +public abstract class org/koin/test/AutoCloseKoinTest : org/koin/test/KoinTest { + public fun ()V + public final fun autoClose ()V + public fun getKoin ()Lorg/koin/core/Koin; +} + +public abstract interface class org/koin/test/ClosingKoinTest : org/koin/test/KoinTest { + public abstract fun autoClose ()V +} + +public final class org/koin/test/ClosingKoinTest$DefaultImpls { + public static fun autoClose (Lorg/koin/test/ClosingKoinTest;)V + public static fun getKoin (Lorg/koin/test/ClosingKoinTest;)Lorg/koin/core/Koin; +} + +public final class org/koin/test/KoinTestRule : org/junit/rules/TestWatcher { + public static final field Companion Lorg/koin/test/KoinTestRule$Companion; + public synthetic fun (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getKoin ()Lorg/koin/core/Koin; +} + +public final class org/koin/test/KoinTestRule$Companion { + public final fun create (Lkotlin/jvm/functions/Function1;)Lorg/koin/test/KoinTestRule; + public static synthetic fun create$default (Lorg/koin/test/KoinTestRule$Companion;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/test/KoinTestRule; +} + +public final class org/koin/test/mock/MockProviderRule : org/junit/rules/TestRule { + public static final field Companion Lorg/koin/test/mock/MockProviderRule$Companion; + public synthetic fun (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun apply (Lorg/junit/runners/model/Statement;Lorg/junit/runner/Description;)Lorg/junit/runners/model/Statement; +} + +public final class org/koin/test/mock/MockProviderRule$Companion { + public final fun create (Lkotlin/jvm/functions/Function1;)Lorg/koin/test/mock/MockProviderRule; +} + diff --git a/core/koin-test-junit5/api/koin-test-junit5.api b/core/koin-test-junit5/api/koin-test-junit5.api new file mode 100644 index 000000000..2ce244b9f --- /dev/null +++ b/core/koin-test-junit5/api/koin-test-junit5.api @@ -0,0 +1,38 @@ +public abstract class org/koin/test/junit5/AutoCloseKoinTest : org/koin/test/KoinTest { + public fun ()V + public final fun autoClose ()V + public fun getKoin ()Lorg/koin/core/Koin; +} + +public abstract interface class org/koin/test/junit5/ClosingKoinTest : org/koin/test/KoinTest { + public abstract fun autoClose ()V +} + +public final class org/koin/test/junit5/ClosingKoinTest$DefaultImpls { + public static fun autoClose (Lorg/koin/test/junit5/ClosingKoinTest;)V + public static fun getKoin (Lorg/koin/test/junit5/ClosingKoinTest;)Lorg/koin/core/Koin; +} + +public final class org/koin/test/junit5/KoinTestExtension : org/junit/jupiter/api/extension/AfterEachCallback, org/junit/jupiter/api/extension/BeforeEachCallback, org/junit/jupiter/api/extension/ParameterResolver { + public static final field Companion Lorg/koin/test/junit5/KoinTestExtension$Companion; + public synthetic fun (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun afterEach (Lorg/junit/jupiter/api/extension/ExtensionContext;)V + public fun beforeEach (Lorg/junit/jupiter/api/extension/ExtensionContext;)V + public fun resolveParameter (Lorg/junit/jupiter/api/extension/ParameterContext;Lorg/junit/jupiter/api/extension/ExtensionContext;)Ljava/lang/Object; + public fun supportsParameter (Lorg/junit/jupiter/api/extension/ParameterContext;Lorg/junit/jupiter/api/extension/ExtensionContext;)Z +} + +public final class org/koin/test/junit5/KoinTestExtension$Companion { + public final fun create (Lkotlin/jvm/functions/Function1;)Lorg/koin/test/junit5/KoinTestExtension; +} + +public final class org/koin/test/junit5/mock/MockProviderExtension : org/junit/jupiter/api/extension/BeforeEachCallback { + public static final field Companion Lorg/koin/test/junit5/mock/MockProviderExtension$Companion; + public synthetic fun (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun beforeEach (Lorg/junit/jupiter/api/extension/ExtensionContext;)V +} + +public final class org/koin/test/junit5/mock/MockProviderExtension$Companion { + public final fun create (Lkotlin/jvm/functions/Function1;)Lorg/koin/test/junit5/mock/MockProviderExtension; +} + diff --git a/core/koin-test/api/koin-test.api b/core/koin-test/api/koin-test.api new file mode 100644 index 000000000..1ba457851 --- /dev/null +++ b/core/koin-test/api/koin-test.api @@ -0,0 +1,130 @@ +public abstract interface class org/koin/test/KoinTest : org/koin/core/component/KoinComponent { +} + +public final class org/koin/test/KoinTest$DefaultImpls { + public static fun getKoin (Lorg/koin/test/KoinTest;)Lorg/koin/core/Koin; +} + +public final class org/koin/test/Simple { + public fun ()V +} + +public final class org/koin/test/Simple$ComponentA { + public fun ()V +} + +public final class org/koin/test/Simple$ComponentB { + public fun (Lorg/koin/test/Simple$ComponentA;)V + public final fun getA ()Lorg/koin/test/Simple$ComponentA; +} + +public final class org/koin/test/Simple$ComponentC { + public fun (Lorg/koin/test/Simple$ComponentB;)V + public final fun getB ()Lorg/koin/test/Simple$ComponentB; +} + +public final class org/koin/test/Simple$MyString { + public fun (Ljava/lang/String;)V + public final fun getS ()Ljava/lang/String; +} + +public final class org/koin/test/Simple$UUIDComponent { + public fun ()V + public final fun getUUID ()Ljava/lang/String; +} + +public final class org/koin/test/UpperCase : org/koin/core/qualifier/Qualifier { + public static final field INSTANCE Lorg/koin/test/UpperCase; + public fun getValue ()Ljava/lang/String; +} + +public abstract interface class org/koin/test/category/CheckModuleTest { +} + +public final class org/koin/test/check/CheckModulesKt { + public static final fun checkKoinModules (Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public static final fun checkKoinModules (Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public static final fun checkKoinModules ([Lorg/koin/core/module/Module;Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun checkKoinModules$default (Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun checkKoinModules$default (Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun checkKoinModules$default ([Lorg/koin/core/module/Module;Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun checkModules (Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function1;)V + public static final fun checkModules (Lorg/koin/core/KoinApplication;Lkotlin/jvm/functions/Function1;)V + public static final fun checkModules (Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun checkModules$default (Lorg/koin/core/Koin;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun checkModules$default (Lorg/koin/core/KoinApplication;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun checkModules$default (Lorg/koin/core/logger/Level;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V +} + +public final class org/koin/test/check/CheckedComponent { + public fun (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;)V + public synthetic fun (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lorg/koin/core/qualifier/Qualifier; + public final fun component2 ()Lkotlin/reflect/KClass; + public final fun copy (Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;)Lorg/koin/test/check/CheckedComponent; + public static synthetic fun copy$default (Lorg/koin/test/check/CheckedComponent;Lorg/koin/core/qualifier/Qualifier;Lkotlin/reflect/KClass;ILjava/lang/Object;)Lorg/koin/test/check/CheckedComponent; + public fun equals (Ljava/lang/Object;)Z + public final fun getQualifier ()Lorg/koin/core/qualifier/Qualifier; + public final fun getType ()Lkotlin/reflect/KClass; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class org/koin/test/check/ParametersBinding { + public fun (Lorg/koin/core/Koin;)V + public final fun create (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1; + public static synthetic fun create$default (Lorg/koin/test/check/ParametersBinding;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/jvm/functions/Function1; + public final fun getDefaultValues ()Ljava/util/Map; + public final fun getKoin ()Lorg/koin/core/Koin; + public final fun getParametersCreators ()Ljava/util/Map; + public final fun getScopeLinks ()Ljava/util/Map; + public final fun withParameter (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1; + public static synthetic fun withParameter$default (Lorg/koin/test/check/ParametersBinding;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/jvm/functions/Function1; + public final fun withParameters (Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1; + public static synthetic fun withParameters$default (Lorg/koin/test/check/ParametersBinding;Lkotlin/reflect/KClass;Lorg/koin/core/qualifier/Qualifier;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlin/jvm/functions/Function1; + public final fun withProperty (Ljava/lang/String;Ljava/lang/Object;)V + public final fun withScopeLink (Lorg/koin/core/qualifier/Qualifier;Lorg/koin/core/qualifier/Qualifier;)Lorg/koin/core/qualifier/Qualifier; +} + +public final class org/koin/test/mock/MockProvider { + public static final field INSTANCE Lorg/koin/test/mock/MockProvider; + public final fun getProvider ()Lkotlin/jvm/functions/Function1; + public final fun makeMock (Lkotlin/reflect/KClass;)Ljava/lang/Object; + public final fun register (Lkotlin/jvm/functions/Function1;)V +} + +public final class org/koin/test/parameter/MockParameter : org/koin/core/parameter/ParametersHolder { + public fun (Lorg/koin/core/scope/Scope;Ljava/util/Map;)V + public fun elementAt (ILkotlin/reflect/KClass;)Ljava/lang/Object; + public fun getOrNull (Lkotlin/reflect/KClass;)Ljava/lang/Object; +} + +public final class org/koin/test/verify/CircularInjectionException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/test/verify/MissingKoinDefinitionException : java/lang/Exception { + public fun (Ljava/lang/String;)V +} + +public final class org/koin/test/verify/Verification { + public fun (Lorg/koin/core/module/Module;Ljava/util/List;)V + public final fun getModule ()Lorg/koin/core/module/Module; + public final fun verify ()V +} + +public final class org/koin/test/verify/Verify { + public static final field INSTANCE Lorg/koin/test/verify/Verify; + public final fun addExtraTypes (Ljava/util/List;)V + public final fun addExtraTypes ([Lkotlin/reflect/KClass;)V + public final fun verify (Lorg/koin/core/module/Module;Ljava/util/List;)V + public static synthetic fun verify$default (Lorg/koin/test/verify/Verify;Lorg/koin/core/module/Module;Ljava/util/List;ILjava/lang/Object;)V +} + +public final class org/koin/test/verify/VerifyModuleKt { + public static final fun verify (Lorg/koin/core/module/Module;Ljava/util/List;)V + public static synthetic fun verify$default (Lorg/koin/core/module/Module;Ljava/util/List;ILjava/lang/Object;)V + public static final fun verifyAll (Ljava/util/List;Ljava/util/List;)V + public static synthetic fun verifyAll$default (Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)V +} + diff --git a/ktor/build.gradle b/ktor/build.gradle index 02bc05a31..e79c0cf33 100644 --- a/ktor/build.gradle +++ b/ktor/build.gradle @@ -15,6 +15,10 @@ buildscript { } } +plugins { + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' +} + wrapper { distributionType = Wrapper.DistributionType.ALL } diff --git a/ktor/examples/hello-ktor/api/hello-ktor.api b/ktor/examples/hello-ktor/api/hello-ktor.api new file mode 100644 index 000000000..a1a2796f0 --- /dev/null +++ b/ktor/examples/hello-ktor/api/hello-ktor.api @@ -0,0 +1,34 @@ +public final class org/koin/sample/AppModule2Kt { + public static final fun module2 (Lio/ktor/server/application/Application;)V +} + +public final class org/koin/sample/ApplicationKt { + public static final fun main ([Ljava/lang/String;)V + public static final fun mainModule (Lio/ktor/server/application/Application;)V +} + +public final class org/koin/sample/HelloRepository { + public fun ()V + public final fun getHello ()Ljava/lang/String; +} + +public abstract interface class org/koin/sample/HelloService { + public abstract fun sayHello ()Ljava/lang/String; +} + +public final class org/koin/sample/HelloService2 : org/koin/sample/HelloService { + public fun ()V + public fun sayHello ()Ljava/lang/String; +} + +public final class org/koin/sample/HelloServiceImpl : org/koin/sample/HelloService { + public fun (Lorg/koin/sample/HelloRepository;)V + public final fun getHelloRepository ()Lorg/koin/sample/HelloRepository; + public fun sayHello ()Ljava/lang/String; +} + +public final class org/koin/sample/KoinAppModuleKt { + public static final fun getAppModule ()Lorg/koin/core/module/Module; + public static final fun getAppModule2 ()Lorg/koin/core/module/Module; +} + diff --git a/ktor/koin-ktor/api/koin-ktor.api b/ktor/koin-ktor/api/koin-ktor.api new file mode 100644 index 000000000..89d790fa8 --- /dev/null +++ b/ktor/koin-ktor/api/koin-ktor.api @@ -0,0 +1,34 @@ +public final class org/koin/ktor/ext/ApplicationCallExtKt { + public static final fun getKoin (Lio/ktor/server/application/ApplicationCall;)Lorg/koin/core/Koin; + public static final fun getProperty (Lio/ktor/server/application/ApplicationCall;Ljava/lang/String;)Ljava/lang/Object; + public static final fun getProperty (Lio/ktor/server/application/ApplicationCall;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +} + +public final class org/koin/ktor/ext/ApplicationExtKt { + public static final fun getKoin (Lio/ktor/server/application/Application;)Lorg/koin/core/Koin; + public static final fun getProperty (Lio/ktor/server/application/Application;Ljava/lang/String;)Ljava/lang/Object; + public static final fun getProperty (Lio/ktor/server/application/Application;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +} + +public final class org/koin/ktor/ext/RouteExtKt { + public static final fun getKoin (Lio/ktor/server/routing/Route;)Lorg/koin/core/Koin; + public static final fun getProperty (Lio/ktor/server/routing/Route;Ljava/lang/String;)Ljava/lang/Object; + public static final fun getProperty (Lio/ktor/server/routing/Route;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +} + +public final class org/koin/ktor/ext/RoutingExtKt { + public static final fun getKoin (Lio/ktor/server/routing/Routing;)Lorg/koin/core/Koin; + public static final fun getProperty (Lio/ktor/server/routing/Routing;Ljava/lang/String;)Ljava/lang/Object; +} + +public final class org/koin/ktor/plugin/KoinApplicationEventsKt { + public static final fun getKoinApplicationStarted ()Lio/ktor/events/EventDefinition; + public static final fun getKoinApplicationStopPreparing ()Lio/ktor/events/EventDefinition; + public static final fun getKoinApplicationStopped ()Lio/ktor/events/EventDefinition; +} + +public final class org/koin/ktor/plugin/KoinPluginKt { + public static final fun getKoin ()Lio/ktor/server/application/ApplicationPlugin; + public static final fun koin (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; +} + diff --git a/ktor/koin-logger-slf4j/api/koin-logger-slf4j.api b/ktor/koin-logger-slf4j/api/koin-logger-slf4j.api new file mode 100644 index 000000000..9b9403d7c --- /dev/null +++ b/ktor/koin-logger-slf4j/api/koin-logger-slf4j.api @@ -0,0 +1,12 @@ +public final class org/koin/logger/KoinApplicationExtKt { + public static final fun slf4jLogger (Lorg/koin/core/KoinApplication;Lorg/koin/core/logger/Level;)V + public static synthetic fun slf4jLogger$default (Lorg/koin/core/KoinApplication;Lorg/koin/core/logger/Level;ILjava/lang/Object;)V +} + +public final class org/koin/logger/SLF4JLogger : org/koin/core/logger/Logger { + public fun ()V + public fun (Lorg/koin/core/logger/Level;)V + public synthetic fun (Lorg/koin/core/logger/Level;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun display (Lorg/koin/core/logger/Level;Ljava/lang/String;)V +} + From 35f79279b9f622288058b50e5361533aeeade6cd Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Tue, 29 Aug 2023 18:05:11 +0200 Subject: [PATCH 18/55] ktlint format --- .../org/koin/core/KoinApplicationLazyExt.kt | 1 - .../kotlin/org/koin/core/KoinLazyExt.kt | 8 +- .../org/koin/core/context/LoadLazyModules.kt | 2 +- .../core/coroutine/KoinCoroutinesEngine.kt | 6 +- .../core/extension/KoinCoroutinesExtension.kt | 2 +- .../org/koin/core/module/LazyModuleExt.kt | 1 - .../kotlin/org/koin/dsl/LazyModuleDSL.kt | 2 +- .../koin/mp/KoinPlatformCoroutinesTools.kt | 4 +- .../KoinPlatformCoroutinesTools.kt | 4 +- .../kotlin/org/koin/core/KoinWaitExt.kt | 8 +- .../org/koin/core/context/ContextWaitJVM.kt | 3 +- .../koin/mp/KoinPlatformCoroutinesTools.kt | 4 +- .../kotlin/org/koin/test/ExtensionTest.kt | 2 +- .../kotlin/org/koin/test/LazyModuleTest.kt | 2 +- .../jvmTest/kotlin/org/koin/test/PerfsTest.kt | 12 +- .../jvmTest/kotlin/org/koin/test/classes.kt | 2 +- .../kotlin/org/koin/test/module_400.kt | 1 - .../koin/mp/KoinPlatformCoroutinesTools.kt | 4 +- .../commonMain/kotlin/org/koin/core/Koin.kt | 15 +-- .../kotlin/org/koin/core/KoinApplication.kt | 2 +- .../koin/core/annotation/KoinAnnotations.kt | 10 +- .../org/koin/core/component/KoinComponent.kt | 9 +- .../koin/core/component/KoinScopeComponent.kt | 2 +- .../koin/core/context/DefaultContextExt.kt | 2 +- .../org/koin/core/context/KoinContext.kt | 2 +- .../koin/core/definition/BeanDefinition.kt | 14 +- .../org/koin/core/definition/Callbacks.kt | 2 +- .../koin/core/definition/KoinDefinition.kt | 2 +- .../ApplicationAlreadyStartedException.kt | 2 +- .../koin/core/error/ClosedScopeException.kt | 2 +- .../core/error/DefinitionOverrideException.kt | 2 +- .../error/DefinitionParameterException.kt | 2 +- .../error/KoinAppAlreadyStartedException.kt | 2 +- .../core/error/NoDefinitionFoundException.kt | 2 +- .../error/NoPropertyFileFoundException.kt | 2 +- .../core/error/ScopeNotCreatedException.kt | 2 +- .../koin/core/extension/ExtensionManager.kt | 8 +- .../org/koin/core/extension/KoinExtension.kt | 4 +- .../core/instance/FactoryInstanceFactory.kt | 4 +- .../org/koin/core/instance/InstanceContext.kt | 3 +- .../org/koin/core/instance/InstanceFactory.kt | 7 +- .../core/instance/ScopedInstanceFactory.kt | 13 +- .../core/instance/SingleInstanceFactory.kt | 10 +- .../org/koin/core/logger/EmptyLogger.kt | 2 +- .../kotlin/org/koin/core/logger/Logger.kt | 10 +- .../kotlin/org/koin/core/module/Module.kt | 19 ++- .../org/koin/core/module/dsl/FactoryOf.kt | 2 - .../kotlin/org/koin/core/module/dsl/New.kt | 22 +-- .../org/koin/core/module/dsl/OptionDSL.kt | 4 +- .../koin/core/module/dsl/ScopedFactoryOf.kt | 1 - .../org/koin/core/module/dsl/ScopedOf.kt | 1 + .../org/koin/core/module/dsl/SingleOf.kt | 1 - .../koin/core/parameter/ParametersHolder.kt | 23 ++-- .../org/koin/core/qualifier/Qualifier.kt | 5 +- .../koin/core/qualifier/StringQualifier.kt | 2 +- .../org/koin/core/qualifier/TypeQualifier.kt | 2 +- .../koin/core/registry/InstanceRegistry.kt | 19 ++- .../koin/core/registry/PropertyRegistry.kt | 3 +- .../org/koin/core/registry/ScopeRegistry.kt | 9 +- .../kotlin/org/koin/core/scope/Scope.kt | 94 ++++++------- .../kotlin/org/koin/core/time/Measure.kt | 3 +- .../kotlin/org/koin/core/time/Timer.kt | 14 +- .../kotlin/org/koin/dsl/DefinitionBinding.kt | 2 +- .../kotlin/org/koin/dsl/KoinApplication.kt | 2 +- .../kotlin/org/koin/dsl/ModuleDSL.kt | 2 +- .../kotlin/org/koin/dsl/ScopeDSL.kt | 6 +- .../kotlin/org/koin/ext/InjectProperty.kt | 2 +- .../kotlin/org/koin/ext/KClassExt.kt | 2 +- .../kotlin/org/koin/mp/KoinPlatform.kt | 6 +- .../org/koin/mp/KoinPlatformTimeTools.kt | 4 +- .../kotlin/org/koin/mp/KoinPlatformTools.kt | 2 +- .../commonTest/kotlin/org/koin/Components.kt | 10 +- .../kotlin/org/koin/KoinCoreTest.kt | 3 +- .../kotlin/org/koin/core/AttributesTest.kt | 12 +- .../kotlin/org/koin/core/CascadeParamTest.kt | 48 ++++--- .../kotlin/org/koin/core/ClosedScopeAPI.kt | 125 +++++++++--------- .../kotlin/org/koin/core/CoroutinesTest.kt | 20 +-- .../org/koin/core/DeclareInstanceTest.kt | 104 ++++++++------- .../org/koin/core/DefinitionOverrideTest.kt | 40 +++--- .../org/koin/core/DynamicModulesTest.kt | 12 +- .../kotlin/org/koin/core/ErrorCheckTest.kt | 18 ++- .../org/koin/core/GenericDeclarationTest.kt | 4 +- .../kotlin/org/koin/core/GlobalToScopeTest.kt | 37 +++--- .../org/koin/core/InstanceReleaseTest.kt | 6 +- .../org/koin/core/InstanceResolutionTest.kt | 95 +++++++------ .../koin/core/KoinApplicationIsolationTest.kt | 49 ++++--- .../org/koin/core/LazyInstanceResolution.kt | 68 ++++++---- .../core/MultipleModuleDeclarationTest.kt | 42 +++--- .../kotlin/org/koin/core/MultithreadTest.kt | 20 +-- .../kotlin/org/koin/core/ObjectScopeTest.kt | 122 +++++++++-------- .../koin/core/OpenCloseScopeInstanceTest.kt | 48 +++---- .../koin/core/OverrideAndCreateatStartTest.kt | 8 +- .../org/koin/core/ParameterStackTest.kt | 8 +- .../org/koin/core/ParametersHolderTest.kt | 2 +- .../org/koin/core/ParametersInjectionTest.kt | 117 +++++++++------- .../kotlin/org/koin/core/ScopeAPITest.kt | 10 +- .../org/koin/core/ScopeShadowingTest.kt | 18 ++- .../kotlin/org/koin/core/ScopeTest.kt | 61 ++++----- .../kotlin/org/koin/core/SetterInjectTest.kt | 17 ++- .../org/koin/dsl/AdditionalTypeBindingTest.kt | 86 ++++++------ .../org/koin/dsl/CloseDefinitionTest.kt | 11 +- .../kotlin/org/koin/dsl/ConstructorDSLTest.kt | 24 ++-- .../kotlin/org/koin/dsl/CreateOnStart.kt | 56 ++++---- .../dsl/EnvironmentPropertyDefinitionTest.kt | 12 +- .../koin/dsl/FilePropertyDefinitionTest.kt | 14 +- .../kotlin/org/koin/dsl/FlattenTest.kt | 39 +++--- .../org/koin/dsl/KoinAppCreationTest.kt | 2 +- .../org/koin/dsl/ModuleAndPropertiesTest.kt | 24 ++-- .../kotlin/org/koin/dsl/ModuleCreationTest.kt | 90 +++++++------ .../koin/dsl/ModuleDeclarationRulesTest.kt | 51 ++++--- .../kotlin/org/koin/dsl/ModuleIncludeTest.kt | 14 +- .../kotlin/org/koin/dsl/ModuleRestartTest.kt | 10 +- .../org/koin/dsl/ModuleSpecialRulesTest.kt | 24 ++-- .../kotlin/org/koin/dsl/NamingTest.kt | 66 ++++----- .../kotlin/org/koin/dsl/NewDSLTest.kt | 41 +++--- .../org/koin/dsl/PropertyDefinitionTest.kt | 2 +- .../kotlin/org/koin/full/TODOAppTest.kt | 10 +- .../kotlin/org/koin/koincomponent/AppTest.kt | 11 +- .../koincomponent/CustomKoinComponentTest.kt | 10 +- .../koin/koincomponent/KoinComponentTest.kt | 8 +- .../org/koin/koincomponent/TODOAppTest.kt | 6 +- .../kotlin/org/koin/perfs/PerfsTest.kt | 22 +-- .../kotlin/org/koin/perfs/classes.kt | 2 +- .../kotlin/org/koin/perfs/module_400.kt | 2 +- .../kotlin/org/koin/test/Asserts.kt | 2 +- .../org/koin/test/KoinApplicationExt.kt | 2 +- .../org/koin/mp/native/MainThreadSafety.kt | 6 +- .../org/koin/core/context/GlobalContext.kt | 1 - .../kotlin/org/koin/core/time/TimeSource.kt | 6 +- .../kotlin/org/koin/mp/PlatformTimeTools.kt | 2 +- .../kotlin/org/koin/mp/PlatformTools.kt | 11 +- .../kotlin/org/koin/KoinApplicationExt.kt | 1 - .../org/koin/core/context/GlobalContext.kt | 3 - .../org/koin/core/instance/InstanceBuilder.kt | 7 +- .../koin/core/registry/PropertyRegistryExt.kt | 7 +- .../kotlin/org/koin/core/scope/ScopeJVM.kt | 4 +- .../jvmMain/kotlin/org/koin/dsl/ModuleExt.kt | 5 +- .../kotlin/org/koin/dsl/ScopeSetExt.kt | 6 +- .../kotlin/org/koin/java/KoinJavaComponent.kt | 14 +- .../org/koin/mp/KoinPlatformTimeTools.kt | 4 +- .../kotlin/org/koin/mp/KoinPlatformTools.kt | 2 +- .../kotlin/org/koin/core/DebugLogTest.kt | 12 +- .../org/koin/core/DeclareInstanceJVMTest.kt | 2 +- .../kotlin/org/koin/core/StringTest.kt | 4 +- .../kotlin/org/koin/core/instance/Classes.kt | 2 +- .../org/koin/core/instance/CreateAPITest.kt | 76 ++++++----- .../org/koin/core/instance/ReflectAPITest.kt | 4 +- .../instance/ScopedMVPArchitectureTest.kt | 4 +- .../org/koin/java/KoinJavaComponentTest.kt | 20 +-- .../kotlin/org/koin/java/UnitJavaStuff.kt | 2 +- .../org/koin/core/context/GlobalContext.kt | 3 +- .../kotlin/org/koin/core/module/ModuleExt.kt | 10 +- .../org/koin/mp/KoinPlatformTimeTools.kt | 2 +- .../org/koin/mp/native/MainThreadSafety.kt | 18 +-- .../kotlin/org/koin/core/Helpers.kt | 6 +- .../koin/core/state/PlatformThreadingTest.kt | 4 +- .../org/koin/mp/native/MainThreadSafety.kt | 8 +- .../kotlin/org/koin/test/AutoCloseKoinTest.kt | 2 +- .../org/koin/test/mock/MockProviderRule.kt | 13 +- .../kotlin/org/koin/test/CheckModulesTest.kt | 59 +++++---- .../test/kotlin/org/koin/test/CheckTest.kt | 7 +- .../test/kotlin/org/koin/test/Components.kt | 2 - .../test/DeclareKoinContextFromRuleTest.kt | 18 +-- .../org/koin/test/DeclareMockFromKoinTest.kt | 12 +- .../kotlin/org/koin/test/DeclareMockTests.kt | 50 +++---- .../kotlin/org/koin/test/KoinTestRuleTest.kt | 2 +- .../org/koin/test/junit5/AutoCloseKoinTest.kt | 2 +- .../org/koin/test/junit5/KoinTestExtension.kt | 7 +- .../test/junit5/mock/MockProviderExtension.kt | 3 +- .../kotlin/org/koin/test/junit5/Components.kt | 1 - .../DeclareKoinContextFromExtensionTest.kt | 18 +-- .../test/junit5/DeclareMockFromKoinTest.kt | 12 +- .../org/koin/test/junit5/DeclareMockTests.kt | 50 +++---- .../kotlin/org/koin/test/KoinTest.kt | 6 +- .../org/koin/test/category/CheckModuleTest.kt | 2 +- .../org/koin/test/check/CheckModules.kt | 24 ++-- .../org/koin/test/check/CheckModulesDSL.kt | 4 +- .../kotlin/org/koin/test/mock/Declare.kt | 4 +- .../kotlin/org/koin/test/mock/DeclareMock.kt | 19 ++- .../kotlin/org/koin/test/mock/MockProvider.kt | 2 +- .../org/koin/test/parameter/MockParameter.kt | 4 +- .../kotlin/org/koin/test/Components.kt | 1 - .../kotlin/org/koin/test/DeclareTest.kt | 2 +- .../kotlin/org/koin/test/KoinQualifierTest.kt | 4 +- .../kotlin/org/koin/test/Components.kt | 1 - .../test/verify/CircularInjectionException.kt | 2 +- .../verify/MissingKoinDefinitionException.kt | 2 +- .../org/koin/test/verify/Verification.kt | 2 +- .../org/koin/test/verify/VerifyModule.kt | 7 +- .../src/jvmTest/kotlin/VerifyModulesTest.kt | 16 ++- 190 files changed, 1477 insertions(+), 1361 deletions(-) diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt index 2997916e8..c5eaa748a 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinApplicationLazyExt.kt @@ -57,4 +57,3 @@ fun KoinApplication.lazyModules(list: List>) { modules(list.map { it.value }) } } - diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt index b9a93d6a7..d17d29086 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/KoinLazyExt.kt @@ -28,7 +28,7 @@ import org.koin.core.extension.coroutinesEngine */ @OptIn(KoinInternalApi::class) @KoinExperimentalAPI -suspend fun Koin.awaitAllStartJobs(){ +suspend fun Koin.awaitAllStartJobs() { coroutinesEngine.awaitAllStartJobs() } @@ -38,7 +38,7 @@ suspend fun Koin.awaitAllStartJobs(){ * @param block */ @KoinExperimentalAPI -suspend fun Koin.onKoinStarted(block : suspend (Koin) -> Unit){ +suspend fun Koin.onKoinStarted(block: suspend (Koin) -> Unit) { awaitAllStartJobs() block(this) } @@ -48,6 +48,6 @@ suspend fun Koin.onKoinStarted(block : suspend (Koin) -> Unit){ */ @OptIn(KoinInternalApi::class) @KoinExperimentalAPI -fun Koin.isAllStartedJobsDone() : Boolean { +fun Koin.isAllStartedJobsDone(): Boolean { return coroutinesEngine.startJobs.all { !it.isActive } -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt index d11319f8a..d38aca730 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/context/LoadLazyModules.kt @@ -27,4 +27,4 @@ import org.koin.mp.KoinPlatformTools /** * load Koin module in global Koin context */ -fun loadKoinModules(module: Lazy) = KoinPlatformTools.defaultContext().loadKoinModules(module.value) \ No newline at end of file +fun loadKoinModules(module: Lazy) = KoinPlatformTools.defaultContext().loadKoinModules(module.value) diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt index 2102e44ef..8ecfcd3b0 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/coroutine/KoinCoroutinesEngine.kt @@ -41,17 +41,16 @@ class KoinCoroutinesEngine : CoroutineScope, KoinExtension { override lateinit var koin: Koin - fun launchStartJob(block: suspend CoroutineScope.() -> T){ + fun launchStartJob(block: suspend CoroutineScope.() -> T) { startJobs.add(async { block() }) } - suspend fun awaitAllStartJobs(){ + suspend fun awaitAllStartJobs() { koin.logger.debug("await All Start Jobs ...") startJobs.map { it.await() } startJobs.clear() } - override fun onClose() { koin.logger.debug("onClose $this") cancel("KoinCoroutinesEngine shutdown") @@ -61,4 +60,3 @@ class KoinCoroutinesEngine : CoroutineScope, KoinExtension { const val EXTENSION_NAME = "coroutine-engine" } } - diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt index 1a98b8b4f..c141e39c9 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/extension/KoinCoroutinesExtension.kt @@ -41,4 +41,4 @@ fun KoinApplication.coroutinesEngine() { @OptIn(KoinInternalApi::class) @KoinExperimentalAPI -val Koin.coroutinesEngine: KoinCoroutinesEngine get() = extensionManager.getExtension(EXTENSION_NAME) \ No newline at end of file +val Koin.coroutinesEngine: KoinCoroutinesEngine get() = extensionManager.getExtension(EXTENSION_NAME) diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt index 6e6cdf85d..0dc190ef5 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/core/module/LazyModuleExt.kt @@ -18,7 +18,6 @@ package org.koin.core.module import org.koin.core.annotation.KoinExperimentalAPI import org.koin.core.annotation.KoinInternalApi - /** * Include list of `Lazy`, to be resolved only lazily */ diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt index bfd19a6a0..05bcb9654 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/dsl/LazyModuleDSL.kt @@ -31,4 +31,4 @@ import org.koin.core.module.Module */ @KoinExperimentalAPI @KoinDslMarker -fun lazyModule(moduleDefinition : ModuleDeclaration) : Lazy = lazy(LazyThreadSafetyMode.NONE) { module(moduleDeclaration = moduleDefinition) } \ No newline at end of file +fun lazyModule(moduleDefinition: ModuleDeclaration): Lazy = lazy(LazyThreadSafetyMode.NONE) { module(moduleDeclaration = moduleDefinition) } diff --git a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index fca39d919..83e592011 100644 --- a/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/commonMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -20,5 +20,5 @@ import org.koin.core.annotation.KoinExperimentalAPI @KoinExperimentalAPI expect object KoinPlatformCoroutinesTools { - fun defaultCoroutineDispatcher() : CoroutineDispatcher -} \ No newline at end of file + fun defaultCoroutineDispatcher(): CoroutineDispatcher +} diff --git a/core/koin-core-coroutines/src/jsMain/kotlin/org.koin.mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/jsMain/kotlin/org.koin.mp/KoinPlatformCoroutinesTools.kt index 139934c0d..984599d8c 100644 --- a/core/koin-core-coroutines/src/jsMain/kotlin/org.koin.mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/jsMain/kotlin/org.koin.mp/KoinPlatformCoroutinesTools.kt @@ -6,5 +6,5 @@ import org.koin.core.annotation.KoinExperimentalAPI @KoinExperimentalAPI actual object KoinPlatformCoroutinesTools { - actual fun defaultCoroutineDispatcher() : CoroutineDispatcher = Dispatchers.Default -} \ No newline at end of file + actual fun defaultCoroutineDispatcher(): CoroutineDispatcher = Dispatchers.Default +} diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt index 2122955e8..92f3de221 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/KoinWaitExt.kt @@ -17,8 +17,6 @@ package org.koin.core import kotlinx.coroutines.runBlocking import org.koin.core.annotation.KoinExperimentalAPI -import org.koin.core.annotation.KoinInternalApi -import org.koin.core.extension.coroutinesEngine /** * @author Arnaud Giuliani @@ -28,7 +26,7 @@ import org.koin.core.extension.coroutinesEngine * Wait for Starting coroutines jobs to finish using runBlocking */ @KoinExperimentalAPI -fun Koin.waitAllStartJobs(){ +fun Koin.waitAllStartJobs() { runBlocking { awaitAllStartJobs() } @@ -40,8 +38,8 @@ fun Koin.waitAllStartJobs(){ * @param block */ @KoinExperimentalAPI -fun Koin.runOnKoinStarted(block : suspend (Koin) -> Unit){ +fun Koin.runOnKoinStarted(block: suspend (Koin) -> Unit) { runBlocking { onKoinStarted(block) } -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt index 57ddede9e..b4f2bbc0b 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/core/context/ContextWaitJVM.kt @@ -18,7 +18,6 @@ package org.koin.core.context import org.koin.core.annotation.KoinExperimentalAPI import org.koin.core.waitAllStartJobs import org.koin.mp.KoinPlatform -import org.koin.mp.KoinPlatformTools /** * Starter function to help start Koin context with default context parameters @@ -30,4 +29,4 @@ import org.koin.mp.KoinPlatformTools * Wait for Koin start jobs to complete */ @KoinExperimentalAPI -fun waitKoinStart() = KoinPlatform.getKoin().waitAllStartJobs() \ No newline at end of file +fun waitKoinStart() = KoinPlatform.getKoin().waitAllStartJobs() diff --git a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index e8d150124..88e75296b 100644 --- a/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/jvmMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -21,5 +21,5 @@ import org.koin.core.annotation.KoinExperimentalAPI @KoinExperimentalAPI actual object KoinPlatformCoroutinesTools { - actual fun defaultCoroutineDispatcher() : CoroutineDispatcher = Dispatchers.IO -} \ No newline at end of file + actual fun defaultCoroutineDispatcher(): CoroutineDispatcher = Dispatchers.IO +} diff --git a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/ExtensionTest.kt b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/ExtensionTest.kt index 2efc19cba..386fd1630 100644 --- a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/ExtensionTest.kt +++ b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/ExtensionTest.kt @@ -60,4 +60,4 @@ class ExtensionTest { koin.extensionManager.getExtension(KoinCoroutinesEngine.EXTENSION_NAME) assertFalse(coroutinesEngine.coroutineContext.isActive) } -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/LazyModuleTest.kt b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/LazyModuleTest.kt index ca996bf96..a71087c56 100644 --- a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/LazyModuleTest.kt +++ b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/LazyModuleTest.kt @@ -39,4 +39,4 @@ class LazyModuleTest { assertNotNull(koin.getOrNull()) } -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt index 08e88fd2f..28da1bcdc 100644 --- a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt +++ b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/PerfsTest.kt @@ -5,11 +5,11 @@ import org.koin.core.* import org.koin.core.context.GlobalContext.startKoin import org.koin.core.context.GlobalContext.stopKoin import org.koin.core.context.waitKoinStart -import kotlin.test.Test import org.koin.core.logger.* import org.koin.core.time.Timer import org.koin.dsl.koinApplication import org.koin.mp.KoinPlatform +import kotlin.test.Test class PerfsTest { @@ -53,7 +53,7 @@ class PerfsTest { } @Test - fun start_and_wait(){ + fun start_and_wait() { startKoin { lazyModules(perfModule400()) } @@ -67,7 +67,7 @@ class PerfsTest { } @Test - fun run_after_start_coroutine(){ + fun run_after_start_coroutine() { startKoin { printLogger(Level.DEBUG) lazyModules(perfModule400()) @@ -79,11 +79,10 @@ class PerfsTest { } } stopKoin() - } @Test - fun run_after_start(){ + fun run_after_start() { startKoin { printLogger(Level.DEBUG) lazyModules(perfModule400()) @@ -93,6 +92,5 @@ class PerfsTest { koin.get() } stopKoin() - } -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/classes.kt b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/classes.kt index 83f19b53f..c66c9999a 100644 --- a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/classes.kt +++ b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/classes.kt @@ -402,4 +402,4 @@ class Perfs { class B100(val a: A100) class C100(val a: A100, val b: B100) class D100(val a: A100, val b: B100, val c: C100) -} \ No newline at end of file +} diff --git a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/module_400.kt b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/module_400.kt index 0beceff56..7c1e6c40d 100644 --- a/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/module_400.kt +++ b/core/koin-core-coroutines/src/jvmTest/kotlin/org/koin/test/module_400.kt @@ -2,7 +2,6 @@ package org.koin.test import org.koin.dsl.lazyModule - fun perfModule400() = lazyModule { single { Perfs.A1() } single { Perfs.B1(get()) } diff --git a/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt b/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt index 88bbcee73..f1740bf54 100644 --- a/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt +++ b/core/koin-core-coroutines/src/nativeMain/kotlin/org/koin/mp/KoinPlatformCoroutinesTools.kt @@ -21,5 +21,5 @@ import org.koin.core.annotation.KoinExperimentalAPI @KoinExperimentalAPI actual object KoinPlatformCoroutinesTools { - actual fun defaultCoroutineDispatcher() : CoroutineDispatcher = Dispatchers.Default -} \ No newline at end of file + actual fun defaultCoroutineDispatcher(): CoroutineDispatcher = Dispatchers.Default +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index 991ac36ac..626f4ce63 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -78,7 +78,7 @@ class Koin { inline fun inject( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = KoinPlatformTools.defaultLazyMode(), - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): Lazy = scopeRegistry.rootScope.inject(qualifier, mode, parameters) /** @@ -92,7 +92,7 @@ class Koin { inline fun injectOrNull( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = KoinPlatformTools.defaultLazyMode(), - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): Lazy = scopeRegistry.rootScope.injectOrNull(qualifier, mode, parameters) /** @@ -103,7 +103,7 @@ class Koin { */ inline fun get( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T = scopeRegistry.rootScope.get(qualifier, parameters) /** @@ -116,7 +116,7 @@ class Koin { */ inline fun getOrNull( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T? = scopeRegistry.rootScope.getOrNull(qualifier, parameters) /** @@ -131,7 +131,7 @@ class Koin { fun get( clazz: KClass<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T = scopeRegistry.rootScope.get(clazz, qualifier, parameters) /** @@ -146,10 +146,9 @@ class Koin { fun getOrNull( clazz: KClass<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T? = scopeRegistry.rootScope.getOrNull(clazz, qualifier, parameters) - /** * Declare a component definition from the given instance * This result of declaring a single definition of type T, returning the given instance @@ -163,7 +162,7 @@ class Koin { instance: T, qualifier: Qualifier? = null, secondaryTypes: List> = emptyList(), - allowOverride: Boolean = true + allowOverride: Boolean = true, ) { instanceRegistry.declareRootInstance(instance, qualifier, secondaryTypes, allowOverride) } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt index 465d142a0..5488b4ec0 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt @@ -135,4 +135,4 @@ class KoinApplication private constructor() { return app } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt index ad1878fb2..cecdbb156 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/annotation/KoinAnnotations.kt @@ -31,14 +31,14 @@ annotation class KoinInternalApi * @author Arnaud Giuliani * @author Victor Alenkov */ -@RequiresOptIn(message = "This API is experimental and can change in the next versions",level = RequiresOptIn.Level.WARNING) +@RequiresOptIn(message = "This API is experimental and can change in the next versions", level = RequiresOptIn.Level.WARNING) @Target( AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, - AnnotationTarget.CONSTRUCTOR + AnnotationTarget.CONSTRUCTOR, ) annotation class KoinExperimentalAPI @@ -48,14 +48,14 @@ annotation class KoinExperimentalAPI * @author Arnaud Giuliani * @author Victor Alenkov */ -@RequiresOptIn(message = "This API is using reflection and implies some introspection performance penalties on limited capacity devices (Android)",level = RequiresOptIn.Level.WARNING) +@RequiresOptIn(message = "This API is using reflection and implies some introspection performance penalties on limited capacity devices (Android)", level = RequiresOptIn.Level.WARNING) @Target( AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, - AnnotationTarget.CONSTRUCTOR + AnnotationTarget.CONSTRUCTOR, ) @Deprecated("Koin Reflection API is deprecated") -annotation class KoinReflectAPI \ No newline at end of file +annotation class KoinReflectAPI diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt index 263614b83..fd4022b33 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinComponent.kt @@ -40,11 +40,13 @@ interface KoinComponent { */ inline fun KoinComponent.get( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T { return if (this is KoinScopeComponent) { scope.get(qualifier, parameters) - } else getKoin().get(qualifier, parameters) + } else { + getKoin().get(qualifier, parameters) + } } /** @@ -56,7 +58,6 @@ inline fun KoinComponent.get( inline fun KoinComponent.inject( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = KoinPlatformTools.defaultLazyMode(), - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): Lazy = lazy(mode) { get(qualifier, parameters) } - diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt index c8feca4ac..bbf50501c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/component/KoinScopeComponent.kt @@ -50,4 +50,4 @@ fun T.getScopeOrNull(): Scope? { } fun T.newScope() = lazy { createScope() } -fun T.getOrCreateScope() = lazy { getScopeOrNull() ?: createScope() } \ No newline at end of file +fun T.getOrCreateScope() = lazy { getScopeOrNull() ?: createScope() } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt index aa0500680..2a0c34c0b 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/DefaultContextExt.kt @@ -62,4 +62,4 @@ fun unloadKoinModules(module: Module) = KoinPlatformTools.defaultContext().unloa /** * unload Koin modules from global Koin context */ -fun unloadKoinModules(modules: List) = KoinPlatformTools.defaultContext().unloadKoinModules(modules) \ No newline at end of file +fun unloadKoinModules(modules: List) = KoinPlatformTools.defaultContext().unloadKoinModules(modules) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt index 8aab3a1f3..dcf3df054 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt @@ -71,4 +71,4 @@ interface KoinContext { * unload Koin modules from global Koin context */ fun unloadKoinModules(modules: List) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt index bed4c1dcc..764797eac 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/BeanDefinition.kt @@ -16,7 +16,6 @@ package org.koin.core.definition import org.koin.core.module.KoinDslMarker -import org.koin.core.module.OptionDslMarker import org.koin.core.parameter.ParametersHolder import org.koin.core.qualifier.Qualifier import org.koin.core.registry.ScopeRegistry.Companion.rootScopeQualifier @@ -49,11 +48,13 @@ data class BeanDefinition( val defType = "'${primaryType.getFullName()}'" val defName = qualifier?.let { ",qualifier:$qualifier" } ?: "" val defScope = - scopeQualifier.let { if (it == rootScopeQualifier) "" else ",scope:${scopeQualifier}" } + scopeQualifier.let { if (it == rootScopeQualifier) "" else ",scope:$scopeQualifier" } val defOtherTypes = if (secondaryTypes.isNotEmpty()) { val typesAsString = secondaryTypes.joinToString(",") { it.getFullName() } ",binds:$typesAsString" - } else "" + } else { + "" + } return "[$defKind:$defType$defName$defScope$defOtherTypes]" } @@ -87,7 +88,6 @@ data class BeanDefinition( result = 31 * result + scopeQualifier.hashCode() return result } - } fun indexKey(clazz: KClass<*>, typeQualifier: Qualifier?, scopeQualifier: Qualifier): String { @@ -107,7 +107,7 @@ inline fun _createDefinition( qualifier: Qualifier? = null, noinline definition: Definition, secondaryTypes: List> = emptyList(), - scopeQualifier: Qualifier + scopeQualifier: Qualifier, ): BeanDefinition { return BeanDefinition( scopeQualifier, @@ -115,6 +115,6 @@ inline fun _createDefinition( qualifier, definition, kind, - secondaryTypes = secondaryTypes + secondaryTypes = secondaryTypes, ) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt index ba409bf46..8f4ab7448 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/Callbacks.kt @@ -22,4 +22,4 @@ package org.koin.core.definition */ data class Callbacks(val onClose: OnCloseCallback? = null) -typealias OnCloseCallback = (T?) -> Unit \ No newline at end of file +typealias OnCloseCallback = (T?) -> Unit diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/KoinDefinition.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/KoinDefinition.kt index 2c3ef4e22..f71cc676a 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/KoinDefinition.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/definition/KoinDefinition.kt @@ -5,4 +5,4 @@ import org.koin.core.module.KoinDslMarker import org.koin.core.module.Module @KoinDslMarker -data class KoinDefinition(val module : Module, val factory : InstanceFactory) \ No newline at end of file +data class KoinDefinition(val module: Module, val factory: InstanceFactory) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt index a974a84f0..dec6af40c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ApplicationAlreadyStartedException.kt @@ -1,3 +1,3 @@ package org.koin.core.error -typealias ApplicationAlreadyStartedException = KoinAppAlreadyStartedException \ No newline at end of file +typealias ApplicationAlreadyStartedException = KoinAppAlreadyStartedException diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt index 816874a40..367207983 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ClosedScopeException.kt @@ -20,4 +20,4 @@ package org.koin.core.error * * @author Arnaud Giuliani */ -class ClosedScopeException(msg : String) : Exception(msg) \ No newline at end of file +class ClosedScopeException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt index 96fd24248..8cc1de0c5 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionOverrideException.kt @@ -20,4 +20,4 @@ package org.koin.core.error * * @author Arnaud Giuliani */ -class DefinitionOverrideException(msg: String) : Exception(msg) \ No newline at end of file +class DefinitionOverrideException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionParameterException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionParameterException.kt index 1a53d92c3..bc662b8e4 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionParameterException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/DefinitionParameterException.kt @@ -1,3 +1,3 @@ package org.koin.core.error -class DefinitionParameterException(str: String) : Exception(str) \ No newline at end of file +class DefinitionParameterException(str: String) : Exception(str) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt index d9904fd1f..6704fbc50 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/KoinAppAlreadyStartedException.kt @@ -19,4 +19,4 @@ package org.koin.core.error * Koin standalone app is already started error */ @Deprecated("Will be renamed in ApplicationAlreadyStartedException") -class KoinAppAlreadyStartedException(msg: String) : Exception(msg) \ No newline at end of file +class KoinAppAlreadyStartedException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt index 3b28cb068..fed9dcc86 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoDefinitionFoundException.kt @@ -1,3 +1,3 @@ package org.koin.core.error -typealias NoDefinitionFoundException = NoBeanDefFoundException \ No newline at end of file +typealias NoDefinitionFoundException = NoBeanDefFoundException diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt index 3cf53016e..041854a64 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/NoPropertyFileFoundException.kt @@ -20,4 +20,4 @@ package org.koin.core.error * * @author Arnaud Giuliani */ -class NoPropertyFileFoundException(msg: String) : Exception(msg) \ No newline at end of file +class NoPropertyFileFoundException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt index fad5b7968..9e5b48542 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/error/ScopeNotCreatedException.kt @@ -19,4 +19,4 @@ package org.koin.core.error * Scope is not created error * @author Arnaud Giuliani */ -class ScopeNotCreatedException(msg: String) : Exception(msg) \ No newline at end of file +class ScopeNotCreatedException(msg: String) : Exception(msg) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt index 39a4ce427..9940eb1c6 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/ExtensionManager.kt @@ -31,11 +31,11 @@ class ExtensionManager(internal val _koin: Koin) { @PublishedApi internal val extensions = hashMapOf() - inline fun getExtension(id : String) : T = getExtensionOrNull(id) ?: error("Koin extension '$id' not found.") + inline fun getExtension(id: String): T = getExtensionOrNull(id) ?: error("Koin extension '$id' not found.") - inline fun getExtensionOrNull(id : String) : T? = extensions[id] as? T + inline fun getExtensionOrNull(id: String): T? = extensions[id] as? T - fun registerExtension(id : String, extension : T){ + fun registerExtension(id: String, extension: T) { extensions[id] = extension extension.koin = _koin } @@ -43,4 +43,4 @@ class ExtensionManager(internal val _koin: Koin) { fun close() { extensions.values.forEach { it.onClose() } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt index 7388edee8..dfb853137 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/extension/KoinExtension.kt @@ -27,10 +27,10 @@ interface KoinExtension { /** * Current Koin instance */ - var koin : Koin + var koin: Koin /** * Called when closing Koin */ fun onClose() -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt index 6ad62d310..82b50a35c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/FactoryInstanceFactory.kt @@ -32,9 +32,9 @@ class FactoryInstanceFactory(beanDefinition: BeanDefinition) : beanDefinition.callbacks.onClose?.invoke(null) } - override fun dropAll(){} + override fun dropAll() {} override fun get(context: InstanceContext): T { return create(context) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt index b2b0617da..09046ac8c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceContext.kt @@ -19,7 +19,6 @@ import org.koin.core.logger.Logger import org.koin.core.parameter.ParametersHolder import org.koin.core.scope.Scope - /** * Instance resolution Context * Help support DefinitionContext & DefinitionParameters when resolving definition function @@ -27,5 +26,5 @@ import org.koin.core.scope.Scope class InstanceContext( val logger: Logger, val scope: Scope, - val parameters: ParametersHolder? = null + val parameters: ParametersHolder? = null, ) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt index da17ddd54..4825ed621 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt @@ -19,7 +19,6 @@ package org.koin.core.instance import org.koin.core.definition.BeanDefinition import org.koin.core.error.InstanceCreationException -import org.koin.core.logger.Level import org.koin.core.parameter.ParametersHolder import org.koin.core.parameter.emptyParametersHolder import org.koin.core.scope.Scope @@ -45,12 +44,12 @@ abstract class InstanceFactory(val beanDefinition: BeanDefinition) : Locka * @return T */ open fun create(context: InstanceContext): T { - context.logger.debug( "| (+) '$beanDefinition'") + context.logger.debug("| (+) '$beanDefinition'") try { val parameters: ParametersHolder = context.parameters ?: emptyParametersHolder() return beanDefinition.definition.invoke( context.scope, - parameters + parameters, ) } catch (e: Exception) { val stack = KoinPlatformTools.getStackTrace(e) @@ -83,4 +82,4 @@ abstract class InstanceFactory(val beanDefinition: BeanDefinition) : Locka companion object { const val ERROR_SEPARATOR = "\n\t" } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt index 26b01c294..462ac0242 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt @@ -19,7 +19,6 @@ import org.koin.core.definition.BeanDefinition import org.koin.core.scope.Scope import org.koin.core.scope.ScopeID import org.koin.mp.KoinPlatformTools -import org.koin.mp.KoinPlatformTools.safeHashMap /** * Single instance holder @@ -28,7 +27,7 @@ import org.koin.mp.KoinPlatformTools.safeHashMap class ScopedInstanceFactory(beanDefinition: BeanDefinition) : InstanceFactory(beanDefinition) { - private var values = hashMapOf() + private var values = hashMapOf() override fun isCreated(context: InstanceContext?): Boolean = (values[context?.scope?.id] != null) @@ -42,11 +41,13 @@ class ScopedInstanceFactory(beanDefinition: BeanDefinition) : override fun create(context: InstanceContext): T { return if (values[context.scope.id] == null) { super.create(context) - } else values[context.scope.id] ?: error("Scoped instance not found for ${context.scope.id} in $beanDefinition") + } else { + values[context.scope.id] ?: error("Scoped instance not found for ${context.scope.id} in $beanDefinition") + } } override fun get(context: InstanceContext): T { - if (context.scope.scopeQualifier != beanDefinition.scopeQualifier){ + if (context.scope.scopeQualifier != beanDefinition.scopeQualifier) { error("Wrong Scope: trying to open instance for ${context.scope.id} in $beanDefinition") } KoinPlatformTools.synchronized(this) { @@ -57,11 +58,11 @@ class ScopedInstanceFactory(beanDefinition: BeanDefinition) : return values[context.scope.id] ?: error("Scoped instance not found for ${context.scope.id} in $beanDefinition") } - override fun dropAll(){ + override fun dropAll() { values.clear() } fun refreshInstance(scopeID: ScopeID, instance: Any) { values[scopeID] = instance as T } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt index 0dc39d943..5921f1719 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/SingleInstanceFactory.kt @@ -28,7 +28,7 @@ class SingleInstanceFactory(beanDefinition: BeanDefinition) : private var value: T? = null - private fun getValue() : T = value ?: error("Single instance created couldn't return value") + private fun getValue(): T = value ?: error("Single instance created couldn't return value") override fun isCreated(context: InstanceContext?): Boolean = (value != null) @@ -37,14 +37,16 @@ class SingleInstanceFactory(beanDefinition: BeanDefinition) : value = null } - override fun dropAll(){ + override fun dropAll() { drop() } override fun create(context: InstanceContext): T { return if (value == null) { super.create(context) - } else getValue() + } else { + getValue() + } } override fun get(context: InstanceContext): T { @@ -55,4 +57,4 @@ class SingleInstanceFactory(beanDefinition: BeanDefinition) : } return getValue() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt index 8d4c684eb..6a6ac6216 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/EmptyLogger.kt @@ -21,4 +21,4 @@ package org.koin.core.logger class EmptyLogger : Logger(Level.NONE) { override fun display(level: Level, msg: MESSAGE) {} -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt index 8441176ca..968cbd766 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt @@ -42,12 +42,12 @@ abstract class Logger(var level: Level = Level.INFO) { fun isAt(lvl: Level): Boolean = this.level <= lvl - inline fun log(lvl: Level, msg : String){ - if (isAt(lvl)) display(lvl,msg) + inline fun log(lvl: Level, msg: String) { + if (isAt(lvl)) display(lvl, msg) } - inline fun log(lvl: Level, msg : () -> String){ - if (isAt(lvl)) display(lvl,msg()) + inline fun log(lvl: Level, msg: () -> String) { + if (isAt(lvl)) display(lvl, msg()) } } @@ -57,4 +57,4 @@ enum class Level { DEBUG, INFO, WARNING, ERROR, NONE } -typealias MESSAGE = String \ No newline at end of file +typealias MESSAGE = String diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index fdc5844a8..ca80eba23 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -39,7 +39,7 @@ import org.koin.mp.KoinPlatformTools class Module( @PublishedApi - internal val _createdAtStart: Boolean = false + internal val _createdAtStart: Boolean = false, ) { val id = KoinPlatformTools.generateId() @@ -103,7 +103,7 @@ class Module( inline fun single( qualifier: Qualifier? = null, createdAtStart: Boolean = false, - noinline definition: Definition + noinline definition: Definition, ): KoinDefinition { val factory = _singleInstanceFactory(qualifier, definition) indexPrimaryType(factory) @@ -146,7 +146,7 @@ class Module( */ inline fun factory( qualifier: Qualifier? = null, - noinline definition: Definition + noinline definition: Definition, ): KoinDefinition { return factory(qualifier, definition, rootScopeQualifier) } @@ -155,7 +155,7 @@ class Module( internal inline fun factory( qualifier: Qualifier? = null, noinline definition: Definition, - scopeQualifier: Qualifier + scopeQualifier: Qualifier, ): KoinDefinition { val factory = _factoryInstanceFactory(qualifier, definition, scopeQualifier) indexPrimaryType(factory) @@ -191,17 +191,16 @@ class Module( @PublishedApi internal fun overrideError( factory: InstanceFactory<*>, - mapping: IndexKey + mapping: IndexKey, ) { throw DefinitionOverrideException("Already existing definition for ${factory.beanDefinition} at $mapping") } - @KoinInternalApi inline fun _singleInstanceFactory( qualifier: Qualifier? = null, noinline definition: Definition, - scopeQualifier: Qualifier = rootScopeQualifier + scopeQualifier: Qualifier = rootScopeQualifier, ): SingleInstanceFactory { val def = _createDefinition(Kind.Singleton, qualifier, definition, scopeQualifier = scopeQualifier) return SingleInstanceFactory(def) @@ -211,7 +210,7 @@ inline fun _singleInstanceFactory( inline fun _factoryInstanceFactory( qualifier: Qualifier? = null, noinline definition: Definition, - scopeQualifier: Qualifier = rootScopeQualifier + scopeQualifier: Qualifier = rootScopeQualifier, ): FactoryInstanceFactory { val def = _createDefinition(Kind.Factory, qualifier, definition, scopeQualifier = scopeQualifier) return FactoryInstanceFactory(def) @@ -221,7 +220,7 @@ inline fun _factoryInstanceFactory( inline fun _scopedInstanceFactory( qualifier: Qualifier? = null, noinline definition: Definition, - scopeQualifier: Qualifier + scopeQualifier: Qualifier, ): ScopedInstanceFactory { val def = _createDefinition(Kind.Scoped, qualifier, definition, scopeQualifier = scopeQualifier) return ScopedInstanceFactory(def) @@ -248,4 +247,4 @@ tailrec fun flatten(modules: List, newModules: Set = emptySet()) flatten(head.includedModules + tail, newModules + head) } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt index fd281752c..20abc8833 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/FactoryOf.kt @@ -19,7 +19,6 @@ package org.koin.core.module.dsl import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition -import org.koin.core.module.KoinDslMarker import org.koin.core.module.Module /** @@ -60,7 +59,6 @@ inline fun Module.factoryOf( noinline options: DefinitionOptions? = null, ): KoinDefinition = factory { new(constructor) }.onOptions(options) - /** * @see factoryOf */ diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt index 9437d00e0..8de12fbfb 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/New.kt @@ -116,74 +116,74 @@ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) /** * @see new */ inline fun Scope.new( constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22) -> R, -): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(),get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) +): R = constructor(get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get()) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/OptionDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/OptionDSL.kt index 5726a6035..c52b2829e 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/OptionDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/OptionDSL.kt @@ -22,7 +22,7 @@ typealias DefinitionOptions = BeanDefinition.() -> Unit */ @OptionDslMarker inline infix fun KoinDefinition.withOptions( - options: DefinitionOptions + options: DefinitionOptions, ): KoinDefinition { val def = factory.beanDefinition val primary = def.qualifier @@ -40,7 +40,7 @@ inline infix fun KoinDefinition.withOptions( } fun KoinDefinition.onOptions( - options: DefinitionOptions? = null + options: DefinitionOptions? = null, ): KoinDefinition { if (options != null) { withOptions(options) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt index fe252cd07..56027200a 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedFactoryOf.kt @@ -59,7 +59,6 @@ inline fun ScopeDSL.factoryOf( noinline options: DefinitionOptions? = null, ): KoinDefinition = factory { new(constructor) }.onOptions(options) - /** * @see factoryOf */ diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt index cbea32697..9d742d16c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt @@ -61,6 +61,7 @@ inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) + /** * @see scopedOf */ diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt index 3d2de0abb..4d7393f99 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/SingleOf.kt @@ -19,7 +19,6 @@ package org.koin.core.module.dsl import org.koin.core.annotation.KoinInternalApi import org.koin.core.definition.KoinDefinition -import org.koin.core.module.KoinDslMarker import org.koin.core.module.Module /** diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt index f207794fa..f7499a637 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/parameter/ParametersHolder.kt @@ -32,16 +32,20 @@ import kotlin.reflect.KClass open class ParametersHolder( @PublishedApi internal val _values: MutableList = mutableListOf(), - //TODO by default useIndexedValues to null, to keep compatibility with both indexed params & set params - val useIndexedValues: Boolean? = null + // TODO by default useIndexedValues to null, to keep compatibility with both indexed params & set params + val useIndexedValues: Boolean? = null, ) { val values: List get() = _values open fun elementAt(i: Int, clazz: KClass<*>): T = - if (_values.size > i) _values[i] as T else throw NoParameterFoundException( - "Can't get injected parameter #$i from $this for type '${clazz.getFullName()}'" - ) + if (_values.size > i) { + _values[i] as T + } else { + throw NoParameterFoundException( + "Can't get injected parameter #$i from $this for type '${clazz.getFullName()}'", + ) + } inline operator fun component1(): T = elementAt(0, T::class) inline operator fun component2(): T = elementAt(1, T::class) @@ -104,8 +108,9 @@ open class ParametersHolder( * return T */ open fun getOrNull(clazz: KClass<*>): T? { - return if (_values.isEmpty()) null - else { + return if (_values.isEmpty()) { + null + } else { when (useIndexedValues) { null -> getIndexedValue(clazz) ?: getFirstValue(clazz) true -> getIndexedValue(clazz) @@ -116,7 +121,7 @@ open class ParametersHolder( private fun getFirstValue(clazz: KClass<*>): T? { return _values.firstOrNull { clazz.isInstance(it) } - ?.let { it as T } //firstNotNullOfOrNull { value -> if (clazz.isInstance(value)) value as? T? else null } + ?.let { it as T } // firstNotNullOfOrNull { value -> if (clazz.isInstance(value)) value as? T? else null } } private fun getIndexedValue(clazz: KClass<*>): T? { @@ -175,4 +180,4 @@ fun emptyParametersHolder() = ParametersHolder() /** * Help define a DefinitionParameters */ -typealias ParametersDefinition = () -> ParametersHolder \ No newline at end of file +typealias ParametersDefinition = () -> ParametersHolder diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt index 215a76ae0..007104127 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/Qualifier.kt @@ -31,7 +31,6 @@ fun named(name: String) = StringQualifier(name) fun > named(enum: Enum) = enum.qualifier - fun qualifier(name: String) = StringQualifier(name) fun > qualifier(enum: Enum) = enum.qualifier @@ -53,6 +52,6 @@ inline fun qualifier() = TypeQualifier(T::class) inline fun _q() = TypeQualifier(T::class) val > Enum.qualifier - get() : Qualifier { + get(): Qualifier { return StringQualifier(this.toString().toLowerCase()) - } \ No newline at end of file + } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt index 62deb30d5..5b3a68ce6 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/StringQualifier.kt @@ -19,4 +19,4 @@ data class StringQualifier(override val value: QualifierValue) : Qualifier { override fun toString(): String { return value } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt index 61faccfd5..197e2ee7f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/qualifier/TypeQualifier.kt @@ -39,4 +39,4 @@ class TypeQualifier(val type: KClass<*>) : Qualifier { override fun hashCode(): Int { return value.hashCode() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt index 50f899104..891d97937 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt @@ -25,7 +25,6 @@ import org.koin.core.instance.InstanceContext import org.koin.core.instance.InstanceFactory import org.koin.core.instance.ScopedInstanceFactory import org.koin.core.instance.SingleInstanceFactory -import org.koin.core.logger.Level import org.koin.core.module.Module import org.koin.core.module.overrideError import org.koin.core.qualifier.Qualifier @@ -41,7 +40,7 @@ class InstanceRegistry(val _koin: Koin) { val instances: Map> get() = _instances - private val eagerInstances = hashMapOf>() + private val eagerInstances = hashMapOf>() internal fun loadModules(modules: Set, allowOverride: Boolean) { modules.forEach { module -> @@ -76,7 +75,7 @@ class InstanceRegistry(val _koin: Koin) { allowOverride: Boolean, mapping: IndexKey, factory: InstanceFactory<*>, - logWarning: Boolean = true + logWarning: Boolean = true, ) { if (_instances.containsKey(mapping)) { if (!allowOverride) { @@ -101,7 +100,7 @@ class InstanceRegistry(val _koin: Koin) { internal fun resolveDefinition( clazz: KClass<*>, qualifier: Qualifier?, - scopeQualifier: Qualifier + scopeQualifier: Qualifier, ): InstanceFactory<*>? { val indexKey = indexKey(clazz, qualifier, scopeQualifier) return _instances[indexKey] @@ -111,7 +110,7 @@ class InstanceRegistry(val _koin: Koin) { qualifier: Qualifier?, clazz: KClass<*>, scopeQualifier: Qualifier, - instanceContext: InstanceContext + instanceContext: InstanceContext, ): T? { return resolveDefinition(clazz, qualifier, scopeQualifier)?.get(instanceContext) as? T } @@ -123,7 +122,7 @@ class InstanceRegistry(val _koin: Koin) { secondaryTypes: List> = emptyList(), allowOverride: Boolean = true, scopeQualifier: Qualifier, - scopeID: ScopeID + scopeID: ScopeID, ) { val def = _createDefinition(Kind.Scoped, qualifier, { instance }, secondaryTypes, scopeQualifier) val indexKey = indexKey(def.primaryType, def.qualifier, def.scopeQualifier) @@ -138,7 +137,6 @@ class InstanceRegistry(val _koin: Koin) { saveMapping(allowOverride, index, factory) } } - } @PublishedApi @@ -146,7 +144,7 @@ class InstanceRegistry(val _koin: Koin) { instance: T, qualifier: Qualifier? = null, secondaryTypes: List> = emptyList(), - allowOverride: Boolean = true + allowOverride: Boolean = true, ) { val rootQualifier = _koin.scopeRegistry.rootScope.scopeQualifier val def = _createDefinition(Kind.Scoped, qualifier, { instance }, secondaryTypes, rootQualifier) @@ -159,7 +157,6 @@ class InstanceRegistry(val _koin: Koin) { } } - internal fun dropScopeInstances(scope: Scope) { _instances.values.filterIsInstance>().forEach { factory -> factory.drop(scope) } } @@ -178,7 +175,7 @@ class InstanceRegistry(val _koin: Koin) { } .filter { factory -> factory.beanDefinition.primaryType == clazz || factory.beanDefinition.secondaryTypes.contains( - clazz + clazz, ) } .distinct() @@ -201,4 +198,4 @@ class InstanceRegistry(val _koin: Koin) { fun size(): Int { return _instances.size } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt index dfe6fdcd2..5c4373080 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt @@ -16,7 +16,6 @@ package org.koin.core.registry import org.koin.core.Koin -import org.koin.core.logger.Level import org.koin.mp.KoinPlatformTools /** @@ -35,7 +34,7 @@ class PropertyRegistry(internal val _koin: Koin) { * @param properties */ fun saveProperties(properties: Map) { - _koin.logger.debug("load ${properties.size} properties" ) + _koin.logger.debug("load ${properties.size} properties") _values.putAll(properties) } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt index 9bae6338d..520c46c7d 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt @@ -17,9 +17,7 @@ package org.koin.core.registry import org.koin.core.Koin import org.koin.core.annotation.KoinInternalApi -import org.koin.core.error.NoScopeDefFoundException import org.koin.core.error.ScopeAlreadyCreatedException -import org.koin.core.logger.Level import org.koin.core.module.Module import org.koin.core.qualifier.Qualifier import org.koin.core.qualifier._q @@ -58,14 +56,14 @@ class ScopeRegistry(private val _koin: Koin) { @PublishedApi internal fun createScope(scopeId: ScopeID, qualifier: Qualifier, source: Any? = null): Scope { _koin.logger.debug("|- (+) Scope - id:'$scopeId' q:$qualifier") - if (!_scopeDefinitions.contains(qualifier)){ + if (!_scopeDefinitions.contains(qualifier)) { _koin.logger.warn("| Scope '$qualifier' not defined. Creating it ...") _scopeDefinitions.add(qualifier) } if (_scopes.contains(scopeId)) { throw ScopeAlreadyCreatedException("Scope with id '$scopeId' is already created") } - val scope = Scope(qualifier,scopeId, _koin = _koin) + val scope = Scope(qualifier, scopeId, _koin = _koin) source?.let { scope._source = source } scope.linkTo(rootScope) _scopes[scopeId] = scope @@ -105,7 +103,8 @@ class ScopeRegistry(private val _koin: Koin) { companion object { private const val ROOT_SCOPE_ID = "_root_" + @PublishedApi internal val rootScopeQualifier = _q(ROOT_SCOPE_ID) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index e04c7303b..b485e3f1c 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -42,7 +42,7 @@ data class Scope( val id: ScopeID, val isRoot: Boolean = false, @PublishedApi - internal val _koin: Koin + internal val _koin: Koin, ) : Lockable() { private val linkedScopes: ArrayList = arrayListOf() @@ -102,7 +102,7 @@ data class Scope( inline fun inject( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): Lazy = lazy(mode) { get(qualifier, parameters) } @@ -117,7 +117,7 @@ data class Scope( inline fun injectOrNull( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): Lazy = lazy(mode) { getOrNull(qualifier, parameters) } @@ -129,7 +129,7 @@ data class Scope( */ inline fun get( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T { return get(T::class, qualifier, parameters) } @@ -154,7 +154,7 @@ data class Scope( */ inline fun getOrNull( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T? { return getOrNull(T::class, qualifier, parameters) } @@ -170,7 +170,7 @@ data class Scope( fun getOrNull( clazz: KClass<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T? { return try { get(clazz, qualifier, parameters) @@ -194,16 +194,16 @@ data class Scope( fun get( clazz: KClass<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T { - return if (_koin.logger.isAt(Level.DEBUG)){ + return if (_koin.logger.isAt(Level.DEBUG)) { val qualifierString = qualifier?.let { " with qualifier '$qualifier'" } ?: "" _koin.logger.display(Level.DEBUG, "|- '${clazz.getFullName()}'$qualifierString ...") val start = KoinPlatformTimeTools.getTimeInNanoSeconds() val instance = resolveInstance(qualifier, clazz, parameters) val stop = KoinPlatformTimeTools.getTimeInNanoSeconds() - val duration = (stop-start)/Timer.NANO_TO_MILLI + val duration = (stop - start) / Timer.NANO_TO_MILLI _koin.logger.display(Level.DEBUG, "|- '${clazz.getFullName()}' in $duration ms") instance @@ -216,14 +216,14 @@ data class Scope( private fun resolveInstance( qualifier: Qualifier?, clazz: KClass<*>, - parameterDef: ParametersDefinition? + parameterDef: ParametersDefinition?, ): T { if (_closed) { throw ClosedScopeException("Scope '$id' is closed") } val parameters = parameterDef?.invoke() if (parameters != null) { - _koin.logger.log(Level.DEBUG){ "| >> parameters $parameters " } + _koin.logger.log(Level.DEBUG) { "| >> parameters $parameters " } KoinPlatformTools.synchronized(this@Scope) { _parameterStack.addFirst(parameters) } @@ -243,37 +243,41 @@ data class Scope( qualifier: Qualifier?, clazz: KClass<*>, instanceContext: InstanceContext, - parameterDef: ParametersDefinition? - ) = (_koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) - ?: run { - //try resolve in injected param - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in injected parameters") - _parameterStack.firstOrNull()?.getOrNull(clazz) - } - ?: run { - //try resolve in scope source - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source" ) - _source?.let { source -> - if (source::class == clazz && qualifier == null) { - _source as? T - } else null + parameterDef: ParametersDefinition?, + ) = ( + _koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) + ?: run { + // try resolve in injected param + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in injected parameters") + _parameterStack.firstOrNull()?.getOrNull(clazz) } - } - ?: run { - //try resolve in other scopes - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in other scopes" ) - findInOtherScope(clazz, qualifier, parameterDef) - } - ?: run { - // in case of error - if (parameterDef != null){ - KoinPlatformTools.synchronized(this@Scope) { - _parameterStack.removeFirstOrNull() + ?: run { + // try resolve in scope source + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source") + _source?.let { source -> + if (source::class == clazz && qualifier == null) { + _source as? T + } else { + null + } + } + } + ?: run { + // try resolve in other scopes + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in other scopes") + findInOtherScope(clazz, qualifier, parameterDef) + } + ?: run { + // in case of error + if (parameterDef != null) { + KoinPlatformTools.synchronized(this@Scope) { + _parameterStack.removeFirstOrNull() + } + _koin.logger.debug("|- << parameters") } - _koin.logger.debug("|- << parameters" ) + throwDefinitionNotFound(qualifier, clazz) } - throwDefinitionNotFound(qualifier, clazz) - }) + ) @Suppress("UNCHECKED_CAST") private fun getFromSource(clazz: KClass<*>): T? { @@ -283,14 +287,14 @@ data class Scope( private fun findInOtherScope( clazz: KClass<*>, qualifier: Qualifier?, - parameters: ParametersDefinition? + parameters: ParametersDefinition?, ): T? { var instance: T? = null for (scope in linkedScopes) { instance = scope.getOrNull( clazz, qualifier, - parameters + parameters, ) if (instance != null) break } @@ -299,11 +303,11 @@ data class Scope( private fun throwDefinitionNotFound( qualifier: Qualifier?, - clazz: KClass<*> + clazz: KClass<*>, ): Nothing { val qualifierString = qualifier?.let { " and qualifier '$qualifier'" } ?: "" throw NoDefinitionFoundException( - "No definition found for type '${clazz.getFullName()}'$qualifierString. Check your Modules configuration and add missing type and/or qualifier!" + "No definition found for type '${clazz.getFullName()}'$qualifierString. Check your Modules configuration and add missing type and/or qualifier!", ) } @@ -321,7 +325,7 @@ data class Scope( instance: T, qualifier: Qualifier? = null, secondaryTypes: List> = emptyList(), - allowOverride: Boolean = true + allowOverride: Boolean = true, ) = KoinPlatformTools.synchronized(this) { _koin.instanceRegistry.declareScopedInstance( instance, @@ -329,7 +333,7 @@ data class Scope( secondaryTypes, allowOverride, scopeQualifier, - id + id, ) } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt index d29d49666..dc0fc6fb4 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Measure.kt @@ -24,7 +24,6 @@ import org.koin.mp.KoinPlatformTimeTools * @author Arnaud Giuliani */ - /** * Measure time in milliseconds for given code * @param code - code to execute @@ -51,4 +50,4 @@ inline fun measureTimedValue(code: () -> T): Pair { return Pair(value, (stop - start) / Timer.NANO_TO_MILLI) } -typealias TimeInMillis = Double \ No newline at end of file +typealias TimeInMillis = Double diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Timer.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Timer.kt index ee54e85d4..984806057 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Timer.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/time/Timer.kt @@ -8,13 +8,13 @@ import kotlin.time.toDuration class Timer { - val start : Duration = KoinPlatformTimeTools.getTimeInNanoSeconds().toDuration(DurationUnit.NANOSECONDS) - var end : Duration = ZERO + val start: Duration = KoinPlatformTimeTools.getTimeInNanoSeconds().toDuration(DurationUnit.NANOSECONDS) + var end: Duration = ZERO private set - private var time : Duration = ZERO + private var time: Duration = ZERO - fun stop(){ - if (end == ZERO){ + fun stop() { + if (end == ZERO) { end = KoinPlatformTimeTools.getTimeInNanoSeconds().toDuration(DurationUnit.NANOSECONDS) time = end - start } @@ -26,6 +26,6 @@ class Timer { companion object { const val NANO_TO_MILLI = 1_000_000.0 - fun start() : Timer = Timer() + fun start(): Timer = Timer() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt index 59f99ca5e..7f502c0bf 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/DefinitionBinding.kt @@ -75,4 +75,4 @@ infix fun KoinDefinition<*>.binds(classes: Array>): KoinDefinition<*> infix fun KoinDefinition.onClose(onClose: OnCloseCallback): KoinDefinition { factory.beanDefinition.callbacks = Callbacks(onClose) return this -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt index a07ceaa1f..9c7de2079 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt @@ -30,4 +30,4 @@ fun koinApplication(appDeclaration: KoinAppDeclaration? = null): KoinApplication appDeclaration?.invoke(koinApplication) koinApplication.createEagerInstances() return koinApplication -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt index 1db492973..12ee0a49d 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt @@ -43,4 +43,4 @@ fun module(createdAtStart: Boolean = false, moduleDeclaration: ModuleDeclaration val module = Module(createdAtStart) moduleDeclaration(module) return module -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt index 3b9dc1154..9c62643a4 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ScopeDSL.kt @@ -31,7 +31,7 @@ class ScopeDSL(val scopeQualifier: Qualifier, val module: Module) { inline fun scoped( qualifier: Qualifier? = null, - noinline definition: Definition + noinline definition: Definition, ): KoinDefinition { val def = _scopedInstanceFactory(qualifier, definition, scopeQualifier) module.indexPrimaryType(def) @@ -40,8 +40,8 @@ class ScopeDSL(val scopeQualifier: Qualifier, val module: Module) { inline fun factory( qualifier: Qualifier? = null, - noinline definition: Definition + noinline definition: Definition, ): KoinDefinition { return module.factory(qualifier, definition, scopeQualifier) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/ext/InjectProperty.kt b/core/koin-core/src/commonMain/kotlin/org/koin/ext/InjectProperty.kt index 064441086..7eff08f52 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/ext/InjectProperty.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/ext/InjectProperty.kt @@ -15,4 +15,4 @@ inline fun KMutableProperty0.inject(koin: Koin) { inline fun KMutableProperty0.inject(scope: Scope) { set(scope.get()) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt b/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt index ab188ab2a..bb1fa45df 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/ext/KClassExt.kt @@ -31,4 +31,4 @@ fun KClass<*>.saveCache(): String { return name } -private val classNames: MutableMap, String> = KoinPlatformTools.safeHashMap() \ No newline at end of file +private val classNames: MutableMap, String> = KoinPlatformTools.safeHashMap() diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt index 26b20c714..a6107b9fc 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatform.kt @@ -34,7 +34,7 @@ object KoinPlatform { * @param modules * @param level */ - fun startKoin(modules : List, level: Level){ + fun startKoin(modules: List, level: Level) { org.koin.core.context.startKoin { logger(KoinPlatformTools.defaultLogger(level)) modules(modules) @@ -44,7 +44,7 @@ object KoinPlatform { /** * Stop Current Koin instance */ - fun stopKoin(){ + fun stopKoin() { org.koin.core.context.stopKoin() } @@ -52,4 +52,4 @@ object KoinPlatform { * Retrieve Koin default instance */ fun getKoin(): Koin = KoinPlatformTools.defaultContext().get() -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt index 3705077de..266bce093 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt @@ -16,5 +16,5 @@ package org.koin.mp expect object KoinPlatformTimeTools { - fun getTimeInNanoSeconds() : Long -} \ No newline at end of file + fun getTimeInNanoSeconds(): Long +} diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt index aa3a6e062..3b38108da 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -31,4 +31,4 @@ expect object KoinPlatformTools { fun safeHashMap(): MutableMap } -expect open class Lockable() \ No newline at end of file +expect open class Lockable() diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt b/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt index 32dc68211..2764884e6 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/Components.kt @@ -12,14 +12,14 @@ class Simple { class UserComponent(val c1: ComponentInterface1) class MySingle(val id: Int) - class MyTwinSingle(val i1: Int,val i2: Int) - class MyTwinSingleMix(val i1: Int,val i2: Int, val a : ComponentA) + class MyTwinSingle(val i1: Int, val i2: Int) + class MyTwinSingleMix(val i1: Int, val i2: Int, val a: ComponentA) class MySingleWithNull(val id: Int?) - class MySingleAndNull(val a : ComponentA? = null,val ms: MySingle) + class MySingleAndNull(val a: ComponentA? = null, val ms: MySingle) class MyIntFactory(val id: Int) class MyStringFactory(val s: String) class AllFactory(val ints: MyIntFactory, val strings: MyStringFactory) - class AllFactory2(val strings: MyStringFactory,val ints: MyIntFactory) + class AllFactory2(val strings: MyStringFactory, val ints: MyIntFactory) } @Suppress("unused") @@ -32,4 +32,4 @@ class Errors { class CycleA(val b: CycleB) class CycleB(val a: CycleA) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/KoinCoreTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/KoinCoreTest.kt index 5d5dad0ba..7d1b9ea97 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/KoinCoreTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/KoinCoreTest.kt @@ -9,5 +9,4 @@ abstract class KoinCoreTest { fun after() { stopKoin() } - -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/AttributesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/AttributesTest.kt index 62699806c..6b038a3c6 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/AttributesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/AttributesTest.kt @@ -1,10 +1,10 @@ -//package org.koin.core +// package org.koin.core // -//import kotlin.test.Test -//import kotlin.test.assertEquals -//import kotlin.test.assertTrue +// import kotlin.test.Test +// import kotlin.test.assertEquals +// import kotlin.test.assertTrue // -//class AttributesTest { +// class AttributesTest { // // @Test // fun `can store & get an attribute value`() { @@ -33,4 +33,4 @@ // val string = attr.get("myKey") // assertEquals("myString2", string) // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt index 4685f518c..d7ad0e404 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt @@ -15,41 +15,41 @@ class CascadeParamTest { @Test fun consume_bad_value() { - val intParam : Int = 42 + val intParam: Int = 42 val stringParam = "_string_" val p = parametersOf(intParam, stringParam) - assertEquals(0,p.index) - assertEquals(stringParam,p.getOrNull()) - assertEquals(0,p.index) - assertEquals(intParam,p.getOrNull()) - assertEquals(stringParam,p.getOrNull()) + assertEquals(0, p.index) + assertEquals(stringParam, p.getOrNull()) + assertEquals(0, p.index) + assertEquals(intParam, p.getOrNull()) + assertEquals(stringParam, p.getOrNull()) } @Test fun parameter_array() { - val intParam : Int = 42 + val intParam: Int = 42 val stringParam = "_string_" val p = parameterArrayOf(intParam, stringParam) - assertEquals(0,p.index) + assertEquals(0, p.index) assertNull(p.getOrNull()) - assertEquals(intParam,p.get()) - assertEquals(stringParam,p.get()) - assertEquals(1,p.index) + assertEquals(intParam, p.get()) + assertEquals(stringParam, p.get()) + assertEquals(1, p.index) } @Test fun parameter_set() { - val intParam : Int = 42 + val intParam: Int = 42 val stringParam = "_string_" val p = parameterSetOf(intParam, stringParam) - assertEquals(0,p.index) - assertEquals(stringParam,p.getOrNull()) - assertEquals(intParam,p.getOrNull()) - assertEquals(stringParam,p.getOrNull()) - assertEquals(0,p.index) + assertEquals(0, p.index) + assertEquals(stringParam, p.getOrNull()) + assertEquals(intParam, p.getOrNull()) + assertEquals(stringParam, p.getOrNull()) + assertEquals(0, p.index) } @Test @@ -60,7 +60,8 @@ class CascadeParamTest { factoryOf(Simple::MyIntFactory) factoryOf(Simple::MyStringFactory) factoryOf(Simple::AllFactory) - }) + }, + ) }.koin val intParam = 42 @@ -78,7 +79,8 @@ class CascadeParamTest { factoryOf(Simple::MyIntFactory) factoryOf(Simple::MyStringFactory) factoryOf(Simple::AllFactory2) - }) + }, + ) }.koin val intParam = 42 @@ -98,9 +100,11 @@ class CascadeParamTest { factory { Simple.AllFactory( get(), - get()) + get(), + ) } - }) + }, + ) }.koin val intParam = 43 @@ -109,4 +113,4 @@ class CascadeParamTest { assertEquals(intParam, allFactory.ints.id) assertEquals(stringParam, allFactory.strings.s) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ClosedScopeAPI.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ClosedScopeAPI.kt index 024bba609..82316a742 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ClosedScopeAPI.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ClosedScopeAPI.kt @@ -16,7 +16,6 @@ class ClosedScopeAPI { class ScopeType class ScopeType2 - val scopeName = "MY_SCOPE" @Test @@ -24,11 +23,11 @@ class ClosedScopeAPI { val koin = koinApplication { printLogger() modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -49,7 +48,7 @@ class ClosedScopeAPI { scope(named()) { scoped { Simple.ComponentA() } } - } + }, ) }.koin @@ -58,7 +57,7 @@ class ClosedScopeAPI { scope1.linkTo(scope2) val all = listOf(scope1.get(), scope2.get()) val expected = scope1.getAll() - assertEquals(expected,all) + assertEquals(expected, all) } @Test @@ -66,11 +65,11 @@ class ClosedScopeAPI { val koin = startKoin { printLogger() modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -86,12 +85,12 @@ class ClosedScopeAPI { fun `get definition from current scope type`() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - scoped { Simple.ComponentB(get()) } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -104,12 +103,12 @@ class ClosedScopeAPI { fun `get definition from current factory scope type`() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - factory { Simple.ComponentB(get()) } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } + factory { Simple.ComponentB(get()) } } + }, ) }.koin @@ -122,12 +121,12 @@ class ClosedScopeAPI { fun `get definition from factory scope type`() { val koin = koinApplication { modules( - module { - single { Simple.ComponentA() } - scope(named()) { - factory { Simple.ComponentB(get()) } - } + module { + single { Simple.ComponentA() } + scope(named()) { + factory { Simple.ComponentB(get()) } } + }, ) }.koin @@ -139,7 +138,8 @@ class ClosedScopeAPI { @Test fun `get definition from current scope type - dispatched modules`() { val koin = koinApplication { - modules(listOf( + modules( + listOf( module { scope(named()) { } @@ -153,7 +153,8 @@ class ClosedScopeAPI { scope(named()) { scoped { Simple.ComponentB(get()) } } - }) + }, + ), ) }.koin @@ -166,12 +167,12 @@ class ClosedScopeAPI { fun `get definition from current scope`() { val koin = koinApplication { modules( - module { - scope(named(scopeName)) { - scoped { Simple.ComponentA() } - scoped { Simple.ComponentB(get()) } - } + module { + scope(named(scopeName)) { + scoped { Simple.ComponentA() } + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -184,12 +185,12 @@ class ClosedScopeAPI { fun `get definition from outside single`() { val koin = koinApplication { modules( - module { - single { Simple.ComponentA() } - scope(named(scopeName)) { - scoped { Simple.ComponentB(get()) } - } + module { + single { Simple.ComponentA() } + scope(named(scopeName)) { + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -202,12 +203,12 @@ class ClosedScopeAPI { fun `get definition from outside factory`() { val koin = koinApplication { modules( - module { - factory { Simple.ComponentA() } - scope(named(scopeName)) { - scoped { Simple.ComponentB(get()) } - } + module { + factory { Simple.ComponentA() } + scope(named(scopeName)) { + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -220,14 +221,14 @@ class ClosedScopeAPI { fun `bad mix definition from a scope`() { val koin = koinApplication { modules( - module { - scope(named("SCOPE_1")) { - scoped { Simple.ComponentA() } - } - scope(named("SCOPE_2")) { - scoped { Simple.ComponentB(get()) } - } + module { + scope(named("SCOPE_1")) { + scoped { Simple.ComponentA() } + } + scope(named("SCOPE_2")) { + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -244,14 +245,14 @@ class ClosedScopeAPI { fun `mix definition from a scope`() { val koin = koinApplication { modules( - module { - scope(named("SCOPE_1")) { - scoped { Simple.ComponentA() } - } - scope(named("SCOPE_2")) { - scoped { (scope: Scope) -> Simple.ComponentB(scope.get()) } - } + module { + scope(named("SCOPE_1")) { + scoped { Simple.ComponentA() } } + scope(named("SCOPE_2")) { + scoped { (scope: Scope) -> Simple.ComponentB(scope.get()) } + } + }, ) }.koin @@ -267,11 +268,11 @@ class ClosedScopeAPI { fun `definition params for scoped definitions`() { val koin = koinApplication { modules( - module { - scope(named("SCOPE_1")) { - scoped { (i: Int) -> Simple.MySingle(i) } - } + module { + scope(named("SCOPE_1")) { + scoped { (i: Int) -> Simple.MySingle(i) } } + }, ) }.koin @@ -280,4 +281,4 @@ class ClosedScopeAPI { val a = scope1.get { parametersOf(parameters) } assertEquals(parameters, a.id) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/CoroutinesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/CoroutinesTest.kt index 13fbac3ff..0e55fb48e 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/CoroutinesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/CoroutinesTest.kt @@ -1,14 +1,14 @@ -//package org.koin.core +// package org.koin.core // -//import org.koin.Simple -//import org.koin.core.context.startKoin -//import org.koin.core.context.stopKoin -//import org.koin.dsl.module -//import org.koin.test.getInstanceFactory -//import kotlin.random.Random -//import kotlin.test.Test +// import org.koin.Simple +// import org.koin.core.context.startKoin +// import org.koin.core.context.stopKoin +// import org.koin.dsl.module +// import org.koin.test.getInstanceFactory +// import kotlin.random.Random +// import kotlin.test.Test // -//class CoroutinesTest { +// class CoroutinesTest { // // @Test // fun `KoinApp with coroutines gets`() = runBlocking { @@ -53,4 +53,4 @@ // println("thread sleep $timer") // delay(timer) // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt index 44a522bdb..7db2b9dc9 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt @@ -16,7 +16,6 @@ class DeclareInstanceTest { @Test fun `can declare a single on the fly`() { - val koin = koinApplication { printLogger() modules(emptyList()) @@ -31,12 +30,13 @@ class DeclareInstanceTest { @Test fun `can't declare a single on the fly`() { - val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + }, + ) }.koin val a = Simple.ComponentA() @@ -51,12 +51,13 @@ class DeclareInstanceTest { @Test fun `can declare and override a single on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - single { Simple.MySingle(1) } - }) + modules( + module { + single { Simple.MySingle(1) } + }, + ) }.koin val a = Simple.MySingle(2) @@ -67,12 +68,13 @@ class DeclareInstanceTest { @Test fun `can declare and override a single on the fly when override is set to false`() { - val koin = koinApplication { printLogger() - modules(module { - single { Simple.MySingle(1) } - }) + modules( + module { + single { Simple.MySingle(1) } + }, + ) }.koin val a = Simple.MySingle(2) @@ -87,12 +89,13 @@ class DeclareInstanceTest { @Test fun `can declare a single with qualifier on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - single { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + }, + ) }.koin val a = Simple.ComponentA() @@ -105,13 +108,14 @@ class DeclareInstanceTest { @Test fun `can declare and override a single with qualifier on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - single { Simple.ComponentA() } - single(named("another_a")) { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + single(named("another_a")) { Simple.ComponentA() } + }, + ) }.koin val a = Simple.ComponentA() @@ -124,7 +128,6 @@ class DeclareInstanceTest { @Test fun `can declare a single with secondary type on the fly`() { - val koin = koinApplication { printLogger() }.koin @@ -139,7 +142,6 @@ class DeclareInstanceTest { @Test fun `can override a single on the fly`() { - val koin = koinApplication { printLogger(Level.DEBUG) modules(emptyList()) @@ -174,14 +176,15 @@ class DeclareInstanceTest { @Test fun `can declare a scoped on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - scope(named("Session")) { - scoped { Simple.ComponentB(get()) } - } - }) + modules( + module { + scope(named("Session")) { + scoped { Simple.ComponentB(get()) } + } + }, + ) }.koin val a = Simple.ComponentA() @@ -195,14 +198,15 @@ class DeclareInstanceTest { @Test fun `can declare a scoped on the fly with primary type`() { - val koin = koinApplication { printLogger() - modules(module { - scope(named("Session")) { - scoped { B() } - } - }) + modules( + module { + scope(named("Session")) { + scoped { B() } + } + }, + ) }.koin val a = Simple.Component2() @@ -215,14 +219,15 @@ class DeclareInstanceTest { @Test fun `can't declare a scoped-single on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - scope(named("Session")) { - scoped { B() } - } - }) + modules( + module { + scope(named("Session")) { + scoped { B() } + } + }, + ) }.koin val a = Simple.ComponentA() @@ -240,14 +245,15 @@ class DeclareInstanceTest { @Test fun `can declare a other scoped on the fly`() { - val koin = koinApplication { printLogger() - modules(module { - scope(named("Session")) { - scoped { B() } - } - }) + modules( + module { + scope(named("Session")) { + scoped { B() } + } + }, + ) }.koin val a = Simple.ComponentA() @@ -258,4 +264,4 @@ class DeclareInstanceTest { session2.get() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/DefinitionOverrideTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/DefinitionOverrideTest.kt index c6e1b1aa4..042d13634 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/DefinitionOverrideTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/DefinitionOverrideTest.kt @@ -12,15 +12,14 @@ class DefinitionOverrideTest { @Test fun `allow overrides by type`() { - val app = koinApplication { modules( - module { - single { Simple.Component2() } - }, - module { - single { Simple.Component1() } - } + module { + single { Simple.Component2() } + }, + module { + single { Simple.Component1() } + }, ) } @@ -32,16 +31,16 @@ class DefinitionOverrideTest { fun `allow overrides by type - scope`() { val app = koinApplication { modules( - module { - scope { - scoped { Simple.Component2() } - } - }, + module { + scope { + scoped { Simple.Component2() } + } + }, module { scope { scoped { Simple.Component1() } } - } + }, ) } val scope = app.koin.createScope("_ID_") @@ -50,19 +49,18 @@ class DefinitionOverrideTest { @Test fun `allow overrides by name`() { - val app = koinApplication { modules( - module { - single(named("DEF")) { Simple.Component2() } - }, - module { - single(named("DEF")) { Simple.Component1() } - } + module { + single(named("DEF")) { Simple.Component2() } + }, + module { + single(named("DEF")) { Simple.Component1() } + }, ) } app.assertDefinitionsCount(1) assertTrue(app.koin.get(named("DEF")) is Simple.Component1) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt index b5a63bde2..dd5b3683f 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt @@ -1,8 +1,5 @@ package org.koin.core -import kotlin.test.fail -import kotlin.test.Test -import kotlin.test.* import org.koin.KoinCoreTest import org.koin.Simple import org.koin.core.context.* @@ -16,6 +13,9 @@ import org.koin.dsl.koinApplication import org.koin.dsl.module import org.koin.mp.KoinPlatformTools import org.koin.test.getBeanDefinition +import kotlin.test.* +import kotlin.test.Test +import kotlin.test.fail class DynamicModulesTest : KoinCoreTest() { @@ -248,7 +248,7 @@ class DynamicModulesTest : KoinCoreTest() { assertEquals( 42, - KoinPlatformTools.defaultContext().get().get { parametersOf(42) }.id + KoinPlatformTools.defaultContext().get().get { parametersOf(42) }.id, ) unloadKoinModules(module) @@ -256,7 +256,7 @@ class DynamicModulesTest : KoinCoreTest() { assertEquals( 24, - KoinPlatformTools.defaultContext().get().get { parametersOf(24) }.id + KoinPlatformTools.defaultContext().get().get { parametersOf(24) }.id, ) stopKoin() @@ -346,4 +346,4 @@ class DynamicModulesTest : KoinCoreTest() { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ErrorCheckTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ErrorCheckTest.kt index 69d2faf27..7e96c68dc 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ErrorCheckTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ErrorCheckTest.kt @@ -27,9 +27,11 @@ class ErrorCheckTest { @Test fun `unknown linked dependency`() { val app = koinApplication { - modules(module { - single { Simple.ComponentB(get()) } - }) + modules( + module { + single { Simple.ComponentB(get()) } + }, + ) } try { app.koin.get() @@ -42,9 +44,11 @@ class ErrorCheckTest { @Test fun `error while creating instance`() { val app = koinApplication { - modules(module { - single { Errors.Boom() } - }) + modules( + module { + single { Errors.Boom() } + }, + ) } try { @@ -73,4 +77,4 @@ class ErrorCheckTest { // e.printStackTrace() // } // } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/GenericDeclarationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/GenericDeclarationTest.kt index 39d70394b..37b7c2dd2 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/GenericDeclarationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/GenericDeclarationTest.kt @@ -1,11 +1,11 @@ package org.koin.core -import kotlin.test.* import org.koin.core.error.NoBeanDefFoundException import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.* class GenericDeclarationTest { @@ -44,4 +44,4 @@ class GenericDeclarationTest { }.koin return koin } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/GlobalToScopeTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/GlobalToScopeTest.kt index 49d2888a7..7aea1558d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/GlobalToScopeTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/GlobalToScopeTest.kt @@ -1,14 +1,14 @@ package org.koin.core -import kotlin.test.assertEquals -import kotlin.test.fail -import kotlin.test.Test import org.koin.Simple import org.koin.core.error.NoBeanDefFoundException import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.fail class GlobalToScopeTest { @@ -17,11 +17,11 @@ class GlobalToScopeTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -38,13 +38,13 @@ class GlobalToScopeTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.ComponentB(get()) } + module { + single { Simple.ComponentB(get()) } - scope(named()) { - scoped { Simple.ComponentA() } - } + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -58,23 +58,22 @@ class GlobalToScopeTest { @Test fun `get scoped dependency without scope from single`() { - val scopeId = "MY_SCOPE_ID" val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.ComponentB(getScope(scopeId).get()) } + module { + single { Simple.ComponentB(getScope(scopeId).get()) } - scope(named()) { - scoped { Simple.ComponentA() } - } + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin val scope = koin.createScope(scopeId, named()) assertEquals(koin.get().a, scope.get()) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceReleaseTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceReleaseTest.kt index 518d7956a..9e8bca289 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceReleaseTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceReleaseTest.kt @@ -1,13 +1,13 @@ package org.koin.core -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.Simple import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.core.parameter.parametersOf import org.koin.dsl.module import org.koin.mp.KoinPlatformTools +import kotlin.test.Test +import kotlin.test.assertEquals class InstanceReleaseTest { @@ -36,4 +36,4 @@ class InstanceReleaseTest { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceResolutionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceResolutionTest.kt index fb3c537c1..4a9576c92 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceResolutionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/InstanceResolutionTest.kt @@ -1,24 +1,24 @@ package org.koin.core -import kotlin.test.* -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.dsl.bind import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.* +import kotlin.test.Test class InstanceResolutionTest { @Test fun `can resolve a single`() { - val app = koinApplication { modules( - module { - single { Simple.ComponentA() } - }) + module { + single { Simple.ComponentA() } + }, + ) } val koin = app.koin @@ -30,13 +30,13 @@ class InstanceResolutionTest { @Test fun `can resolve all ComponentInterface1`() { - val koin = koinApplication { modules( - module { - single { Simple.Component1() } bind Simple.ComponentInterface1::class - single { Simple.Component2() } bind Simple.ComponentInterface1::class - }) + module { + single { Simple.Component1() } bind Simple.ComponentInterface1::class + single { Simple.Component2() } bind Simple.ComponentInterface1::class + }, + ) }.koin val a1: Simple.Component1 = koin.get() @@ -44,18 +44,18 @@ class InstanceResolutionTest { val instances = koin.getAll() - assertEquals(2,instances.size) + assertEquals(2, instances.size) assertTrue(instances.contains(a1) && instances.contains(a2)) } @Test fun `cannot resolve a single`() { - val app = koinApplication { printLogger(Level.DEBUG) modules( - module { - }) + module { + }, + ) } val koin = app.koin @@ -66,12 +66,12 @@ class InstanceResolutionTest { @Test fun `cannot inject a single`() { - val app = koinApplication { printLogger(Level.DEBUG) modules( - module { - }) + module { + }, + ) } val koin = app.koin @@ -82,12 +82,12 @@ class InstanceResolutionTest { @Test fun `can lazy resolve a single`() { - val app = koinApplication { modules( - module { - single { Simple.ComponentA() } - }) + module { + single { Simple.ComponentA() } + }, + ) } val koin = app.koin @@ -99,14 +99,14 @@ class InstanceResolutionTest { @Test fun `can resolve a singles by name`() { - val app = koinApplication { modules( - module { - val componentA = Simple.ComponentA() - single(named("A")) { componentA } - single(named("B")) { componentA } - }) + module { + val componentA = Simple.ComponentA() + single(named("A")) { componentA } + single(named("B")) { componentA } + }, + ) } val koin = app.koin @@ -118,14 +118,14 @@ class InstanceResolutionTest { @Test fun `can resolve a factory by name`() { - val app = koinApplication { modules( - module { - val componentA = Simple.ComponentA() - factory(named("A")) { componentA } - factory(named("B")) { componentA } - }) + module { + val componentA = Simple.ComponentA() + factory(named("A")) { componentA } + factory(named("B")) { componentA } + }, + ) } val koin = app.koin @@ -137,12 +137,12 @@ class InstanceResolutionTest { @Test fun `can resolve a factory`() { - val app = koinApplication { modules( - module { - factory { Simple.ComponentA() } - }) + module { + factory { Simple.ComponentA() } + }, + ) } val koin = app.koin @@ -154,13 +154,13 @@ class InstanceResolutionTest { @Test fun `should resolve default`() { - val app = koinApplication { modules( - module { - single(named("2")) { Simple.Component2() } - single { Simple.Component1() } - }) + module { + single(named("2")) { Simple.Component2() } + single { Simple.Component1() } + }, + ) } val koin = app.koin @@ -176,17 +176,16 @@ class InstanceResolutionTest { @Test fun `should getAll - no duplicates`() { - val koinModule = module { - factory{ B() } bind A::class - factory{ C() } bind A::class + factory { B() } bind A::class + factory { C() } bind A::class } val koin = koinApplication { modules(koinModule) }.koin - val list = koin.getAll() + val list = koin.getAll() assert(list.size == 2) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/KoinApplicationIsolationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/KoinApplicationIsolationTest.kt index 445cd3e43..eccc04a9b 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/KoinApplicationIsolationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/KoinApplicationIsolationTest.kt @@ -1,7 +1,5 @@ package org.koin.core -import kotlin.test.* -import kotlin.test.Test import org.koin.Simple import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin @@ -11,6 +9,8 @@ import org.koin.dsl.koinApplication import org.koin.dsl.module import org.koin.mp.KoinPlatformTools import org.koin.test.getBeanDefinition +import kotlin.test.* +import kotlin.test.Test class KoinApplicationIsolationTest { @@ -20,14 +20,16 @@ class KoinApplicationIsolationTest { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val app2 = koinApplication { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val a1: Simple.ComponentA = app1.koin.get() @@ -43,13 +45,15 @@ class KoinApplicationIsolationTest { modules( module { single(createdAtStart = true) { Simple.ComponentA() } - }) + }, + ) createEagerInstances() } app.getBeanDefinition(Simple.ComponentA::class)!! - assertTrue(app.koin.scopeRegistry.rootScope._koin.instanceRegistry.instances.values - .first { instanceFactory -> instanceFactory.beanDefinition.primaryType == Simple.ComponentA::class }.isCreated() + assertTrue( + app.koin.scopeRegistry.rootScope._koin.instanceRegistry.instances.values + .first { instanceFactory -> instanceFactory.beanDefinition.primaryType == Simple.ComponentA::class }.isCreated(), ) } @@ -59,14 +63,16 @@ class KoinApplicationIsolationTest { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val app2 = koinApplication { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val a1: Simple.ComponentA = KoinPlatformTools.defaultContext().get().get() @@ -118,17 +124,24 @@ class KoinApplicationIsolationTest { @Test fun `create multiple context without named qualifier`() { val koinA = koinApplication { - modules(listOf(module { - single { ModelA() } - }, module { - single { ModelB(get()) } - })) + modules( + listOf( + module { + single { ModelA() } + }, + module { + single { ModelB(get()) } + }, + ), + ) } val koinB = koinApplication { - modules(module { - single { ModelC() } - }) + modules( + module { + single { ModelC() } + }, + ) } koinA.koin.get() @@ -155,4 +168,4 @@ class KoinApplicationIsolationTest { class ModelA class ModelB(val a: ModelA) class ModelC -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/LazyInstanceResolution.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/LazyInstanceResolution.kt index ce00ff68c..8526e3a4d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/LazyInstanceResolution.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/LazyInstanceResolution.kt @@ -1,21 +1,21 @@ package org.koin.core -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.Test import kotlin.test.assertEquals class LazyInstanceResolution { @Test fun `can lazy resolve a single`() { - val app = koinApplication { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val koin = app.koin @@ -32,15 +32,19 @@ class LazyInstanceResolution { printLogger(Level.DEBUG) modules( module(createdAtStart = true) { - single { i++; Simple.ComponentA() } - }) + single { + i++ + Simple.ComponentA() + } + }, + ) createEagerInstances() } val koin = app.koin - assertEquals(1,i) + assertEquals(1, i) koin.get() - assertEquals(1,i) + assertEquals(1, i) } @Test @@ -50,15 +54,19 @@ class LazyInstanceResolution { printLogger(Level.DEBUG) modules( module(createdAtStart = true) { - single { i++; Simple.ComponentA() } - }) + single { + i++ + Simple.ComponentA() + } + }, + ) createEagerInstances() } val koin = app.koin - assertEquals(1,i) + assertEquals(1, i) koin.createEagerInstances() - assertEquals(1,i) + assertEquals(1, i) } @Test @@ -68,19 +76,26 @@ class LazyInstanceResolution { printLogger(Level.DEBUG) modules( module(createdAtStart = true) { - single { i++; Simple.ComponentA() } + single { + i++ + Simple.ComponentA() + } }, module(createdAtStart = true) { - single { i++; Simple.ComponentB(get()) } - }) + single { + i++ + Simple.ComponentB(get()) + } + }, + ) createEagerInstances() } val koin = app.koin - assertEquals(2,i) + assertEquals(2, i) koin.get() koin.get() - assertEquals(2,i) + assertEquals(2, i) } @Test @@ -90,19 +105,26 @@ class LazyInstanceResolution { printLogger(Level.DEBUG) modules( module { - single { i++; Simple.ComponentA() } + single { + i++ + Simple.ComponentA() + } }, module(createdAtStart = true) { - single { i++; Simple.ComponentB(get()) } - }) + single { + i++ + Simple.ComponentB(get()) + } + }, + ) createEagerInstances() } val koin = app.koin - assertEquals(2,i) + assertEquals(2, i) koin.get() koin.get() - assertEquals(2,i) + assertEquals(2, i) } @Test @@ -115,6 +137,6 @@ class LazyInstanceResolution { } } - assertEquals(1,module.eagerInstances.size) + assertEquals(1, module.eagerInstances.size) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/MultipleModuleDeclarationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/MultipleModuleDeclarationTest.kt index 241ae23e7..9f531a926 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/MultipleModuleDeclarationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/MultipleModuleDeclarationTest.kt @@ -1,25 +1,27 @@ package org.koin.core -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.Simple import org.koin.dsl.koinApplication import org.koin.dsl.module import org.koin.test.assertDefinitionsCount +import kotlin.test.Test +import kotlin.test.assertEquals class MultipleModuleDeclarationTest { @Test fun `run with DI with several modules`() { - val app = koinApplication { - modules(listOf( - module { - single { Simple.ComponentA() } - }, - module { - single { Simple.ComponentB(get()) } - })) + modules( + listOf( + module { + single { Simple.ComponentA() } + }, + module { + single { Simple.ComponentB(get()) } + }, + ), + ) } app.assertDefinitionsCount(2) @@ -27,15 +29,17 @@ class MultipleModuleDeclarationTest { @Test fun `resolve DI with several modules`() { - val app = koinApplication { - modules(listOf( - module { - single { Simple.ComponentA() } - }, - module { - single { Simple.ComponentB(get()) } - })) + modules( + listOf( + module { + single { Simple.ComponentA() } + }, + module { + single { Simple.ComponentB(get()) } + }, + ), + ) } val koin = app.koin @@ -44,4 +48,4 @@ class MultipleModuleDeclarationTest { assertEquals(a, b.a) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/MultithreadTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/MultithreadTest.kt index 0534005bc..ce70e2f7d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/MultithreadTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/MultithreadTest.kt @@ -1,15 +1,15 @@ -//package org.koin.core +// package org.koin.core // -//import kotlin.test.Test -//import org.koin.Simple -//import org.koin.dsl.koinApplication -//import org.koin.dsl.module -//import org.koin.test.getInstanceFactory -//import kotlin.random.Random +// import kotlin.test.Test +// import org.koin.Simple +// import org.koin.dsl.koinApplication +// import org.koin.dsl.module +// import org.koin.test.getInstanceFactory +// import kotlin.random.Random // -//const val MAX_TIME = 1000L +// const val MAX_TIME = 1000L // -//class MultithreadTest { +// class MultithreadTest { // // @Test // fun `multi thread get`() { @@ -57,4 +57,4 @@ // println("thread sleep $timer") // Thread.sleep(timer) // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ObjectScopeTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ObjectScopeTest.kt index c2ab52b55..8e5bb4c05 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ObjectScopeTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ObjectScopeTest.kt @@ -1,7 +1,5 @@ package org.koin.core -import kotlin.test.* -import kotlin.test.Test import org.koin.Simple import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin @@ -9,24 +7,28 @@ import org.koin.core.context.stopKoin import org.koin.core.logger.Level import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.* +import kotlin.test.Test class ObjectScopeTest { @AfterTest - fun after(){ + fun after() { stopKoin() } @Test fun `typed scope`() { val koin = koinApplication { - modules(module { - single { A() } - scope { - scoped { B() } - scoped { C() } - } - }) + modules( + module { + single { A() } + scope { + scoped { B() } + scoped { C() } + } + }, + ) }.koin assertNotNull(koin.get()) @@ -38,16 +40,17 @@ class ObjectScopeTest { fun `typed scope and source`() { val koin = startKoin { printLogger(Level.DEBUG) - modules(module { - single { A() } - scope { - scoped { BofA(get()) } - - } - scope { - scoped { CofB(get()) } - } - }) + modules( + module { + single { A() } + scope { + scoped { BofA(get()) } + } + scope { + scoped { CofB(get()) } + } + }, + ) }.koin val a = koin.get() @@ -61,16 +64,17 @@ class ObjectScopeTest { fun `typed scope and source with get`() { val koin = startKoin { printLogger(Level.DEBUG) - modules(module { - single { A() } - scope { - scoped { BofA(get()) } - - } - scope { - scoped { CofB(get()) } - } - }) + modules( + module { + single { A() } + scope { + scoped { BofA(get()) } + } + scope { + scoped { CofB(get()) } + } + }, + ) }.koin val a = koin.get() @@ -83,13 +87,15 @@ class ObjectScopeTest { @Test fun `scope from instance object`() { val koin = startKoin { - modules(module { - single { A() } - scope { - scoped { B() } - scoped { C() } - } - }) + modules( + module { + single { A() } + scope { + scoped { B() } + scoped { C() } + } + }, + ) }.koin val a = koin.get() @@ -115,13 +121,15 @@ class ObjectScopeTest { @Test fun `scope property`() { val koin = startKoin { - modules(module { - single { A() } - scope { - scoped { B() } - scoped { C() } - } - }) + modules( + module { + single { A() } + scope { + scoped { B() } + scoped { C() } + } + }, + ) }.koin val a = koin.get() @@ -135,7 +143,6 @@ class ObjectScopeTest { try { a.scope.get() } catch (e: Exception) { - } } @@ -148,7 +155,8 @@ class ObjectScopeTest { scope { scoped { B() } } - }) + }, + ) }.koin val a = koin.get() @@ -177,7 +185,8 @@ class ObjectScopeTest { scope { scoped { C() } } - }) + }, + ) }.koin var a = koin.get() @@ -208,7 +217,8 @@ class ObjectScopeTest { scope { scoped { C() } } - }) + }, + ) }.koin val a = koin.get() @@ -231,7 +241,8 @@ class ObjectScopeTest { scope { scoped { C() } } - }) + }, + ) }.koin val a = koin.get() @@ -258,10 +269,10 @@ class ObjectScopeTest { scope { scoped { Simple.ComponentA() } } - }) + }, + ) }.koin - val scopeA = koin.createScope() val scopeB = koin.createScope() val scopeC = koin.createScope() @@ -272,7 +283,7 @@ class ObjectScopeTest { val compb_scopeB = scopeB.get() assertNotEquals(compb_scopeA, compb_scopeB) - //shared ComponentA instance + // shared ComponentA instance assertEquals(compb_scopeA.a, compb_scopeB.a) } @@ -288,10 +299,10 @@ class ObjectScopeTest { scope { scoped { B() } } - }) + }, + ) }.koin - val a = koin.get() try { koin.scopeRegistry.rootScope.linkTo(a.scope) @@ -300,5 +311,4 @@ class ObjectScopeTest { e.printStackTrace() } } - -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/OpenCloseScopeInstanceTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/OpenCloseScopeInstanceTest.kt index 5dbbfc97e..01644e3b0 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/OpenCloseScopeInstanceTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/OpenCloseScopeInstanceTest.kt @@ -1,13 +1,13 @@ package org.koin.core -import kotlin.test.assertEquals -import kotlin.test.fail -import kotlin.test.Test import org.koin.Simple import org.koin.core.error.NoBeanDefFoundException import org.koin.core.qualifier.named import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.fail class OpenCloseScopeInstanceTest { @@ -17,11 +17,11 @@ class OpenCloseScopeInstanceTest { fun `get definition from a scope`() { val koin = koinApplication { modules( - module { - scope(scopeName) { - scoped { Simple.ComponentA() } - } + module { + scope(scopeName) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -33,11 +33,11 @@ class OpenCloseScopeInstanceTest { fun `can't get definition from another scope`() { val koin = koinApplication { modules( - module { - scope(scopeName) { - scoped { Simple.ComponentA() } - } + module { + scope(scopeName) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -54,12 +54,12 @@ class OpenCloseScopeInstanceTest { fun `get definition from scope and out of scope`() { val koin = koinApplication { modules( - module { - scope(scopeName) { - scoped { Simple.ComponentA() } - scoped { Simple.ComponentB(get()) } - } + module { + scope(scopeName) { + scoped { Simple.ComponentA() } + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -75,14 +75,14 @@ class OpenCloseScopeInstanceTest { val scope1Name = named("SCOPE_1") val koin = koinApplication { modules( - module { - scope(scope1Name) { - scoped { B() } - } - scope(named("SCOPE_2")) { - scoped { Simple.ComponentA() } - } + module { + scope(scope1Name) { + scoped { B() } + } + scope(named("SCOPE_2")) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -94,4 +94,4 @@ class OpenCloseScopeInstanceTest { e.printStackTrace() } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt index 7cf5df299..e675c53eb 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/OverrideAndCreateatStartTest.kt @@ -41,18 +41,18 @@ class OverrideAndCreateatStartTest { } @AfterTest - fun after(){ + fun after() { stopKoin() } @Test - fun testMe(){ + fun testMe() { startKoin { printLogger(Level.DEBUG) - modules(moduleA+moduleB) + modules(moduleA + moduleB) } assertTrue(count == 1) assertTrue(created == "SomeClassB") } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt index c1eb60233..de4c68c9f 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt @@ -14,13 +14,13 @@ import kotlin.test.assertTrue class ParameterStackTest { @Test - fun test_parameterstack_is_empty(){ + fun test_parameterstack_is_empty() { val koin = koinApplication { printLogger(Level.DEBUG) modules( module { - factory { (id : String) -> Simple.MyStringFactory(id) } - } + factory { (id: String) -> Simple.MyStringFactory(id) } + }, ) }.koin @@ -30,4 +30,4 @@ class ParameterStackTest { assertTrue(koin.scopeRegistry.rootScope._parameterStack.isEmpty()) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersHolderTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersHolderTest.kt index e04f1bf59..daf2d9b0c 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersHolderTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersHolderTest.kt @@ -123,4 +123,4 @@ class ParametersHolderTest { val p = parametersOf(Simple.Component1()) assertNotNull(p.get()) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt index f6c37a3e4..46d163589 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt @@ -23,12 +23,12 @@ class ParametersInjectionTest { @Test fun `can create a single with parameters`() { - val app = koinApplication { modules( module { single { (i: Int) -> Simple.MySingle(i) } - }) + }, + ) } val koin = app.koin @@ -40,21 +40,26 @@ class ParametersInjectionTest { @OptIn(KoinInternalApi::class) @Test fun inject_param_get_or_null() { - - ensureCanInjectParam(module { - singleOf(Simple::MySingle) - single { Simple.MySingleAndNull(getOrNull(), get()) } - }) - - ensureCanInjectParam(module { - singleOf(Simple::MySingle) - single { (i :Int) -> Simple.MySingleAndNull(getOrNull(), get { parametersOf(i) }) } - }) - - ensureCanInjectParam(module { - singleOf(Simple::MySingle) - single { (i :Int) -> Simple.MySingleAndNull(getOrNull{ parametersOf(i) }, get { parametersOf(i) }) } - }) + ensureCanInjectParam( + module { + singleOf(Simple::MySingle) + single { Simple.MySingleAndNull(getOrNull(), get()) } + }, + ) + + ensureCanInjectParam( + module { + singleOf(Simple::MySingle) + single { (i: Int) -> Simple.MySingleAndNull(getOrNull(), get { parametersOf(i) }) } + }, + ) + + ensureCanInjectParam( + module { + singleOf(Simple::MySingle) + single { (i: Int) -> Simple.MySingleAndNull(getOrNull { parametersOf(i) }, get { parametersOf(i) }) } + }, + ) } @OptIn(KoinInternalApi::class) @@ -62,7 +67,7 @@ class ParametersInjectionTest { val app = koinApplication { printLogger(Level.DEBUG) modules( - module1 + module1, ) } @@ -78,12 +83,13 @@ class ParametersInjectionTest { val app = koinApplication { modules( module { - single { p -> Simple.MyTwinSingle(p[0],p[1]) } - }) + single { p -> Simple.MyTwinSingle(p[0], p[1]) } + }, + ) } val koin = app.koin - val a: Simple.MyTwinSingle = koin.get { parametersOf(42,24) } + val a: Simple.MyTwinSingle = koin.get { parametersOf(42, 24) } assertEquals(42, a.i1) assertEquals(24, a.i2) @@ -94,12 +100,13 @@ class ParametersInjectionTest { val app = koinApplication { modules( module { - single { (a : Int,b : Int) -> Simple.MyTwinSingle(a,b) } - }) + single { (a: Int, b: Int) -> Simple.MyTwinSingle(a, b) } + }, + ) } val koin = app.koin - val a: Simple.MyTwinSingle = koin.get { parametersOf(42,24) } + val a: Simple.MyTwinSingle = koin.get { parametersOf(42, 24) } assertEquals(42, a.i1) assertEquals(24, a.i2) @@ -111,11 +118,12 @@ class ParametersInjectionTest { modules( module { singleOf(Simple::MyTwinSingle) - }) + }, + ) } val koin = app.koin - val a: Simple.MyTwinSingle = koin.get { parametersOf(1,2) } + val a: Simple.MyTwinSingle = koin.get { parametersOf(1, 2) } assertEquals(1, a.i1) assertEquals(2, a.i2) @@ -129,11 +137,12 @@ class ParametersInjectionTest { module { single { Simple.ComponentA() } singleOf(Simple::MyTwinSingleMix) - }) + }, + ) } val koin = app.koin - val a: Simple.MyTwinSingleMix = koin.get { parametersOf(1,2) } + val a: Simple.MyTwinSingleMix = koin.get { parametersOf(1, 2) } assertEquals(1, a.i1) assertEquals(2, a.i2) @@ -141,12 +150,12 @@ class ParametersInjectionTest { @Test fun nullable_injection_param() { - val app = koinApplication { modules( module { single { p -> Simple.MySingleWithNull(p.getOrNull()) } - }) + }, + ) } val koin = app.koin @@ -159,13 +168,13 @@ class ParametersInjectionTest { @Test fun nullable_injection_param_in_graph() { - val app = koinApplication { printLogger(Level.DEBUG) modules( module { single { p -> MyOptionalSingle(p.get(), getOrNull()) } - }) + }, + ) } val koin = app.koin @@ -178,12 +187,12 @@ class ParametersInjectionTest { @Test fun `can create a single with parameters - using param object resolution`() { - val app = koinApplication { modules( module { single { params -> Simple.MySingle(params.get()) } - }) + }, + ) } val koin = app.koin @@ -194,12 +203,12 @@ class ParametersInjectionTest { @Test fun `can create a single with parameters - using graph resolution`() { - val app = koinApplication { modules( module { single { Simple.MySingle(get()) } - }) + }, + ) } val koin = app.koin @@ -210,13 +219,13 @@ class ParametersInjectionTest { @Test fun `can create a single with parameters - using double graph resolution`() { - val app = koinApplication { modules( module { single { Simple.MySingle(get()) } single(named("2")) { Simple.MySingle(get()) } - }) + }, + ) } val koin = app.koin assertEquals(42, koin.get { parametersOf(42) }.id) @@ -225,13 +234,13 @@ class ParametersInjectionTest { @Test fun `can create a single with nullable parameters`() { - val app = koinApplication { printLogger(Level.DEBUG) modules( module { single { (i: Int?) -> Simple.MySingleWithNull(i) } - }) + }, + ) } val koin = app.koin @@ -242,13 +251,13 @@ class ParametersInjectionTest { @Test fun `can get a single created with parameters - no need of give it again`() { - val app = koinApplication { printLogger(Level.DEBUG) modules( module { single { (i: Int) -> Simple.MySingle(i) } - }) + }, + ) } val koin = app.koin @@ -263,12 +272,12 @@ class ParametersInjectionTest { @Test fun `can create factories with params`() { - val app = koinApplication { modules( module { factory { (i: Int) -> Simple.MyIntFactory(i) } - }) + }, + ) } val koin = app.koin @@ -290,9 +299,11 @@ class ParametersInjectionTest { factory { (i: Int, s: String) -> Simple.AllFactory( get { parametersOf(i) }, - get { parametersOf(s) }) + get { parametersOf(s) }, + ) } - }) + }, + ) }.koin val f = koin.get { parametersOf(42, "42") } @@ -308,7 +319,8 @@ class ParametersInjectionTest { modules( module { single { Simple.MySingle(it.get()) } - }) + }, + ) } val koin = app.koin @@ -328,9 +340,11 @@ class ParametersInjectionTest { factory { (i: Int, s: String) -> Simple.AllFactory( get { parametersOf(i) }, - get { parametersOf(s) }) + get { parametersOf(s) }, + ) } - }) + }, + ) }.koin val f = koin.get { parametersOf(42, "42") } @@ -346,7 +360,8 @@ class ParametersInjectionTest { modules( module { factory { (i: Int) -> Simple.MyIntFactory(i) } - }) + }, + ) } val koin = app.koin @@ -362,4 +377,4 @@ class ParametersInjectionTest { assertEquals(range.map { it }, values.map { it.id }) } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeAPITest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeAPITest.kt index 183604716..80d00a202 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeAPITest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeAPITest.kt @@ -1,7 +1,5 @@ package org.koin.core -import kotlin.test.* -import kotlin.test.Test import org.koin.Simple import org.koin.core.error.NoScopeDefFoundException import org.koin.core.error.ScopeAlreadyCreatedException @@ -10,6 +8,8 @@ import org.koin.core.scope.Scope import org.koin.core.scope.ScopeCallback import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.* +import kotlin.test.Test class ScopeAPITest { @@ -20,7 +20,7 @@ class ScopeAPITest { scope(scopeKey) { scoped { A() } } - } + }, ) }.koin @@ -54,7 +54,6 @@ class ScopeAPITest { @Test fun `can create scope instance with unknown scope def`() { - try { koin.createScope("myScope", named("a_scope")) } catch (e: NoScopeDefFoundException) { @@ -64,7 +63,6 @@ class ScopeAPITest { @Test fun `create scope instance with scope def`() { - assertNotNull(koin.createScope("myScope", scopeKey)) } @@ -81,7 +79,6 @@ class ScopeAPITest { @Test fun `can't get a closed scope`() { - val scope = koin.createScope("myScope1", scopeKey) scope.close() try { @@ -94,7 +91,6 @@ class ScopeAPITest { @Test fun `reuse a closed scope`() { - val scope = koin.createScope("myScope1", scopeKey) scope.close() try { diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeShadowingTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeShadowingTest.kt index 3892bc421..1a53deda3 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeShadowingTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeShadowingTest.kt @@ -1,12 +1,12 @@ package org.koin.core -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.Test +import kotlin.test.assertEquals class ScopeShadowingTest { @@ -15,13 +15,13 @@ class ScopeShadowingTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.MySingle(24) } + module { + single { Simple.MySingle(24) } - scope(named()) { - scoped { Simple.MySingle(42) } - } + scope(named()) { + scoped { Simple.MySingle(42) } } + }, ) }.koin @@ -29,7 +29,5 @@ class ScopeShadowingTest { assertEquals(42, scope.get().id) assertEquals(24, koin.get().id) - } - -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeTest.kt index 2ddd581a3..bfcf45d0b 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ScopeTest.kt @@ -20,6 +20,7 @@ class ScopeTest { private class A private class B + @Test fun scope_component() { abstract class SuperClass : KoinScopeComponent { @@ -39,7 +40,7 @@ class ScopeTest { scope { scopedOf(::B) } - } + }, ) } @@ -54,11 +55,11 @@ class ScopeTest { val koin = koinApplication { printLogger() modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -83,18 +84,18 @@ class ScopeTest { val koin = koinApplication { printLogger() modules( - module { - factory { - factoryCallCounter++ - Simple.ComponentA() - } - scope(named()) { - scoped { B() } - } + module { + factory { + factoryCallCounter++ + Simple.ComponentA() } + scope(named()) { + scoped { B() } + } + }, ) } - .koin + .koin val scope = koin.createScope("scope1", named()) scope.get() @@ -112,11 +113,11 @@ class ScopeTest { val koin = koinApplication { modules( - module { - scope(scopeKey) { - scoped { Simple.ComponentA() } - } + module { + scope(scopeKey) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -142,10 +143,10 @@ class ScopeTest { val koin = koinApplication { modules( - module { - scope(scopeKey) { - } + module { + scope(scopeKey) { } + }, ) }.koin @@ -162,14 +163,14 @@ class ScopeTest { val koin = koinApplication { modules( - module { - scope(scopeKey) { - scoped { Simple.ComponentA() } - } - scope(scopeKey) { - scoped { Simple.ComponentB(get()) } - } + module { + scope(scopeKey) { + scoped { Simple.ComponentA() } + } + scope(scopeKey) { + scoped { Simple.ComponentB(get()) } } + }, ) }.koin @@ -186,9 +187,9 @@ class ScopeTest { modules( module { scope(scopeKey) { - scoped { (id : Int) -> Simple.MySingle(id) } + scoped { (id: Int) -> Simple.MySingle(id) } } - } + }, ) }.koin diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt index 2e754196d..e1a89721d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt @@ -11,8 +11,6 @@ import org.koin.core.time.measureDuration import org.koin.dsl.module import org.koin.ext.inject import kotlin.test.Test -import kotlin.time.DurationUnit -import kotlin.time.measureTime class B : KoinScopeComponent { override val scope: Scope by lazy { createScope(this) } @@ -43,13 +41,14 @@ class PlayTest { @Test fun setter_injection() { val koin = startKoin { - modules(module { - single { B() } - single { C() } - }) + modules( + module { + single { B() } + single { C() } + }, + ) }.koin - measureDuration("by inject") { val ai = A_inj() ai.b @@ -72,8 +71,8 @@ class PlayTest { } } -fun measureDuration(msg : String, code: () -> Unit): Double { +fun measureDuration(msg: String, code: () -> Unit): Double { val duration = measureDuration(code) println("$msg in $duration ms") return duration -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt index 41c8bf7c1..e1c99db15 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/AdditionalTypeBindingTest.kt @@ -1,11 +1,11 @@ package org.koin.dsl -import kotlin.test.* -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.test.assertDefinitionsCount +import kotlin.test.* +import kotlin.test.Test import kotlin.test.assertEquals // TODO - Check flaky tests @@ -54,9 +54,10 @@ class AdditionalTypeBindingTest { val app = koinApplication { printLogger() modules( - module { - single { Simple.Component1() } bind Simple.ComponentInterface1::class - }) + module { + single { Simple.Component1() } bind Simple.ComponentInterface1::class + }, + ) } app.assertDefinitionsCount(2) @@ -92,10 +93,11 @@ class AdditionalTypeBindingTest { val app = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component1() } bind Simple.ComponentInterface1::class - single { Simple.Component2() } bind Simple.ComponentInterface1::class - }) + module { + single { Simple.Component1() } bind Simple.ComponentInterface1::class + single { Simple.Component2() } bind Simple.ComponentInterface1::class + }, + ) } app.assertDefinitionsCount(3) @@ -110,10 +112,11 @@ class AdditionalTypeBindingTest { koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component2() } bind Simple.ComponentInterface1::class - single { Simple.Component1() } - }) + module { + single { Simple.Component2() } bind Simple.ComponentInterface1::class + single { Simple.Component1() } + }, + ) } // fail("confilcting definitions") } catch (e: Exception) { @@ -125,10 +128,11 @@ class AdditionalTypeBindingTest { val app = koinApplication { printLogger() modules( - module { - single(named("default")) { Simple.Component2() } - single { Simple.Component1() } - }) + module { + single(named("default")) { Simple.Component2() } + single { Simple.Component1() } + }, + ) } val koin = app.koin koin.get(named("default")) @@ -160,10 +164,11 @@ class AdditionalTypeBindingTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component1() } - single { Simple.Component2() } bind Simple.ComponentInterface1::class - }) + module { + single { Simple.Component1() } + single { Simple.Component2() } bind Simple.ComponentInterface1::class + }, + ) }.koin assertTrue(koin.getAll().size == 1) @@ -175,15 +180,16 @@ class AdditionalTypeBindingTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component1() } - single { Simple.Component2() } bind Simple.ComponentInterface1::class - single { getAll() } - }) + module { + single { Simple.Component1() } + single { Simple.Component2() } bind Simple.ComponentInterface1::class + single { getAll() } + }, + ) }.koin val result = koin.get>() - assertEquals(1,result.size) + assertEquals(1, result.size) } @Test @@ -191,13 +197,14 @@ class AdditionalTypeBindingTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component2() } - single { Simple.Component1() } binds arrayOf( - Simple.ComponentInterface1::class, - Simple.ComponentInterface2::class - ) - }) + module { + single { Simple.Component2() } + single { Simple.Component1() } binds arrayOf( + Simple.ComponentInterface1::class, + Simple.ComponentInterface2::class, + ) + }, + ) }.koin } @@ -206,12 +213,13 @@ class AdditionalTypeBindingTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.Component2() } - single { getAll() } - }) + module { + single { Simple.Component2() } + single { getAll() } + }, + ) }.koin assertTrue(koin.getAll().size == 1) assertTrue(koin.get>().size == 1) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt index 3df0d8c48..180f07613 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CloseDefinitionTest.kt @@ -8,7 +8,7 @@ import kotlin.test.assertTrue class CloseDefinitionTest { @Test - fun test_onClose(){ + fun test_onClose() { var closed = false val koin = koinApplication { @@ -17,7 +17,7 @@ class CloseDefinitionTest { single { Simple.ComponentA() } onClose { closed = true } - } + }, ) }.koin @@ -26,7 +26,7 @@ class CloseDefinitionTest { } @Test - fun test_onClose_from_unload(){ + fun test_onClose_from_unload() { var closed = false val module = module { @@ -39,7 +39,7 @@ class CloseDefinitionTest { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module + module, ) }.koin @@ -50,5 +50,4 @@ class CloseDefinitionTest { koin.unloadModules(listOf(module)) assertTrue(!closed) } - -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt index 8c92135c8..988349133 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ConstructorDSLTest.kt @@ -14,9 +14,11 @@ class ConstructorDSLTest { @Test fun test_reified_type_constructor() { val koin = koinApplication { - modules(module { - singleOf(::ClassA) - }) + modules( + module { + singleOf(::ClassA) + }, + ) }.koin assertNotNull(koin.getOrNull()) assertNull(koin.getOrNull()) @@ -24,13 +26,14 @@ class ConstructorDSLTest { @Test fun test_allow_extra_binds() { - val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - singleOf(::ClassA) { bind() } - singleOf(::ClassA2) { bind() } - }) + modules( + module { + singleOf(::ClassA) { bind() } + singleOf(::ClassA2) { bind() } + }, + ) }.koin assertNotNull(koin.getOrNull() is ClassA2) @@ -49,9 +52,10 @@ class ConstructorDSLTest { factoryOf(::ClassA2) bind IClassA::class factoryOf(::ClassB) } - }) + }, + ) }.koin val scopeA = koin.createScope("ID", name) assertNotNull(scopeA.get()) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt index 065c4896e..16d85a382 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/CreateOnStart.kt @@ -12,20 +12,22 @@ import kotlin.test.assertTrue class CreateOnStart { @AfterTest - fun after(){ + fun after() { stopKoin() } @Test fun `works with koin 2_2_3 and koin 3_0_2 breaks with koin 3_1_4`() { startKoin { - modules(module { - single(createdAtStart = true) { InjectionTarget() } - }) + modules( + module { + single(createdAtStart = true) { InjectionTarget() } + }, + ) properties( mapOf( - "foo" to "bar" - ) + "foo" to "bar", + ), ) } } @@ -35,12 +37,14 @@ class CreateOnStart { startKoin { properties( mapOf( - "foo" to "bar" - ) + "foo" to "bar", + ), + ) + modules( + module { + single(createdAtStart = true) { InjectionTarget() } + }, ) - modules(module { - single(createdAtStart = true) { InjectionTarget() } - }) } } @@ -48,12 +52,14 @@ class CreateOnStart { fun `createdAt start`() { var created = 0 startKoin { - modules(module { - single(createdAtStart = true) { - Simple.ComponentA() - created++ - } - }) + modules( + module { + single(createdAtStart = true) { + Simple.ComponentA() + created++ + } + }, + ) } assertTrue(created == 1) @@ -63,12 +69,14 @@ class CreateOnStart { fun `createdAt start - koinApp`() { var created = 0 koinApplication { - modules(module { - single(createdAtStart = true) { - Simple.ComponentA() - created++ - } - }) + modules( + module { + single(createdAtStart = true) { + Simple.ComponentA() + created++ + } + }, + ) } assertTrue(created == 1) @@ -79,4 +87,4 @@ class CreateOnStart { assertEquals("bar", getKoin().getProperty("foo")) } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/EnvironmentPropertyDefinitionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/EnvironmentPropertyDefinitionTest.kt index c1072a489..d9cfb6413 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/EnvironmentPropertyDefinitionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/EnvironmentPropertyDefinitionTest.kt @@ -1,10 +1,10 @@ -//package org.koin.dsl +// package org.koin.dsl // -//import kotlin.test.assertEquals -//import kotlin.test.Test -//import org.koin.core.logger.Level +// import kotlin.test.assertEquals +// import kotlin.test.Test +// import org.koin.core.logger.Level // -//class EnvironmentPropertyDefinitionTest { +// class EnvironmentPropertyDefinitionTest { // // @Test // fun `load and get properties from environment`() { @@ -20,4 +20,4 @@ // val foundValue = koin.getProperty(aPropertyKey) // assertEquals(aPropertyValue, foundValue) // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FilePropertyDefinitionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FilePropertyDefinitionTest.kt index 8a52d2717..8bc72865a 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FilePropertyDefinitionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FilePropertyDefinitionTest.kt @@ -1,11 +1,11 @@ -//package org.koin.dsl +// package org.koin.dsl // -//import kotlin.test.assertEquals -//import kotlin.test.fail -//import kotlin.test.Test -//import org.koin.core.error.NoPropertyFileFoundException +// import kotlin.test.assertEquals +// import kotlin.test.fail +// import kotlin.test.Test +// import org.koin.core.error.NoPropertyFileFoundException // -//class FilePropertyDefinitionTest { +// class FilePropertyDefinitionTest { // // @Test // fun `load and get properties from file`() { @@ -78,4 +78,4 @@ // // assertEquals(42.0f, koin.getProperty("float.value")?.toFloat()) // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt index dc73519cc..ab419d870 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/FlattenTest.kt @@ -7,43 +7,42 @@ import kotlin.test.assertTrue class FlattenTest { @Test - fun test_simple_flatten(){ - val m1 = module { } - val m2 = module { } - val modules = m1+m2 + fun test_simple_flatten() { + val m1 = module { } + val m2 = module { } + val modules = m1 + m2 - assertTrue{ flatten(modules) == setOf(m1,m2) } + assertTrue { flatten(modules) == setOf(m1, m2) } } @Test - fun test_flatten_common(){ - val m1 = module { } - val m2 = module { } + fun test_flatten_common() { + val m1 = module { } + val m2 = module { } val m3 = module { includes(m1) } - val modules = m3+m2 + val modules = m3 + m2 - assertTrue{ flatten(modules) == setOf(m3,m1,m2) } + assertTrue { flatten(modules) == setOf(m3, m1, m2) } } @Test - fun test_flatten_common2(){ - val m1 = module { } + fun test_flatten_common2() { + val m1 = module { } val m2 = module { includes(m1) } val m3 = module { includes(m1) } - val modules = m3+m2 + val modules = m3 + m2 - assertTrue{ flatten(modules) == setOf(m3,m1,m2) } + assertTrue { flatten(modules) == setOf(m3, m1, m2) } } @Test - fun test_flatten_level3(){ - val m4 = module { } + fun test_flatten_level3() { + val m4 = module { } val m1 = module { includes(m4) } val m2 = module { includes(m1) } val m3 = module { includes(m1) } - val modules = m3+m2 + val modules = m3 + m2 - assertTrue{ flatten(modules) == setOf(m3,m1,m4,m2) } + assertTrue { flatten(modules) == setOf(m3, m1, m4, m2) } } - -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt index 5799f9e41..30bb98dce 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt @@ -75,4 +75,4 @@ class KoinAppCreationTest { // PlatformTools.defaultContext().get().logger.info("info") // PlatformTools.defaultContext().get().logger.error("error") // } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt index 4bd664233..6149f3948 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleAndPropertiesTest.kt @@ -1,10 +1,10 @@ package org.koin.dsl -import kotlin.test.assertEquals -import kotlin.test.fail -import kotlin.test.Test import org.koin.Simple import org.koin.core.error.InstanceCreationException +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.fail class ModuleAndPropertiesTest { @@ -16,9 +16,11 @@ class ModuleAndPropertiesTest { val koin = koinApplication { properties(values) - modules(module { - single { Simple.MyStringFactory(getProperty(key)) } - }) + modules( + module { + single { Simple.MyStringFactory(getProperty(key)) } + }, + ) }.koin val fact = koin.get() @@ -31,9 +33,11 @@ class ModuleAndPropertiesTest { val key = "KEY" val koin = koinApplication { - modules(module { - single { Simple.MyStringFactory(getProperty(key)) } - }) + modules( + module { + single { Simple.MyStringFactory(getProperty(key)) } + }, + ) }.koin koin.get() @@ -42,4 +46,4 @@ class ModuleAndPropertiesTest { e.printStackTrace() } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt index bede69ecd..42ab9caf9 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleCreationTest.kt @@ -1,10 +1,10 @@ package org.koin.dsl -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.test.assertDefinitionsCount +import kotlin.test.Test +import kotlin.test.assertEquals class ModuleCreationTest { @@ -23,9 +23,11 @@ class ModuleCreationTest { app.assertDefinitionsCount(0) - app.modules(module { - single { Simple.ComponentA() } - }) + app.modules( + module { + single { Simple.ComponentA() } + }, + ) app.assertDefinitionsCount(1) } @@ -33,9 +35,10 @@ class ModuleCreationTest { fun `create a module with single`() { val app = koinApplication { modules( - module { - single { Simple.ComponentA() } - }) + module { + single { Simple.ComponentA() } + }, + ) } app.assertDefinitionsCount(1) @@ -43,13 +46,13 @@ class ModuleCreationTest { @Test fun `create a complex single DI module`() { - val app = koinApplication { modules( - module { - single { Simple.ComponentA() } - single { Simple.ComponentB(get()) } - }) + module { + single { Simple.ComponentA() } + single { Simple.ComponentB(get()) } + }, + ) } app.assertDefinitionsCount(2) @@ -57,14 +60,14 @@ class ModuleCreationTest { @Test fun `create a complex factory DI module`() { - val app = koinApplication { modules( - module { - single { Simple.ComponentA() } - single { Simple.ComponentB(get()) } - factory { Simple.ComponentC(get()) } - }) + module { + single { Simple.ComponentA() } + single { Simple.ComponentB(get()) } + factory { Simple.ComponentC(get()) } + }, + ) } app.assertDefinitionsCount(3) @@ -72,15 +75,17 @@ class ModuleCreationTest { @Test fun `create several modules`() { - val app = koinApplication { - modules(listOf( + modules( + listOf( module { single { Simple.ComponentA() } }, module { single { Simple.ComponentB(get()) } - })) + }, + ), + ) } app.assertDefinitionsCount(2) @@ -88,16 +93,16 @@ class ModuleCreationTest { @Test fun `create modules list`() { - val app = koinApplication { modules( - listOf( - module { - single { Simple.ComponentA() } - }, - module { - single { Simple.ComponentB(get()) } - }) + listOf( + module { + single { Simple.ComponentA() } + }, + module { + single { Simple.ComponentB(get()) } + }, + ), ) } @@ -106,28 +111,31 @@ class ModuleCreationTest { @Test fun `create modules list timing`() { - koinApplication { printLogger(Level.DEBUG) - modules(listOf( + modules( + listOf( module { single { Simple.ComponentA() } }, module { single { Simple.ComponentB(get()) } - })) + }, + ), + ) } koinApplication { printLogger(Level.DEBUG) modules( - listOf( - module { - single { Simple.ComponentA() } - }, - module { - single { Simple.ComponentB(get()) } - }) + listOf( + module { + single { Simple.ComponentA() } + }, + module { + single { Simple.ComponentB(get()) } + }, + ), ) } } @@ -173,4 +181,4 @@ class ModuleCreationTest { assertEquals(modA + modB + modC, modA + listOf(modB) + modC) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt index bd60b5115..f05d74db3 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleDeclarationRulesTest.kt @@ -1,23 +1,24 @@ package org.koin.dsl -import kotlin.test.assertEquals -import kotlin.test.fail -import kotlin.test.Test import org.koin.Simple import org.koin.core.error.DefinitionOverrideException import org.koin.core.logger.Level import org.koin.core.qualifier.named import org.koin.test.assertDefinitionsCount +import kotlin.test.Test +import kotlin.test.assertEquals class ModuleDeclarationRulesTest { @Test fun `don't allow redeclaration`() { koinApplication { - modules(module { - single { Simple.ComponentA() } - single { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + single { Simple.ComponentA() } + }, + ) } } @@ -25,10 +26,12 @@ class ModuleDeclarationRulesTest { fun `allow redeclaration - different names`() { val app = koinApplication { printLogger(Level.INFO) - modules(module { - single(named("default")) { Simple.ComponentA() } - single(named("other")) { Simple.ComponentA() } - }) + modules( + module { + single(named("default")) { Simple.ComponentA() } + single(named("other")) { Simple.ComponentA() } + }, + ) } app.assertDefinitionsCount(2) } @@ -36,10 +39,12 @@ class ModuleDeclarationRulesTest { @Test fun `allow qualifier redeclaration - same names`() { val koin = koinApplication { - modules(module { - single(named("default")) { Simple.ComponentA() } - single(named("default")) { Simple.ComponentB(get(named("default"))) } - }) + modules( + module { + single(named("default")) { Simple.ComponentA() } + single(named("default")) { Simple.ComponentB(get(named("default"))) } + }, + ) }.koin val a = koin.get(named("default")) val b = koin.get(named("default")) @@ -49,27 +54,29 @@ class ModuleDeclarationRulesTest { @Test fun `allow redeclaration - default`() { val app = koinApplication { - modules(module { - single { Simple.ComponentA() } - single(named("other")) { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + single(named("other")) { Simple.ComponentA() } + }, + ) } app.assertDefinitionsCount(2) } @Test fun `don't allow redeclaration with different implementation`() { - try { koinApplication { modules( module { single { Simple.Component1() } single { Simple.Component2() } - }) + }, + ) } } catch (e: DefinitionOverrideException) { e.printStackTrace() } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt index c7eb414c7..cf7bbe0d9 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleIncludeTest.kt @@ -8,7 +8,7 @@ import kotlin.test.assertNotNull class ModuleIncludeTest { @Test - fun test_include(){ + fun test_include() { val m2 = module { singleOf(::ClassB) } @@ -22,7 +22,7 @@ class ModuleIncludeTest { } @Test - fun test_include_higher(){ + fun test_include_higher() { val m3 = module { singleOf(::ClassB) } @@ -39,7 +39,7 @@ class ModuleIncludeTest { } @Test - fun test_include_higher2(){ + fun test_include_higher2() { val m3 = module { singleOf(::ClassB) } @@ -47,7 +47,7 @@ class ModuleIncludeTest { singleOf(::ClassA) } val m1 = module { - includes(m2,m3) + includes(m2, m3) } val koin = koinApplication { modules(m1) }.koin @@ -56,7 +56,7 @@ class ModuleIncludeTest { val q1 = named("1") val q2 = named("2") - data class Person(val parent : Person? = null) + data class Person(val parent: Person? = null) val m2 = module { factory(q2) { Person(get(q1)) } } @@ -66,9 +66,9 @@ class ModuleIncludeTest { } @Test - fun should_include_all(){ + fun should_include_all() { val koin = koinApplication { modules(m1) }.koin assertNotNull(koin.getOrNull(q1)) assertNotNull(koin.getOrNull(q2)) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt index c2d987939..ad843c035 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleRestartTest.kt @@ -14,9 +14,11 @@ class ModuleRestartTest : KoinComponent { @BeforeTest fun before() { startKoin { - modules(module { - single { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + }, + ) } } @@ -34,4 +36,4 @@ class ModuleRestartTest : KoinComponent { fun second_test() { get() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt index 9b67ba8d0..253505889 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/ModuleSpecialRulesTest.kt @@ -1,17 +1,19 @@ package org.koin.dsl -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.core.qualifier.named +import kotlin.test.Test +import kotlin.test.assertEquals class ModuleSpecialRulesTest { @Test fun `generic type declaration`() { val koin = koinApplication { - modules(module { - single { arrayListOf() } - }) + modules( + module { + single { arrayListOf() } + }, + ) }.koin koin.get>() @@ -20,10 +22,12 @@ class ModuleSpecialRulesTest { @Test fun `generic types declaration`() { val koin = koinApplication { - modules(module { - single(named("strings")) { arrayListOf() } - single(named("ints")) { arrayListOf() } - }) + modules( + module { + single(named("strings")) { arrayListOf() } + single(named("ints")) { arrayListOf() } + }, + ) }.koin val strings = koin.get>(named("strings")) @@ -33,4 +37,4 @@ class ModuleSpecialRulesTest { assertEquals(0, koin.get>(named("ints")).size) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt index c29d37e91..cdf256355 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NamingTest.kt @@ -1,10 +1,10 @@ package org.koin.dsl -import kotlin.test.assertEquals -import kotlin.test.Test import org.koin.Simple import org.koin.core.logger.Level import org.koin.core.qualifier.* +import kotlin.test.Test +import kotlin.test.assertEquals class NamingTest { @@ -13,14 +13,15 @@ class NamingTest { val scopeName = named("MY_SCOPE") val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - - single(named("24")) { Simple.MySingle(24) } - - scope(scopeName) { - scoped { Simple.MySingle(42) } - } - }) + modules( + module { + single(named("24")) { Simple.MySingle(24) } + + scope(scopeName) { + scoped { Simple.MySingle(42) } + } + }, + ) }.koin val scope = koin.createScope("myScope", scopeName) @@ -30,16 +31,17 @@ class NamingTest { @Test fun `enum naming`() { - assertEquals("my_string",named(MyNames.MY_STRING).value) + assertEquals("my_string", named(MyNames.MY_STRING).value) } @Test fun `can resolve enum naming`() { val koin = koinApplication { - modules(module { - single(named(MyNames.MY_STRING)) { Simple.MySingle(24) } - - }) + modules( + module { + single(named(MyNames.MY_STRING)) { Simple.MySingle(24) } + }, + ) }.koin assertEquals(24, koin.get(named(MyNames.MY_STRING)).id) @@ -49,12 +51,13 @@ class NamingTest { fun `can resolve scope enum naming`() { val scopeName = named(MyNames.MY_SCOPE) val koin = koinApplication { - modules(module { - - scope(scopeName) { - scoped { Simple.MySingle(42) } - } - }) + modules( + module { + scope(scopeName) { + scoped { Simple.MySingle(42) } + } + }, + ) }.koin val scope = koin.createScope("myScope", scopeName) @@ -65,14 +68,15 @@ class NamingTest { fun `can resolve naming with q`() { val scopeName = _q("MY_SCOPE") val koin = koinApplication { - modules(module { - - single(_q("24")) { Simple.MySingle(24) } - - scope(scopeName) { - scoped { Simple.MySingle(42) } - } - }) + modules( + module { + single(_q("24")) { Simple.MySingle(24) } + + scope(scopeName) { + scoped { Simple.MySingle(42) } + } + }, + ) }.koin val scope = koin.createScope("myScope", scopeName) @@ -83,5 +87,5 @@ class NamingTest { enum class MyNames { MY_SCOPE, - MY_STRING -} \ No newline at end of file + MY_STRING, +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt index de2b13c56..5ef8dce9a 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/NewDSLTest.kt @@ -6,7 +6,6 @@ import org.koin.core.annotation.KoinInternalApi import org.koin.core.instance.FactoryInstanceFactory import org.koin.core.instance.ScopedInstanceFactory import org.koin.core.instance.SingleInstanceFactory -import org.koin.core.logger.Level import org.koin.core.module.dsl.* import org.koin.core.qualifier.named import kotlin.test.Test @@ -16,13 +15,13 @@ import kotlin.test.assertTrue class ClassA : IClassA class ClassA2 : IClassA -class ClassB(val a : IClassA) +class ClassB(val a: IClassA) interface IClassA class NewDSLTest { @Test - fun singleof_options(){ + fun singleof_options() { val module = module { singleOf(::ClassA) { named("_name_") @@ -30,50 +29,50 @@ class NewDSLTest { bind() } } - assertEquals(3,module.mappings.size) + assertEquals(3, module.mappings.size) val factory = module.mappings.values.iterator().next() assertTrue { factory is SingleInstanceFactory<*> && factory.beanDefinition._createdAtStart } - assertEquals(0,module.scopes.size) - assertEquals(1,module.eagerInstances.size) + assertEquals(0, module.scopes.size) + assertEquals(1, module.eagerInstances.size) } @Test - fun factory_options(){ + fun factory_options() { val module = module { factoryOf(::ClassA) { named("_name_") bind() } } - assertEquals(3,module.mappings.size) + assertEquals(3, module.mappings.size) val factory = module.mappings.values.iterator().next() assertTrue { factory is FactoryInstanceFactory<*> && !factory.beanDefinition._createdAtStart } - assertEquals(0,module.scopes.size) - assertEquals(0,module.eagerInstances.size) + assertEquals(0, module.scopes.size) + assertEquals(0, module.eagerInstances.size) } @Test - fun scoped_options(){ + fun scoped_options() { val module = module { scope(named("_scope_")) { scopedOf(::ClassA) { bind() } } } - assertEquals(2,module.mappings.size) + assertEquals(2, module.mappings.size) val factory = module.mappings.values.iterator().next() assertTrue("factory type") { factory is ScopedInstanceFactory<*> && !factory.beanDefinition._createdAtStart } - assertEquals(1,module.scopes.size) - assertEquals(0,module.eagerInstances.size) + assertEquals(1, module.scopes.size) + assertEquals(0, module.eagerInstances.size) } @Test - fun factory_options_run(){ + fun factory_options_run() { val module = module { factoryOf(::ClassA) { bind() } } @@ -82,7 +81,7 @@ class NewDSLTest { } @Test - fun singleof_nodsl(){ + fun singleof_nodsl() { val module = module { singleOf(::ClassA) bind IClassA::class singleOf(::ClassB) @@ -92,7 +91,7 @@ class NewDSLTest { } @Test - fun singleof_deps(){ + fun singleof_deps() { val module = module { singleOf(::ClassA) { bind() } singleOf(::ClassB) @@ -102,7 +101,7 @@ class NewDSLTest { } @Test - fun singleof_get_options(){ + fun singleof_get_options() { val module = module { singleOf(::ClassA) { named("_name_") @@ -113,7 +112,7 @@ class NewDSLTest { } } - assertEquals(1,module.eagerInstances.size) - assertEquals(4,module.mappings.size) + assertEquals(1, module.eagerInstances.size) + assertEquals(4, module.mappings.size) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt index 041f62ecb..4764d9f8b 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/PropertyDefinitionTest.kt @@ -65,4 +65,4 @@ class PropertyDefinitionTest { val gotValue = koin.getProperty(key) assertEquals(value2, gotValue) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt index 6b4b23358..393bc7e88 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/full/TODOAppTest.kt @@ -1,13 +1,9 @@ package org.koin.full -import kotlin.test.* import org.koin.core.logger.Level -import org.koin.core.module.dsl.bind -import org.koin.core.module.dsl.named -import org.koin.core.module.dsl.singleOf -import org.koin.dsl.bind import org.koin.dsl.koinApplication import org.koin.dsl.module +import kotlin.test.* class TODOAppTest { @@ -21,7 +17,7 @@ class TODOAppTest { } val overrideDef = module { - single{ TasksLocalDataSource() } + single { TasksLocalDataSource() } } interface TasksDataSource @@ -64,4 +60,4 @@ class TODOAppTest { val tasksDataSource = koin.get() assertTrue(tasksDataSource is TasksLocalDataSource) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt index e8e72365a..710c41f42 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/AppTest.kt @@ -23,10 +23,11 @@ class AppTest { val app = startKoin { printLogger() modules( - module { - single { TasksView() } - single { TasksPresenter(get()) } - }) + module { + single { TasksView() } + single { TasksPresenter(get()) } + }, + ) } val koin = app.koin @@ -37,4 +38,4 @@ class AppTest { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt index 067a578e4..b9fe4aeab 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/CustomKoinComponentTest.kt @@ -18,9 +18,11 @@ abstract class CustomKoinComponent : KoinComponent { @ThreadLocal companion object { val customKoin = koinApplication { - modules(module { - single { Simple.ComponentA() } - }) + modules( + module { + single { Simple.ComponentA() } + }, + ) }.koin } } @@ -40,4 +42,4 @@ class CustomKoinComponentTest { assertHasNoStandaloneInstance() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt index 1a5ae9be5..f6d96f07e 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/KoinComponentTest.kt @@ -29,7 +29,8 @@ class KoinComponentTest { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val koin = app.koin @@ -58,7 +59,8 @@ class KoinComponentTest { modules( module { single { Simple.ComponentA() } - }) + }, + ) } val koin = app.koin @@ -67,4 +69,4 @@ class KoinComponentTest { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt index d27dd764f..3430000fd 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/koincomponent/TODOAppTest.kt @@ -23,7 +23,7 @@ class TODOAppTest { single { TasksRepository( get(named("remoteDataSource")), - get(named("localDataSource")) + get(named("localDataSource")), ) } bind TasksDataSource::class } @@ -43,7 +43,7 @@ class TODOAppTest { class TasksLocalDataSource : TasksDataSource class TasksRepository( val remoteDataSource: TasksDataSource, - val localDatasource: TasksDataSource + val localDatasource: TasksDataSource, ) : TasksDataSource @Test @@ -58,4 +58,4 @@ class TODOAppTest { println("-> ${view.taskPreenter}") stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/PerfsTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/PerfsTest.kt index 6ed9cbfb0..309ccd13f 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/PerfsTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/PerfsTest.kt @@ -1,15 +1,15 @@ -//package org.koin.perfs +// package org.koin.perfs // -//import kotlin.test.Test -//import org.koin.core.annotation.KoinInternalApi -//import org.koin.core.logger.* -//import org.koin.core.time.Timer -//import org.koin.dsl.koinApplication -//import org.koin.mp.KoinPlatformTools -//import org.koin.test.assertDefinitionsCount +// import kotlin.test.Test +// import org.koin.core.annotation.KoinInternalApi +// import org.koin.core.logger.* +// import org.koin.core.time.Timer +// import org.koin.dsl.koinApplication +// import org.koin.mp.KoinPlatformTools +// import org.koin.test.assertDefinitionsCount // -//@OptIn(KoinInternalApi::class) -//class PerfsTest { +// @OptIn(KoinInternalApi::class) +// class PerfsTest { // // @Test // fun empty_module_perfs() { @@ -48,4 +48,4 @@ // // app.close() // } -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/classes.kt b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/classes.kt index 324ef4e97..76db9943d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/classes.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/classes.kt @@ -402,4 +402,4 @@ class Perfs { class B100(val a: A100) class C100(val a: A100, val b: B100) class D100(val a: A100, val b: B100, val c: C100) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/module_400.kt b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/module_400.kt index 7dea6f120..9bd2a3535 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/perfs/module_400.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/perfs/module_400.kt @@ -2,7 +2,7 @@ package org.koin.perfs import org.koin.dsl.module - fun perfModule400() = module { +fun perfModule400() = module { single { Perfs.A1() } single { Perfs.B1(get()) } single { Perfs.C1(get(), get()) } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/test/Asserts.kt b/core/koin-core/src/commonTest/kotlin/org/koin/test/Asserts.kt index 8e79d8b98..4863cf602 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/test/Asserts.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/test/Asserts.kt @@ -5,4 +5,4 @@ import kotlin.test.assertNull fun assertHasNoStandaloneInstance() { assertNull(KoinPlatformTools.defaultContext().getOrNull()) -} \ No newline at end of file +} diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/test/KoinApplicationExt.kt b/core/koin-core/src/commonTest/kotlin/org/koin/test/KoinApplicationExt.kt index 645b78ea2..27505a2bc 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/test/KoinApplicationExt.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/test/KoinApplicationExt.kt @@ -26,4 +26,4 @@ internal fun Scope.getBeanDefinition(clazz: KClass<*>): BeanDefinition<*>? { @OptIn(KoinInternalApi::class) internal fun KoinApplication.getInstanceFactory(clazz: KClass<*>): InstanceFactory<*>? { return this.koin.instanceRegistry.instances.values.firstOrNull { it.beanDefinition.primaryType == clazz } -} \ No newline at end of file +} diff --git a/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index d7a1c5e95..52698f4e9 100644 --- a/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/darwinMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,5 +1,5 @@ -//package org.koin.mp.native +// package org.koin.mp.native // -//import platform.Foundation.NSThread +// import platform.Foundation.NSThread // -//actual val isMainThread: Boolean = NSThread.isMainThread \ No newline at end of file +// actual val isMainThread: Boolean = NSThread.isMainThread diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt index 6fd45e6ac..ac9db5f64 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -48,7 +48,6 @@ object GlobalContext : KoinContext { _koin = null } - override fun startKoin(koinApplication: KoinApplication): KoinApplication { register(koinApplication) return koinApplication diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/time/TimeSource.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/time/TimeSource.kt index 276bf96c3..13296f6d1 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/time/TimeSource.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/time/TimeSource.kt @@ -17,8 +17,8 @@ interface TimeSource { internal fun getTimeSource(): TimeSource { val isNode = js( "typeof process !== 'undefined' " + - "&& process.versions " + - "&& !!process.versions.node" + "&& process.versions " + + "&& !!process.versions.node", ) as Boolean return if (isNode) { @@ -53,4 +53,4 @@ private class DateNowTimeSource : TimeSource { override fun markNow(): Long { return (Date.now() * 1_000_000).roundToLong() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTimeTools.kt b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTimeTools.kt index 2da120305..de2b8ce97 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTimeTools.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTimeTools.kt @@ -7,4 +7,4 @@ actual object KoinPlatformTimeTools { actual fun getTimeInNanoSeconds(): Long { return getTimeSource().markNow() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt index ad2fd5081..2510a7fec 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt @@ -6,7 +6,7 @@ import org.koin.core.logger.* import kotlin.random.Random import kotlin.reflect.KClass -//actual object PlatformTools { +// actual object PlatformTools { // actual fun getClassName(kClass: KClass<*>): String { // return kClass.simpleName ?: "KClass@${hashCode()}" // } @@ -20,13 +20,14 @@ import kotlin.reflect.KClass // actual fun printLog(level: Level, msg: MESSAGE) { // println("[$level] $KOIN_TAG $msg") // } -//} -//internal actual fun Any.ensureNeverFrozen() {} -//internal actual fun mpsynchronized(lock: Any, block: () -> R): R = block() +// } +// internal actual fun Any.ensureNeverFrozen() {} +// internal actual fun mpsynchronized(lock: Any, block: () -> R): R = block() actual object KoinPlatformTools { actual fun getStackTrace(e: Exception): String = e.toString() + Exception().toString().split("\n") actual fun getClassName(kClass: KClass<*>): String = kClass.simpleName ?: "KClass@${kClass.hashCode()}" + // TODO Better Id generation? actual fun generateId(): String = Random.nextDouble().hashCode().toString() actual fun defaultLazyMode(): LazyThreadSafetyMode = LazyThreadSafetyMode.NONE @@ -36,4 +37,4 @@ actual object KoinPlatformTools { actual fun safeHashMap(): MutableMap = HashMap() } -actual typealias Lockable = Any \ No newline at end of file +actual typealias Lockable = Any diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/KoinApplicationExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/KoinApplicationExt.kt index 8823a26c5..ce1be1d51 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/KoinApplicationExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/KoinApplicationExt.kt @@ -5,7 +5,6 @@ import org.koin.core.annotation.KoinInternalApi import org.koin.core.registry.loadEnvironmentProperties import org.koin.core.registry.loadPropertiesFromFile - /** * Load properties from file * @param fileName diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt index 222f542df..3b1d70664 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -18,7 +18,6 @@ package org.koin.core.context import org.koin.core.Koin import org.koin.core.KoinApplication import org.koin.core.error.ApplicationAlreadyStartedException -import org.koin.core.error.KoinAppAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -53,7 +52,6 @@ object GlobalContext : KoinContext { _koin = null } - override fun startKoin(koinApplication: KoinApplication): KoinApplication = synchronized(this) { register(koinApplication) koinApplication.createEagerInstances() @@ -68,7 +66,6 @@ object GlobalContext : KoinContext { return koinApplication } - override fun loadKoinModules(module: Module) = synchronized(this) { get().loadModules(listOf(module)) } diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt index 1f925be16..63fab8aa4 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt @@ -67,8 +67,9 @@ private fun createInstance(args: Array, constructor: Constructor): */ private fun getArguments(constructor: Constructor<*>, scope: Scope, parameters: ParametersHolder): Array { val length = constructor.parameterTypes.size - return if (length == 0) emptyArray() - else { + return if (length == 0) { + emptyArray() + } else { val result = Array(length) {} for (i in 0 until length) { val p = constructor.parameterTypes[i] @@ -77,4 +78,4 @@ private fun getArguments(constructor: Constructor<*>, scope: Scope, parameters: } result } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt index 3f0691079..7d77d8428 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt @@ -2,11 +2,8 @@ package org.koin.core.registry import org.koin.core.Koin import org.koin.core.error.NoPropertyFileFoundException -import org.koin.core.logger.Level -import org.koin.ext.clearQuotes import java.util.* - /** *Save properties values into PropertyRegister */ @@ -28,7 +25,7 @@ fun PropertyRegistry.loadPropertiesFromFile(fileName: String) { val content = Koin::class.java.getResource(fileName)?.readText() if (content != null) { - _koin.logger.info("loaded properties from file:'$fileName'" ) + _koin.logger.info("loaded properties from file:'$fileName'") val properties = readDataFromFile(content) saveProperties(properties) } else { @@ -53,4 +50,4 @@ fun PropertyRegistry.loadEnvironmentProperties() { val sysEnvProperties = System.getenv().toProperties() saveProperties(sysEnvProperties) -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/scope/ScopeJVM.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/scope/ScopeJVM.kt index f93504787..3421aa3a0 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/scope/ScopeJVM.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/scope/ScopeJVM.kt @@ -15,8 +15,8 @@ import org.koin.core.qualifier.Qualifier fun Scope.get( clazz: Class<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T { val kClass = clazz.kotlin return get(kClass, qualifier, parameters) -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ModuleExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ModuleExt.kt index 7268f60af..8d8ff0a55 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ModuleExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ModuleExt.kt @@ -17,7 +17,6 @@ package org.koin.dsl import org.koin.core.annotation.KoinReflectAPI import org.koin.core.definition.KoinDefinition -import org.koin.core.instance.InstanceFactory import org.koin.core.instance.newInstance import org.koin.core.module.Module import org.koin.core.qualifier.Qualifier @@ -47,7 +46,7 @@ inline fun Module.single( @KoinReflectAPI @Deprecated("API is deprecated in favor of factoryOf DSL") inline fun Module.factory( - qualifier: Qualifier? = null + qualifier: Qualifier? = null, ): KoinDefinition { return factory(qualifier) { params -> newInstance(T::class, params) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ScopeSetExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ScopeSetExt.kt index 01b023703..97178821c 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ScopeSetExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/dsl/ScopeSetExt.kt @@ -29,7 +29,7 @@ import org.koin.core.qualifier.Qualifier @KoinReflectAPI @Deprecated("API is deprecated in favor of scopedOf DSL") inline fun ScopeDSL.scoped( - qualifier: Qualifier? = null + qualifier: Qualifier? = null, ): KoinDefinition { return scoped(qualifier) { params -> newInstance(R::class, params) } } @@ -43,7 +43,7 @@ inline fun ScopeDSL.scoped( @KoinReflectAPI @Deprecated("API is deprecated in favor of factoryOf DSL") inline fun ScopeDSL.factory( - qualifier: Qualifier? = null + qualifier: Qualifier? = null, ): KoinDefinition { return factory(qualifier) { params -> newInstance(R::class, params) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/java/KoinJavaComponent.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/java/KoinJavaComponent.kt index 87b073eb5..c9b1d34b9 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/java/KoinJavaComponent.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/java/KoinJavaComponent.kt @@ -41,7 +41,7 @@ object KoinJavaComponent { fun inject( clazz: Class<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): Lazy { return lazy(LazyThreadSafetyMode.SYNCHRONIZED) { get(clazz, qualifier, parameters) @@ -61,7 +61,7 @@ object KoinJavaComponent { fun injectOrNull( clazz: Class<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): Lazy { return lazy { getOrNull(clazz, qualifier, parameters) @@ -81,13 +81,13 @@ object KoinJavaComponent { fun get( clazz: Class<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T { val kClass = clazz.kotlin return getKoin().get( kClass, qualifier, - parameters + parameters, ) } @@ -104,13 +104,13 @@ object KoinJavaComponent { fun getOrNull( clazz: Class<*>, qualifier: Qualifier? = null, - parameters: ParametersDefinition? = null + parameters: ParametersDefinition? = null, ): T? { val kClass = clazz.kotlin return getKoin().getOrNull( kClass, qualifier, - parameters + parameters, ) } @@ -120,4 +120,4 @@ object KoinJavaComponent { */ @JvmStatic fun getKoin(): Koin = KoinPlatformTools.defaultContext().get() -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt index bbf64d124..831b0850e 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt @@ -1,7 +1,7 @@ package org.koin.mp actual object KoinPlatformTimeTools { - actual fun getTimeInNanoSeconds() : Long { + actual fun getTimeInNanoSeconds(): Long { return System.nanoTime() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt index aab974923..621c3dca2 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -21,4 +21,4 @@ actual object KoinPlatformTools { actual fun safeHashMap(): MutableMap = ConcurrentHashMap() } -actual typealias Lockable = Any \ No newline at end of file +actual typealias Lockable = Any diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt index b3abab618..37ed03575 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt @@ -8,26 +8,26 @@ import org.koin.core.logger.Level class DebugLogTest { @Test - fun fasterDebug(){ + fun fasterDebug() { val koin = startKoin { printLogger(Level.INFO) }.koin (1..10).forEach { - measureDuration("with if"){ - if (koin.logger.isAt(Level.DEBUG)){ + measureDuration("with if") { + if (koin.logger.isAt(Level.DEBUG)) { koin.logger.debug(message { "test me" }) } } - measureDuration("with fct"){ + measureDuration("with fct") { koin.logger.log(Level.DEBUG) { "test me" } } } stopKoin() } - fun message(msg : () -> String) : String{ + fun message(msg: () -> String): String { println("resolve message") return msg() } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DeclareInstanceJVMTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DeclareInstanceJVMTest.kt index 4a045fd8e..0ae86b2a1 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DeclareInstanceJVMTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DeclareInstanceJVMTest.kt @@ -54,4 +54,4 @@ class DeclareInstanceJVMTest { // Get scope of each data assertEquals(koin.get().name, koin.get().name) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/StringTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/StringTest.kt index 5048b228d..7be192947 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/StringTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/StringTest.kt @@ -6,7 +6,7 @@ import org.koin.ext.clearQuotes class StringTest { @Test - fun quoted_strings(){ + fun quoted_strings() { assert("test".clearQuotes() == "test") assert("te\"st".clearQuotes() == "te\"st") assert("\"test\"".clearQuotes() == "test") @@ -14,4 +14,4 @@ class StringTest { assert("\"".clearQuotes() == "\"") assert("\"test".clearQuotes() == "\"test") } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/Classes.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/Classes.kt index 54fb569ec..cedfb238b 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/Classes.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/Classes.kt @@ -20,4 +20,4 @@ class View : KoinComponent { class Presenter(val repository: Repository) class Repository(val datasource: Datasource) interface Datasource -class DebugDatasource : Datasource \ No newline at end of file +class DebugDatasource : Datasource diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt index cedf8ed9d..3a48d70fd 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/CreateAPITest.kt @@ -16,10 +16,12 @@ class CreateAPITest { fun `should find 1st constructor and build`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { ComponentA() } - single { ComponentB(get()) } - }) + modules( + module { + single { ComponentA() } + single { ComponentB(get()) } + }, + ) }.koin val duration = measureDuration { @@ -29,10 +31,12 @@ class CreateAPITest { val createKoin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { ComponentA() } - single { newInstance(ComponentB::class, it) } - }) + modules( + module { + single { ComponentA() } + single { newInstance(ComponentB::class, it) } + }, + ) }.koin val createDuration = measureDuration { @@ -46,9 +50,11 @@ class CreateAPITest { try { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { newInstance(ComponentB::class, it) } - }) + modules( + module { + single { newInstance(ComponentB::class, it) } + }, + ) }.koin koin.get() @@ -62,9 +68,11 @@ class CreateAPITest { fun `create with empty ctor`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { newInstance(ComponentA::class, it) } - }) + modules( + module { + single { newInstance(ComponentA::class, it) } + }, + ) }.koin koin.get() @@ -74,10 +82,12 @@ class CreateAPITest { fun `create for interface`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { ComponentA() } - single { newInstance(ComponentD::class, it) } - }) + modules( + module { + single { ComponentA() } + single { newInstance(ComponentD::class, it) } + }, + ) }.koin koin.get() @@ -87,10 +97,12 @@ class CreateAPITest { fun `create factory for interface`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { ComponentA() } - factory { newInstance(ComponentD::class, it) } - }) + modules( + module { + single { ComponentA() } + factory { newInstance(ComponentD::class, it) } + }, + ) }.koin val f1 = koin.get() @@ -103,10 +115,12 @@ class CreateAPITest { fun `create API overhead`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single { newInstance(it) } - factory { newInstance(it) } - }) + modules( + module { + single { newInstance(it) } + factory { newInstance(it) } + }, + ) }.koin (1..3).forEach { @@ -118,11 +132,13 @@ class CreateAPITest { fun `create API with param`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single() - }) + modules( + module { + single() + }, + ) }.koin koin.get { parametersOf(ComponentA()) } } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt index f6162b65f..9829e03dd 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ReflectAPITest.kt @@ -45,12 +45,10 @@ class ReflectAPITest { } } } - - } fun measure(message: String, code: () -> T): T { val (i, time) = measureDurationForResult(code) println("$message in $time ms") return i -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ScopedMVPArchitectureTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ScopedMVPArchitectureTest.kt index 723deb1fd..0f1277855 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ScopedMVPArchitectureTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/instance/ScopedMVPArchitectureTest.kt @@ -24,7 +24,7 @@ class ScopedMVPArchitectureTest { } @After - fun after(){ + fun after() { stopKoin() } @@ -46,4 +46,4 @@ class ScopedMVPArchitectureTest { Assert.assertEquals(repository, view.presenter.repository) Assert.assertEquals(datasource, repository.datasource) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/java/KoinJavaComponentTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/java/KoinJavaComponentTest.kt index 402fd4690..8d3510824 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/java/KoinJavaComponentTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/java/KoinJavaComponentTest.kt @@ -16,9 +16,7 @@ package org.koin.java import org.junit.After -import kotlin.test.assertEquals import org.junit.Before -import kotlin.test.Test import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.core.qualifier.named @@ -33,11 +31,13 @@ open class KoinJavaComponentTest { fun before() { startKoin { properties(mapOf("PrefixProp" to "_", "SeparatorProp" to "|")) - modules(module { - single(named("db")) { LocalDbImplementation() as DataSource } - single(named("api")) { RemoteApiImplementation() as DataSource } - single { (separator: String) -> DataConverter(separator) } - }) + modules( + module { + single(named("db")) { LocalDbImplementation() as DataSource } + single(named("api")) { RemoteApiImplementation() as DataSource } + single { (separator: String) -> DataConverter(separator) } + }, + ) } } @@ -46,8 +46,8 @@ open class KoinJavaComponentTest { stopKoin() } - //Getting java.lang.NoClassDefFoundError: org/koin/java/DataFetcher - //https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#java-support-in-jvm-targets + // Getting java.lang.NoClassDefFoundError: org/koin/java/DataFetcher + // https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#java-support-in-jvm-targets /*@Test fun `inject components in java DataFetcher class test`() { val dataFetcherInstance = DataFetcher() @@ -77,4 +77,4 @@ class DataConverter(private val separator: String) { fun convert(vararg data: String): String { return data.joinToString(separator) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/java/UnitJavaStuff.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/java/UnitJavaStuff.kt index 577eb487d..245ebccbe 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/java/UnitJavaStuff.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/java/UnitJavaStuff.kt @@ -16,4 +16,4 @@ val koinModule = module { class ComponentA class ComponentB(val componentA: ComponentA) -class ComponentD(val componentB: ComponentB) \ No newline at end of file +class ComponentD(val componentB: ComponentB) diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index 5efb86b75..8b2655809 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -20,7 +20,6 @@ import co.touchlab.stately.concurrency.withLock import org.koin.core.Koin import org.koin.core.KoinApplication import org.koin.core.error.ApplicationAlreadyStartedException -import org.koin.core.error.KoinAppAlreadyStartedException import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -29,7 +28,7 @@ internal fun globalContextByMemoryModel(): KoinContext = MutableGlobalContext() /** * Mutable global context for the new memory model. Very similar to how the JVM global context works. */ -internal class MutableGlobalContext:KoinContext { +internal class MutableGlobalContext : KoinContext { private val lock = Lock() private var _koin: Koin? = null private var _koinApplication: KoinApplication? = null diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/module/ModuleExt.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/module/ModuleExt.kt index 6ea2bed0c..71b56a84c 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/module/ModuleExt.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/module/ModuleExt.kt @@ -25,7 +25,7 @@ internal fun Module.createDefinition( qualifier: Qualifier? = null, definition: Definition, secondaryTypes: List> = emptyList(), - scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier + scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier, ): BeanDefinition { return BeanDefinition( scopeQualifier, @@ -33,7 +33,7 @@ internal fun Module.createDefinition( qualifier, definition, kind, - secondaryTypes = secondaryTypes + secondaryTypes = secondaryTypes, ) } @@ -44,7 +44,7 @@ fun Module.factory( kClass: KClass, qualifier: Qualifier? = null, definition: Definition, - scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier + scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier, ): KoinDefinition { val def = createDefinition(Kind.Factory, kClass, qualifier, definition, scopeQualifier = scopeQualifier) val factory = FactoryInstanceFactory(def) @@ -60,7 +60,7 @@ fun Module.single( qualifier: Qualifier? = null, definition: Definition, createdAtStart: Boolean = false, - scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier + scopeQualifier: Qualifier = ScopeRegistry.rootScopeQualifier, ): KoinDefinition { val def = createDefinition(Kind.Singleton, kClass, qualifier, definition, scopeQualifier = scopeQualifier) val factory = SingleInstanceFactory(def) @@ -69,4 +69,4 @@ fun Module.single( prepareForCreationAtStart(factory) } return KoinDefinition(this, factory) -} \ No newline at end of file +} diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt index 4e9a73ad2..448586cfa 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTimeTools.kt @@ -6,4 +6,4 @@ actual object KoinPlatformTimeTools { actual fun getTimeInNanoSeconds(): Long { return TimeSource.Monotonic.markNow().elapsedNow().inWholeNanoseconds } -} \ No newline at end of file +} diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index 81d9896c4..8a842f34a 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,10 +1,10 @@ -//package org.koin.mp.native +// package org.koin.mp.native // -//import kotlinx.cinterop.StableRef -//import kotlin.native.concurrent.ensureNeverFrozen -//import kotlin.native.concurrent.freeze +// import kotlinx.cinterop.StableRef +// import kotlin.native.concurrent.ensureNeverFrozen +// import kotlin.native.concurrent.freeze // -//class MainThreadValue(startVal: T) { +// class MainThreadValue(startVal: T) { // private val stableRef = StableRef.create(startVal) // // init { @@ -17,10 +17,10 @@ // assertMainThread() // return stableRef.get() // } -//} +// } // -//expect val isMainThread: Boolean// = NSThread.isMainThread +// expect val isMainThread: Boolean// = NSThread.isMainThread // -//internal fun assertMainThread() { +// internal fun assertMainThread() { // if (!isMainThread) throw IllegalStateException("Must be main thread") -//} \ No newline at end of file +// } diff --git a/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt b/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt index 6f3255eca..a83cd2241 100644 --- a/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt +++ b/core/koin-core/src/nativeTest/kotlin/org/koin/core/Helpers.kt @@ -3,14 +3,14 @@ package org.koin.core import kotlin.native.concurrent.TransferMode import kotlin.native.concurrent.Worker -fun runBackground(block: () -> R):R { +fun runBackground(block: () -> R): R { val result = worker.execute(TransferMode.SAFE, { block - }){ + }) { it() }.result return result } -private val worker = Worker.start() \ No newline at end of file +private val worker = Worker.start() diff --git a/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt b/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt index 42da5821d..e3ab89314 100644 --- a/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt +++ b/core/koin-core/src/nativeTest/kotlin/org/koin/core/state/PlatformThreadingTest.kt @@ -14,7 +14,7 @@ class PlatformThreadingTest { module { scope(scopeKey) { } - } + }, ) }.koin @@ -34,4 +34,4 @@ class PlatformThreadingTest { theException?.printStackTrace() assertNull(theException) } -} \ No newline at end of file +} diff --git a/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt b/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt index f26f3b239..cdce8d9c9 100644 --- a/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt +++ b/core/koin-core/src/otherMain/kotlin/org/koin/mp/native/MainThreadSafety.kt @@ -1,6 +1,6 @@ -//package org.koin.mp.native +// package org.koin.mp.native // -//actual val isMainThread: Boolean +// actual val isMainThread: Boolean // get() { // return try { // //Trying to access a global val on a background thread will throw an exception @@ -11,6 +11,6 @@ // } // } // -//private data class DummyData(val s: String) +// private data class DummyData(val s: String) // -//private val dummyData = DummyData("arst") \ No newline at end of file +// private val dummyData = DummyData("arst") diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt index e88ed5749..0700f3e9d 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/AutoCloseKoinTest.kt @@ -37,4 +37,4 @@ interface ClosingKoinTest : KoinTest { fun autoClose() { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt index 5a211e8bb..42b5f0cd7 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/mock/MockProviderRule.kt @@ -22,17 +22,16 @@ import org.junit.runners.model.Statement class MockProviderRule private constructor(private val mockProvider: Provider<*>) : TestRule { override fun apply(base: Statement, description: Description): Statement = - object : Statement() { - override fun evaluate() { - MockProvider.register(mockProvider) - base.evaluate() - } + object : Statement() { + override fun evaluate() { + MockProvider.register(mockProvider) + base.evaluate() } + } companion object { fun create(mockProvider: Provider<*>): MockProviderRule { return MockProviderRule(mockProvider) } } - -} \ No newline at end of file +} diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckModulesTest.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckModulesTest.kt index c35380367..4e2e5600a 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckModulesTest.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckModulesTest.kt @@ -97,7 +97,7 @@ class CheckModulesTest { scoped { Simple.ComponentA() } scoped { Simple.ComponentB(get()) } } - } + }, ) }.checkModules() } @@ -110,7 +110,7 @@ class CheckModulesTest { scope(named("scope")) { scoped { Simple.ComponentB(get()) } } - } + }, ) }.checkModules { withInstance() @@ -166,7 +166,7 @@ class CheckModulesTest { scoped { Simple.ComponentA() } scoped { Simple.ComponentB(get()) } } - } + }, ) }.checkModules() } @@ -180,7 +180,7 @@ class CheckModulesTest { scope { scoped { Simple.ComponentB(get()) } } - } + }, ) }.checkModules() } @@ -196,7 +196,7 @@ class CheckModulesTest { scope(named("scope")) { scoped { Simple.ComponentA() } } - } + }, ) }.checkModules() fail() @@ -218,7 +218,7 @@ class CheckModulesTest { scope(named("scope1")) { scoped { Simple.ComponentA() } } - } + }, ) }.checkModules() fail() @@ -242,7 +242,7 @@ class CheckModulesTest { scope(named("scope1")) { scoped { Simple.ComponentA() } } - } + }, ) }.checkModules { koin.createScope("scopei1", named("scope1")) @@ -256,7 +256,7 @@ class CheckModulesTest { modules( module { single { Simple.ComponentA() } - } + }, ) }.checkModules() } @@ -269,7 +269,7 @@ class CheckModulesTest { module { single { Simple.ComponentA() } single { Simple.ComponentB(get()) } - } + }, ) }.checkModules() } @@ -291,7 +291,7 @@ class CheckModulesTest { modules( module { single { Simple.ComponentB(get()) } - } + }, ) }.checkModules() fail("should not pass with broken definitions") @@ -308,7 +308,7 @@ class CheckModulesTest { module { single { (s: String) -> Simple.MyString(s) } single(UpperCase) { (s: String) -> Simple.MyString(s.uppercase(Locale.getDefault())) } - } + }, ) }.checkModules { withParameters { parametersOf("param") } @@ -324,7 +324,7 @@ class CheckModulesTest { module { single { (s: String) -> Simple.MyString(s) } single(UpperCase) { (s: String) -> Simple.MyString(s.uppercase(Locale.getDefault())) } - } + }, ) }.checkModules { withParameter(Simple.MyString::class) { "param" } @@ -342,7 +342,7 @@ class CheckModulesTest { module { single { (s: String) -> Simple.MyString(s) } single { (a: Simple.ComponentA) -> Simple.ComponentB(a) } - } + }, ) }.checkModules() } @@ -359,7 +359,7 @@ class CheckModulesTest { injectedValue = s Simple.MyString(s) } - } + }, ) }.checkModules { withParameter { id } @@ -380,7 +380,7 @@ class CheckModulesTest { _id = get() Simple.MyString(_id) } - } + }, ) } app.checkModules { @@ -401,7 +401,7 @@ class CheckModulesTest { _value = get() Simple.MyString(_value!!) } - } + }, ) } app.checkModules() @@ -420,7 +420,7 @@ class CheckModulesTest { _a = get() Simple.ComponentB(_a!!) } - } + }, ) } app.checkModules { @@ -442,7 +442,7 @@ class CheckModulesTest { injectedValue = a Simple.ComponentB(a) } - } + }, ) }.checkModules { withInstance(a) @@ -460,7 +460,7 @@ class CheckModulesTest { scope { scoped { Simple.ComponentB(get()) } } - } + }, ) }.checkModules() } @@ -475,7 +475,7 @@ class CheckModulesTest { scope { scoped { Simple.ComponentC(get()) } } - } + }, ) }.checkModules() fail() @@ -488,9 +488,11 @@ class CheckModulesTest { fun `check with qualifier`() { koinApplication { printLogger(Level.DEBUG) - modules(module { - single(named("test")) { Simple.ComponentA() } - }) + modules( + module { + single(named("test")) { Simple.ComponentA() } + }, + ) }.checkModules() } @@ -502,7 +504,7 @@ class CheckModulesTest { modules( module { single { Simple.MyString(getProperty("aValue")) } - } + }, ) }.checkModules() } @@ -523,7 +525,6 @@ class CheckModulesTest { } } - @Test fun `check a module with linked scopes`() { koinApplication { @@ -537,7 +538,7 @@ class CheckModulesTest { scope { scoped { Simple.ComponentE(get()) } } - } + }, ) }.checkModules { withScopeLink() @@ -552,7 +553,7 @@ class CheckModulesTest { module { single { "the_string" }.bind() single { 42 } bind Number::class - } + }, ) }.checkModules() } @@ -567,7 +568,7 @@ class CheckModulesTest { String::class, CharSequence::class, ) - } + }, ) }.checkModules() } @@ -583,7 +584,7 @@ class CheckModulesTest { CharSequence::class, Int::class, ) - } + }, ) }.checkModules() } diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckTest.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckTest.kt index 0d8937c5b..321f9f7e0 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckTest.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/CheckTest.kt @@ -16,16 +16,15 @@ class A(val repository: MyRepository) class CheckTest { internal object MyComponents { - val modulee : Module = module { + val modulee: Module = module { factory { A( - repository = get() + repository = get(), ) } } } - class CheckModulesTest { @get:Rule @@ -44,4 +43,4 @@ class CheckTest { } } } -} \ No newline at end of file +} diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/Components.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/Components.kt index e58b6620d..4ac4843b4 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/Components.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/Components.kt @@ -15,10 +15,8 @@ class Simple { class UUIDComponent { fun getUUID() = UUID.randomUUID().toString() } - } object UpperCase : Qualifier { override val value: String = "UpperCase" - } diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareKoinContextFromRuleTest.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareKoinContextFromRuleTest.kt index fa572f029..3ace504ba 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareKoinContextFromRuleTest.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareKoinContextFromRuleTest.kt @@ -12,14 +12,16 @@ class DeclareKoinContextFromRuleTest : AutoCloseKoinTest() { @get:Rule val koinTestRule = KoinTestRule.create { printLogger(Level.DEBUG) - modules(module { - single { - Simple.ComponentA() - } - single { - Simple.MyString("simple test") - } - }) + modules( + module { + single { + Simple.ComponentA() + } + single { + Simple.MyString("simple test") + } + }, + ) } private val componentA by inject() diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockFromKoinTest.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockFromKoinTest.kt index 91968153a..d4d24a56b 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockFromKoinTest.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockFromKoinTest.kt @@ -27,9 +27,9 @@ class DeclareMockFromKoinTest : AutoCloseKoinTest() { startKoin { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) } @@ -46,9 +46,9 @@ class DeclareMockFromKoinTest : AutoCloseKoinTest() { startKoin { printLogger(Level.DEBUG) modules( - module { - factory { Simple.UUIDComponent() } - } + module { + factory { Simple.UUIDComponent() } + }, ) } diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt index b6883df2a..f0e1a8745 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/DeclareMockTests.kt @@ -26,9 +26,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) }.koin @@ -49,11 +49,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun `declare and stub an existing scoped definition`() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.UUIDComponent() } - } + module { + scope(named()) { + scoped { Simple.UUIDComponent() } } + }, ) }.koin @@ -76,11 +76,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun `declare a Mock of an existing definition for given scope`() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -99,11 +99,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun `declare and mock an existing definition for given scope`() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.UUIDComponent() } - } + module { + scope(named()) { + scoped { Simple.UUIDComponent() } } + }, ) }.koin @@ -127,9 +127,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.ComponentA() } - } + module { + single { Simple.ComponentA() } + }, ) }.koin @@ -147,9 +147,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) }.koin @@ -170,9 +170,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun `mock with qualifier`() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single(named("test")) { Simple.ComponentA() } - }) + modules( + module { + single(named("test")) { Simple.ComponentA() } + }, + ) }.koin koin.declareMock(named("test")) diff --git a/core/koin-test-junit4/src/test/kotlin/org/koin/test/KoinTestRuleTest.kt b/core/koin-test-junit4/src/test/kotlin/org/koin/test/KoinTestRuleTest.kt index 92b150538..efcf9b79f 100644 --- a/core/koin-test-junit4/src/test/kotlin/org/koin/test/KoinTestRuleTest.kt +++ b/core/koin-test-junit4/src/test/kotlin/org/koin/test/KoinTestRuleTest.kt @@ -37,4 +37,4 @@ class KoinTestRuleTest : KoinTest { * * @author Jan Mottl */ -private class TestType \ No newline at end of file +private class TestType diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt index ce90d928e..3676ca673 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/AutoCloseKoinTest.kt @@ -38,4 +38,4 @@ interface ClosingKoinTest : KoinTest { fun autoClose() { stopKoin() } -} \ No newline at end of file +} diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt index 9812c1ba5..5d097a4e4 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/KoinTestExtension.kt @@ -25,8 +25,8 @@ import org.koin.dsl.KoinAppDeclaration * [TestExtension] which will automatically start and stop Koin. * @author Marko Pukari */ -class KoinTestExtension private constructor(private val appDeclaration: KoinAppDeclaration): - BeforeEachCallback, AfterEachCallback, ParameterResolver { +class KoinTestExtension private constructor(private val appDeclaration: KoinAppDeclaration) : + BeforeEachCallback, AfterEachCallback, ParameterResolver { override fun beforeEach(context: ExtensionContext) { val koin = startKoin(appDeclaration = appDeclaration).koin @@ -55,7 +55,6 @@ class KoinTestExtension private constructor(private val appDeclaration: KoinAppD return KoinTestExtension(appDeclaration) } - private val KOIN_STORE: ExtensionContext.Namespace = ExtensionContext.Namespace.create("KOIN_STORE") + private val KOIN_STORE: ExtensionContext.Namespace = ExtensionContext.Namespace.create("KOIN_STORE") } - } diff --git a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt index ee1fc299c..ceeb94ed2 100644 --- a/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt +++ b/core/koin-test-junit5/src/main/kotlin/org/koin/test/junit5/mock/MockProviderExtension.kt @@ -20,7 +20,6 @@ import org.junit.jupiter.api.extension.ExtensionContext import org.koin.test.mock.MockProvider import org.koin.test.mock.Provider - class MockProviderExtension private constructor(private val mockProvider: Provider<*>) : BeforeEachCallback { companion object { @@ -32,4 +31,4 @@ class MockProviderExtension private constructor(private val mockProvider: Provid override fun beforeEach(context: ExtensionContext?) { MockProvider.register(mockProvider) } -} \ No newline at end of file +} diff --git a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/Components.kt b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/Components.kt index da9d2e704..d897240bf 100644 --- a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/Components.kt +++ b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/Components.kt @@ -16,5 +16,4 @@ class Simple { object UpperCase : Qualifier { override val value: String = "UpperCase" - } diff --git a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt index 71e8a1ed1..f9e456413 100644 --- a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt +++ b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareKoinContextFromExtensionTest.kt @@ -18,14 +18,16 @@ class DeclareKoinContextFromExtensionTest : KoinTest { @RegisterExtension val koinTestExtension = KoinTestExtension.create { printLogger(Level.DEBUG) - modules(module { - single { - Simple.ComponentA() - } - single { - Simple.MyString("simple test") - } - }) + modules( + module { + single { + Simple.ComponentA() + } + single { + Simple.MyString("simple test") + } + }, + ) } private val componentA by inject() diff --git a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockFromKoinTest.kt b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockFromKoinTest.kt index a0d0d49bf..739db31e1 100644 --- a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockFromKoinTest.kt +++ b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockFromKoinTest.kt @@ -31,9 +31,9 @@ class DeclareMockFromKoinTest : AutoCloseKoinTest() { startKoin { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) } @@ -51,9 +51,9 @@ class DeclareMockFromKoinTest : AutoCloseKoinTest() { startKoin { printLogger(Level.DEBUG) modules( - module { - factory { Simple.UUIDComponent() } - } + module { + factory { Simple.UUIDComponent() } + }, ) } diff --git a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt index 155366c0d..94b709b44 100644 --- a/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt +++ b/core/koin-test-junit5/src/test/kotlin/org/koin/test/junit5/DeclareMockTests.kt @@ -29,9 +29,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) }.koin @@ -53,11 +53,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun whenStubbingExistingScopedDefinition() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.UUIDComponent() } - } + module { + scope(named()) { + scoped { Simple.UUIDComponent() } } + }, ) }.koin @@ -81,11 +81,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun whenDeclaringMockForExistingDefinitionForGivenScope() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.ComponentA() } - } + module { + scope(named()) { + scoped { Simple.ComponentA() } } + }, ) }.koin @@ -105,11 +105,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun whenDeclaringAndMockingAnExistingDefinitionForGivenScope() { val koin = koinApplication { modules( - module { - scope(named()) { - scoped { Simple.UUIDComponent() } - } + module { + scope(named()) { + scoped { Simple.UUIDComponent() } } + }, ) }.koin @@ -134,9 +134,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.ComponentA() } - } + module { + single { Simple.ComponentA() } + }, ) }.koin @@ -155,9 +155,9 @@ class DeclareMockTests : AutoCloseKoinTest() { val koin = koinApplication { printLogger(Level.DEBUG) modules( - module { - single { Simple.UUIDComponent() } - } + module { + single { Simple.UUIDComponent() } + }, ) }.koin @@ -179,9 +179,11 @@ class DeclareMockTests : AutoCloseKoinTest() { fun whenMockWithQualifier() { val koin = koinApplication { printLogger(Level.DEBUG) - modules(module { - single(named("test")) { Simple.ComponentA() } - }) + modules( + module { + single(named("test")) { Simple.ComponentA() } + }, + ) }.koin koin.declareMock(named("test")) diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt index f904250cd..35338d6ae 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/KoinTest.kt @@ -36,7 +36,7 @@ interface KoinTest : KoinComponent */ inline fun KoinTest.get( qualifier: Qualifier? = null, - noinline parameters: ParametersDefinition? = null + noinline parameters: ParametersDefinition? = null, ): T = getKoin().get(qualifier, parameters) @@ -46,5 +46,5 @@ inline fun KoinTest.get( inline fun KoinTest.inject( qualifier: Qualifier? = null, mode: LazyThreadSafetyMode = KoinPlatformTools.defaultLazyMode(), - noinline parameters: ParametersDefinition? = null -): Lazy = lazy(mode) { get(qualifier, parameters) } \ No newline at end of file + noinline parameters: ParametersDefinition? = null, +): Lazy = lazy(mode) { get(qualifier, parameters) } diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt index 11eb39b80..1f538b63b 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/category/CheckModuleTest.kt @@ -15,4 +15,4 @@ */ package org.koin.test.category -interface CheckModuleTest \ No newline at end of file +interface CheckModuleTest diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt index 9f0518c48..83a012abd 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt @@ -57,7 +57,7 @@ fun checkModules(level: Level = Level.INFO, parameters: CheckParameters? = null, * @param appDeclaration - Koin app config if needed * @param parameters - Check parameters DSL */ -fun checkKoinModules(modules : List, appDeclaration: KoinAppDeclaration = {}, parameters: CheckParameters? = null) { +fun checkKoinModules(modules: List, appDeclaration: KoinAppDeclaration = {}, parameters: CheckParameters? = null) { startKoin(appDeclaration) .modules(modules) .checkModules(parameters) @@ -83,7 +83,7 @@ fun checkKoinModules(level: Level = Level.INFO, parameters: CheckParameters? = n * Deprecated */ @Deprecated("use instead checkKoinModules(modules : List, appDeclaration: KoinAppDeclaration = {}, parameters: CheckParameters? = null)") -fun checkKoinModules(vararg modules : Module, level: Level = Level.INFO, parameters: CheckParameters? = null) { +fun checkKoinModules(vararg modules: Module, level: Level = Level.INFO, parameters: CheckParameters? = null) { startKoin({}) .logger(KoinPlatformTools.defaultLogger(level)) .checkModules(parameters) @@ -97,7 +97,7 @@ fun Koin.checkModules(parametersDefinition: CheckParameters? = null) { logger.info("[Check] checking modules ...") checkAllDefinitions( - declareParameterCreators(parametersDefinition) + declareParameterCreators(parametersDefinition), ) logger.info("[Check] All checked") @@ -113,7 +113,7 @@ private fun Koin.checkAllDefinitions(allParameters: ParametersBinding) { allParameters.scopeLinks.forEach { scopeLink -> val linkTargets = scopes.filter { it.scopeQualifier == scopeLink.value } scopes.filter { it.scopeQualifier == scopeLink.key } - .forEach { scope -> linkTargets.forEach { linkTarget -> scope.linkTo(linkTarget) } } + .forEach { scope -> linkTargets.forEach { linkTarget -> scope.linkTo(linkTarget) } } } instanceRegistry.instances.values.toSet().forEach { factory -> checkDefinition(allParameters, factory.beanDefinition, scopes.first { it.scopeQualifier == factory.beanDefinition.scopeQualifier }) @@ -131,19 +131,23 @@ private fun Koin.instantiateAllScopes(allParameters: ParametersBinding): List, - scope: Scope + scope: Scope, ) { - val parameters: ParametersHolder = allParameters.parametersCreators[CheckedComponent( + val parameters: ParametersHolder = allParameters.parametersCreators[ + CheckedComponent( + definition.qualifier, + definition.primaryType, + ), + ]?.invoke( definition.qualifier, - definition.primaryType - )]?.invoke( - definition.qualifier ) ?: MockParameter(scope, allParameters.defaultValues) logger.info("[Check] definition: $definition") scope.get(definition.primaryType, definition.qualifier) { parameters } diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt index b0b778acf..f154ac1af 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModulesDSL.kt @@ -66,9 +66,9 @@ class ParametersBinding(val koin: Koin) { fun withProperty(key: String, value: Any) = koin.setProperty(key, value) inline fun withScopeLink() = withScopeLink(qualifier(), qualifier()) inline fun withScopeLink(scopeQualifier: Qualifier, targetScopeQualifier: Qualifier) = - scopeLinks.put(scopeQualifier, targetScopeQualifier) + scopeLinks.put(scopeQualifier, targetScopeQualifier) } typealias ParametersCreator = (Qualifier?) -> ParametersHolder typealias ParametersInstance = (Qualifier?) -> Any -typealias CheckParameters = ParametersBinding.() -> Unit \ No newline at end of file +typealias CheckParameters = ParametersBinding.() -> Unit diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/Declare.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/Declare.kt index 5891ce549..e7e35ecfe 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/Declare.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/Declare.kt @@ -7,9 +7,9 @@ import org.koin.test.get inline fun KoinTest.declare( qualifier: Qualifier? = null, - noinline instance: () -> T + noinline instance: () -> T, ): T { val koin = KoinPlatformTools.defaultContext().get() koin.declare(instance(), qualifier, allowOverride = true) return get(qualifier) -} \ No newline at end of file +} diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/DeclareMock.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/DeclareMock.kt index 94f8d3f4f..49dd490f0 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/DeclareMock.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/DeclareMock.kt @@ -28,9 +28,9 @@ import kotlin.reflect.KClass * @author Christian Schmitz */ inline fun KoinTest.declareMock( - qualifier: Qualifier? = null, - secondaryTypes: List> = emptyList(), - crossinline stubbing: StubFunction = {} + qualifier: Qualifier? = null, + secondaryTypes: List> = emptyList(), + crossinline stubbing: StubFunction = {}, ): T { return getKoin().declareMock(qualifier, secondaryTypes, stubbing) } @@ -42,13 +42,12 @@ inline fun KoinTest.declareMock( */ @OptIn(KoinInternalApi::class) inline fun Koin.declareMock( - qualifier: Qualifier? = null, - secondaryTypes: List> = emptyList(), - crossinline stubbing: StubFunction = {} + qualifier: Qualifier? = null, + secondaryTypes: List> = emptyList(), + crossinline stubbing: StubFunction = {}, ): T { logger.debug("declareMock - class:${T::class} q:$qualifier") return scopeRegistry.rootScope.declareMock(qualifier, secondaryTypes, stubbing) - } /** @@ -57,9 +56,9 @@ inline fun Koin.declareMock( * @author Christian Schmitz */ inline fun Scope.declareMock( - qualifier: Qualifier? = null, - secondaryTypes: List> = emptyList(), - stubbing: StubFunction = {} + qualifier: Qualifier? = null, + secondaryTypes: List> = emptyList(), + stubbing: StubFunction = {}, ): T { val mock = MockProvider.makeMock() declare(mock, qualifier, secondaryTypes + T::class, true) diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/MockProvider.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/MockProvider.kt index 60f338f58..8b3ea5642 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/MockProvider.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/mock/MockProvider.kt @@ -24,4 +24,4 @@ object MockProvider { } } -typealias Provider = (KClass) -> T \ No newline at end of file +typealias Provider = (KClass) -> T diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/parameter/MockParameter.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/parameter/MockParameter.kt index 99bf9c228..1f845e7dc 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/parameter/MockParameter.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/parameter/MockParameter.kt @@ -9,7 +9,7 @@ import kotlin.reflect.KClass @Suppress("UNCHECKED_CAST") class MockParameter( private val scope: Scope, - private val defaultValues: MutableMap + private val defaultValues: MutableMap, ) : ParametersHolder(arrayListOf()) { override fun elementAt(i: Int, clazz: KClass<*>): T { return defaultValues[KoinPlatformTools.getClassName(clazz)] as? T @@ -29,6 +29,6 @@ class MockParameter( override fun getOrNull(clazz: KClass<*>): T? { return defaultValues.values.firstOrNull { clazz.isInstance(it) } as? T - ?: getDefaultPrimaryValue(clazz) //?: elementAt(0, clazz) + ?: getDefaultPrimaryValue(clazz) // ?: elementAt(0, clazz) } } diff --git a/core/koin-test/src/commonTest/kotlin/org/koin/test/Components.kt b/core/koin-test/src/commonTest/kotlin/org/koin/test/Components.kt index db1802817..9765356ed 100644 --- a/core/koin-test/src/commonTest/kotlin/org/koin/test/Components.kt +++ b/core/koin-test/src/commonTest/kotlin/org/koin/test/Components.kt @@ -22,5 +22,4 @@ class Simple { object UpperCase : Qualifier { override val value: String = "UpperCase" - } diff --git a/core/koin-test/src/commonTest/kotlin/org/koin/test/DeclareTest.kt b/core/koin-test/src/commonTest/kotlin/org/koin/test/DeclareTest.kt index 809031267..9d5a780df 100644 --- a/core/koin-test/src/commonTest/kotlin/org/koin/test/DeclareTest.kt +++ b/core/koin-test/src/commonTest/kotlin/org/koin/test/DeclareTest.kt @@ -25,7 +25,7 @@ class DeclareTest : KoinTest { loadKoinModules( module { single { Simple.ComponentA() } - } + }, ) get() diff --git a/core/koin-test/src/commonTest/kotlin/org/koin/test/KoinQualifierTest.kt b/core/koin-test/src/commonTest/kotlin/org/koin/test/KoinQualifierTest.kt index ccbba819d..6fba2fbb1 100644 --- a/core/koin-test/src/commonTest/kotlin/org/koin/test/KoinQualifierTest.kt +++ b/core/koin-test/src/commonTest/kotlin/org/koin/test/KoinQualifierTest.kt @@ -7,7 +7,6 @@ import org.koin.dsl.module import kotlin.test.Test import kotlin.test.assertNotNull - class KoinQualifierTest : KoinTest { val qualifier = named("42") @@ -19,7 +18,7 @@ class KoinQualifierTest : KoinTest { modules( module { single(qualifier) { Simple.MyString("42") } - } + }, ) } @@ -27,5 +26,4 @@ class KoinQualifierTest : KoinTest { stopKoin() } - } diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt index b16763239..dd242912b 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt @@ -17,5 +17,4 @@ class Simple { object UpperCase : Qualifier { override val value: String = "UpperCase" - } diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/CircularInjectionException.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/CircularInjectionException.kt index 84e758223..335d3b6f8 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/CircularInjectionException.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/CircularInjectionException.kt @@ -1,3 +1,3 @@ package org.koin.test.verify -class CircularInjectionException(msg : String) : Exception(msg) \ No newline at end of file +class CircularInjectionException(msg: String) : Exception(msg) diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/MissingKoinDefinitionException.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/MissingKoinDefinitionException.kt index 8be9fea09..632bb48a3 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/MissingKoinDefinitionException.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/MissingKoinDefinitionException.kt @@ -1,3 +1,3 @@ package org.koin.test.verify -class MissingKoinDefinitionException(msg : String) : Exception(msg) \ No newline at end of file +class MissingKoinDefinitionException(msg: String) : Exception(msg) diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt index 0e926d979..d087e65a6 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt @@ -79,4 +79,4 @@ class Verification(val module: Module, extraTypes: List>) { } } } -} \ No newline at end of file +} diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt index 1787602fb..d88b7b5b2 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt @@ -36,7 +36,10 @@ fun List.verifyAll(extraTypes: List> = listOf()) { object Verify { internal val primitiveTypes = listOf( - String::class, Int::class, Long::class, Double::class + String::class, + Int::class, + Long::class, + Double::class, ) internal val whiteList = arrayListOf>().apply { @@ -72,4 +75,4 @@ object Verify { if (timer.getTimeInMillis() < 1000) "${timer.getTimeInMillis()} ms" else "${timer.getTimeInSeconds()} sec" println("[SUCCESS] module '$this' has been verified in $time.") } -} \ No newline at end of file +} diff --git a/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt b/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt index 23cc1fe05..667eeea60 100644 --- a/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt +++ b/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt @@ -87,9 +87,11 @@ class VerifyModulesTest { @Test fun verify_one_simple_module_w_submodule() { val module = module { - includes(module { - single { Simple.ComponentA() } - }) + includes( + module { + single { Simple.ComponentA() } + }, + ) single { Simple.ComponentB(get()) } bind Simple.MyComponentB::class } @@ -103,7 +105,7 @@ class VerifyModulesTest { @Test fun verify_one_simple_module_w_extra() { val module = module { - single { (a : Simple.ComponentA) -> Simple.ComponentB(a) } + single { (a: Simple.ComponentA) -> Simple.ComponentB(a) } } try { @@ -118,7 +120,7 @@ class VerifyModulesTest { Verify.addExtraTypes(Simple.ComponentA::class) val module = module { - single { (a : Simple.ComponentA) -> Simple.ComponentB(a) } + single { (a: Simple.ComponentA) -> Simple.ComponentB(a) } } try { @@ -134,7 +136,7 @@ class VerifyModulesTest { @Test fun verify_one_simple_module_w_extra_broken() { val module = module { - single { (a : Simple.ComponentA) -> Simple.ComponentB(a) } + single { (a: Simple.ComponentA) -> Simple.ComponentB(a) } } try { @@ -159,4 +161,4 @@ class VerifyModulesTest { System.err.println("$e") } } -} \ No newline at end of file +} From a02946e2194b384b04b34e1cec3138e02fbcb406 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Tue, 29 Aug 2023 18:34:44 +0200 Subject: [PATCH 19/55] code clean up --- android/build.gradle | 2 +- .../org/koin/android/test/verify/AndroidVerify.kt | 1 + .../main/java/org/koin/android/ext/koin/KoinExt.kt | 2 -- .../org/koin/androidx/fragment/dsl/FragmentOf.kt | 2 -- .../koin/androidx/fragment/dsl/ScopeFragmentOf.kt | 2 -- .../koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt | 1 - .../org/koin/androidx/viewmodel/dsl/ViewModelOf.kt | 1 - .../koin/androidx/workmanager/dsl/ScopeWorkerOf.kt | 1 - .../org/koin/androidx/workmanager/dsl/WorkerOf.kt | 1 - compose/build.gradle | 2 +- core/build.gradle | 2 +- core/gradle/versions.gradle | 1 + .../kotlin/org/koin/core/instance/InstanceFactory.kt | 1 + .../org/koin/core/instance/ScopedInstanceFactory.kt | 1 + .../commonMain/kotlin/org/koin/core/logger/Logger.kt | 12 ++++++------ .../commonMain/kotlin/org/koin/core/module/Module.kt | 2 +- .../org/koin/core/registry/InstanceRegistry.kt | 3 ++- .../commonMain/kotlin/org/koin/core/scope/Scope.kt | 1 + .../src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt | 1 + .../kotlin/org/koin/core/instance/InstanceBuilder.kt | 2 ++ .../org/koin/core/registry/PropertyRegistryExt.kt | 1 + .../kotlin/org/koin/test/check/CheckModules.kt | 2 ++ ktor/build.gradle | 2 +- 23 files changed, 24 insertions(+), 22 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 55643a5f1..47cb866d0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,7 +20,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version "$validator_version" } wrapper { diff --git a/android/koin-android-test/src/main/java/org/koin/android/test/verify/AndroidVerify.kt b/android/koin-android-test/src/main/java/org/koin/android/test/verify/AndroidVerify.kt index d841ffd0f..18c9f554f 100644 --- a/android/koin-android-test/src/main/java/org/koin/android/test/verify/AndroidVerify.kt +++ b/android/koin-android-test/src/main/java/org/koin/android/test/verify/AndroidVerify.kt @@ -9,6 +9,7 @@ import androidx.work.WorkerParameters import org.koin.android.test.verify.AndroidVerify.androidTypes import org.koin.core.annotation.KoinExperimentalAPI import org.koin.core.module.Module +import org.koin.test.verify.MissingKoinDefinitionException import kotlin.reflect.KClass /** diff --git a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt index d22d43287..37e333168 100644 --- a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt +++ b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt @@ -73,11 +73,9 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication { /** * Load properties file from Assets - * @param androidContext * @param koinPropertyFile */ @OptIn(KoinInternalApi::class) - fun KoinApplication.androidFileProperties( koinPropertyFile: String = "koin.properties", ): KoinApplication { diff --git a/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt b/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt index 17036b709..35338a25c 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/FragmentOf.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) - package org.koin.androidx.fragment.dsl import androidx.fragment.app.Fragment diff --git a/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/ScopeFragmentOf.kt b/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/ScopeFragmentOf.kt index a1811ed16..feb6f9bad 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/ScopeFragmentOf.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/fragment/dsl/ScopeFragmentOf.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) - package org.koin.androidx.fragment.dsl import androidx.fragment.app.Fragment diff --git a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt index e06e2cb19..7c26d27be 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ScopeViewModelOf.kt @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.androidx.viewmodel.dsl diff --git a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ViewModelOf.kt b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ViewModelOf.kt index a5ca2f75b..777c440e0 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ViewModelOf.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/dsl/ViewModelOf.kt @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.androidx.viewmodel.dsl diff --git a/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt b/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt index 33ce1238c..4cd836d67 100644 --- a/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt +++ b/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/ScopeWorkerOf.kt @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.androidx.workmanager.dsl diff --git a/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/WorkerOf.kt b/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/WorkerOf.kt index 8b87a4319..06da91c5a 100644 --- a/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/WorkerOf.kt +++ b/android/koin-androidx-workmanager/src/main/java/org/koin/androidx/workmanager/dsl/WorkerOf.kt @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:OptIn(KoinInternalApi::class) package org.koin.androidx.workmanager.dsl diff --git a/compose/build.gradle b/compose/build.gradle index 606ea3e16..69e8046f9 100644 --- a/compose/build.gradle +++ b/compose/build.gradle @@ -22,7 +22,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version "$validator_version" } wrapper { diff --git a/core/build.gradle b/core/build.gradle index aacfcef24..c09e1753a 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -16,7 +16,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version "$validator_version" } wrapper { diff --git a/core/gradle/versions.gradle b/core/gradle/versions.gradle index fdb5038af..86d2684d8 100644 --- a/core/gradle/versions.gradle +++ b/core/gradle/versions.gradle @@ -4,6 +4,7 @@ ext { // Kotlin kotlin_version = '1.9.10' + validator_version = '0.13.2' coroutines_version = "1.7.3" diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt index 4825ed621..82dd3d928 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/InstanceFactory.kt @@ -70,6 +70,7 @@ abstract class InstanceFactory(val beanDefinition: BeanDefinition) : Locka abstract fun dropAll() + @Suppress("NAME_SHADOWING") override fun equals(other: Any?): Boolean { val other = (other as? InstanceFactory<*>)?.beanDefinition return beanDefinition == other diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt index 462ac0242..ea858be00 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/instance/ScopedInstanceFactory.kt @@ -62,6 +62,7 @@ class ScopedInstanceFactory(beanDefinition: BeanDefinition) : values.clear() } + @Suppress("UNCHECKED_CAST") fun refreshInstance(scopeID: ScopeID, instance: Any) { values[scopeID] = instance as T } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt index 968cbd766..c65a8693f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/Logger.kt @@ -24,29 +24,29 @@ abstract class Logger(var level: Level = Level.INFO) { abstract fun display(level: Level, msg: MESSAGE) - inline fun debug(msg: MESSAGE) { + fun debug(msg: MESSAGE) { log(Level.DEBUG, msg) } - inline fun info(msg: MESSAGE) { + fun info(msg: MESSAGE) { log(Level.INFO, msg) } - inline fun warn(msg: MESSAGE) { + fun warn(msg: MESSAGE) { log(Level.WARNING, msg) } - inline fun error(msg: MESSAGE) { + fun error(msg: MESSAGE) { log(Level.ERROR, msg) } fun isAt(lvl: Level): Boolean = this.level <= lvl - inline fun log(lvl: Level, msg: String) { + fun log(lvl: Level, msg: String) { if (isAt(lvl)) display(lvl, msg) } - inline fun log(lvl: Level, msg: () -> String) { + fun log(lvl: Level, msg: () -> String) { if (isAt(lvl)) display(lvl, msg()) } } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index ca80eba23..8bb8a9ae4 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -239,7 +239,7 @@ tailrec fun flatten(modules: List, newModules: Set = emptySet()) return if (modules.isEmpty()) { newModules } else { - val head = modules.first() ?: error("Flatten - No head element in list") + val head = modules.first() val tail = modules.subList(1, modules.size) if (head.includedModules.isEmpty()) { flatten(tail, newModules + head) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt index 891d97937..f5edeb1c7 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/InstanceRegistry.kt @@ -33,6 +33,7 @@ import org.koin.core.scope.ScopeID import org.koin.mp.KoinPlatformTools.safeHashMap import kotlin.reflect.KClass +@Suppress("UNCHECKED_CAST") @OptIn(KoinInternalApi::class) class InstanceRegistry(val _koin: Koin) { @@ -162,7 +163,7 @@ class InstanceRegistry(val _koin: Koin) { } internal fun close() { - _instances.forEach { (key, factory) -> + _instances.forEach { (_, factory) -> factory.dropAll() } _instances.clear() diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index b485e3f1c..bbc746954 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -35,6 +35,7 @@ import org.koin.mp.KoinPlatformTools import org.koin.mp.Lockable import kotlin.reflect.KClass +@Suppress("UNCHECKED_CAST") @OptIn(KoinInternalApi::class) @KoinDslMarker data class Scope( diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt index 12ee0a49d..276d8cb6a 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/ModuleDSL.kt @@ -30,6 +30,7 @@ typealias ModuleDeclaration = Module.() -> Unit * @param createdAtStart * */ +@Suppress("UNUSED_PARAMETER") @Deprecated("'override' parameter is not used anymore. See 'allowOverride' in KoinApplication") @KoinDslMarker fun module(createdAtStart: Boolean = false, override: Boolean = false, moduleDeclaration: ModuleDeclaration): Module { diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt index 63fab8aa4..64f43cf44 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/instance/InstanceBuilder.kt @@ -1,3 +1,5 @@ +@file:Suppress("UNCHECKED_CAST") + package org.koin.core.instance import org.koin.core.annotation.KoinReflectAPI diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt index 7d77d8428..336b0eb89 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt @@ -7,6 +7,7 @@ import java.util.* /** *Save properties values into PropertyRegister */ +@Suppress("UNCHECKED_CAST") fun PropertyRegistry.saveProperties(properties: Properties) { _koin.logger.debug("load ${properties.size} properties") diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt index 83a012abd..997b7eafc 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +@file:Suppress("UNUSED_PARAMETER") + package org.koin.test.check import org.koin.core.Koin diff --git a/ktor/build.gradle b/ktor/build.gradle index e79c0cf33..091e84c27 100644 --- a/ktor/build.gradle +++ b/ktor/build.gradle @@ -16,7 +16,7 @@ buildscript { } plugins { - id 'org.jetbrains.kotlinx.binary-compatibility-validator' version '0.13.2' + id 'org.jetbrains.kotlinx.binary-compatibility-validator' version "$validator_version" } wrapper { From 0e9ec2c072b2d4d45392c04f799e03eb338f5634 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:22:03 +0200 Subject: [PATCH 20/55] core & test version update --- core/gradle/versions.gradle | 2 +- core/koin-core/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/gradle/versions.gradle b/core/gradle/versions.gradle index 86d2684d8..fc88e39a9 100644 --- a/core/gradle/versions.gradle +++ b/core/gradle/versions.gradle @@ -13,7 +13,7 @@ ext { // Test junit_version = "4.13.2" - junit5_version = "5.8.2" + junit5_version = "5.9.3" mockito_version = "4.7.0" mockk_version = "1.12.2" } \ No newline at end of file diff --git a/core/koin-core/build.gradle b/core/koin-core/build.gradle index f2dd62fa8..0f3c6512c 100644 --- a/core/koin-core/build.gradle +++ b/core/koin-core/build.gradle @@ -88,7 +88,7 @@ kotlin { nativeMain { dependsOn commonMain dependencies { - implementation "co.touchlab:stately-concurrency:1.2.2" + implementation "co.touchlab:stately-concurrency:1.2.5" } } From 1fb1193e5caf565dc5b387a5ae1e67502ec294ba Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:22:15 +0200 Subject: [PATCH 21/55] android update --- android/gradle/versions.gradle | 2 +- android/koin-android/build.gradle | 4 ++-- android/koin-androidx-navigation/build.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/gradle/versions.gradle b/android/gradle/versions.gradle index 4350d6021..73670cfbd 100644 --- a/android/gradle/versions.gradle +++ b/android/gradle/versions.gradle @@ -1,6 +1,6 @@ ext { // Koin Versions - koin_android_version = '3.4.3' + koin_android_version = '3.5.0' // build Tools android_min_version = 14 diff --git a/android/koin-android/build.gradle b/android/koin-android/build.gradle index 8a83d3b7e..7fb9e170b 100644 --- a/android/koin-android/build.gradle +++ b/android/koin-android/build.gradle @@ -24,8 +24,8 @@ dependencies { api "io.insert-koin:koin-core:$koin_version" api "androidx.appcompat:appcompat:1.6.1" - api "androidx.activity:activity-ktx:1.6.1" - api "androidx.fragment:fragment-ktx:1.5.7" + api "androidx.activity:activity-ktx:1.7.2" + api "androidx.fragment:fragment-ktx:1.6.1" api "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1" api("androidx.lifecycle:lifecycle-common-java8:2.6.1") diff --git a/android/koin-androidx-navigation/build.gradle b/android/koin-androidx-navigation/build.gradle index 76d6fbf10..5563b5035 100644 --- a/android/koin-androidx-navigation/build.gradle +++ b/android/koin-androidx-navigation/build.gradle @@ -31,7 +31,7 @@ dependencies { api project(":koin-android") // Android - api "androidx.navigation:navigation-fragment-ktx:2.5.3" + api "androidx.navigation:navigation-fragment-ktx:2.7.1" } apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file From aff4f42ca9afaad3bec1c7d7f3907eb0ea4388c2 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:22:26 +0200 Subject: [PATCH 22/55] ktor update --- ktor/gradle/versions.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ktor/gradle/versions.gradle b/ktor/gradle/versions.gradle index b0dab1709..b43980d68 100644 --- a/ktor/gradle/versions.gradle +++ b/ktor/gradle/versions.gradle @@ -1,6 +1,6 @@ ext { // Koin - koin_ktor_version = '3.4.3' + koin_ktor_version = '3.5.0' // Ktor - ktor_version = '2.3.2' + ktor_version = '2.3.3' } \ No newline at end of file From cc44d818e4184607d77d3a3e587c582966cba318 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:31:34 +0200 Subject: [PATCH 23/55] keep back to kotlin 1.9.0 due to compose compiler compat --- core/gradle/versions.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/gradle/versions.gradle b/core/gradle/versions.gradle index fc88e39a9..94cd1d57b 100644 --- a/core/gradle/versions.gradle +++ b/core/gradle/versions.gradle @@ -3,7 +3,7 @@ ext { koin_version = '3.5.0' // Kotlin - kotlin_version = '1.9.10' + kotlin_version = '1.9.0' //TODO wait Compose for 1.9.10 or + validator_version = '0.13.2' coroutines_version = "1.7.3" From ea90be4d94dfa244744704e726793edd4c7bd12a Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:33:13 +0200 Subject: [PATCH 24/55] compose 1.5.0 update --- compose/gradle.properties | 2 +- compose/gradle/versions.gradle | 16 ++++++++-------- .../build.gradle | 2 +- compose/koin-androidx-compose/build.gradle | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compose/gradle.properties b/compose/gradle.properties index e2cb4ebe5..b00d9ceb2 100644 --- a/compose/gradle.properties +++ b/compose/gradle.properties @@ -24,6 +24,6 @@ org.gradle.configureondemand=false # Kotlin kotlin.incremental=true org.gradle.caching=true -kotlin.mpp.enableGranularSourceSetsMetadata=true +#kotlin.mpp.enableGranularSourceSetsMetadata=true android.useAndroidX=true diff --git a/compose/gradle/versions.gradle b/compose/gradle/versions.gradle index d7aafbe5b..450d077f2 100644 --- a/compose/gradle/versions.gradle +++ b/compose/gradle/versions.gradle @@ -1,17 +1,17 @@ ext { // Koin Versions - koin_androidx_compose_version = '3.4.6' - koin_compose_version = "1.0.4" + koin_androidx_compose_version = '3.5.0' + koin_compose_version = "1.1.0" // Compose - compose_compiler = "1.4.8" + compose_compiler = "1.5.0" // JB Compose - jb_compose_version = "1.4.3" + jb_compose_version = "1.5.0" - // TODO Forced Version to keep compat - kotlin_version = '1.8.22' - koin_version = '3.4.3' - koin_android_version = '3.4.3' + // Forced Version to keep compat + kotlin_version = '1.9.0' + koin_version = '3.5.0' + koin_android_version = '3.5.0' } \ No newline at end of file diff --git a/compose/koin-androidx-compose-navigation/build.gradle b/compose/koin-androidx-compose-navigation/build.gradle index c69c878ef..834f55038 100644 --- a/compose/koin-androidx-compose-navigation/build.gradle +++ b/compose/koin-androidx-compose-navigation/build.gradle @@ -39,7 +39,7 @@ dependencies { // Koin api project(":koin-androidx-compose") // Navigation - api "androidx.navigation:navigation-compose:2.5.3" + api "androidx.navigation:navigation-compose:2.7.1" } apply from: '../../gradle/publish-to-central.gradle' diff --git a/compose/koin-androidx-compose/build.gradle b/compose/koin-androidx-compose/build.gradle index 95219c581..0de91c231 100644 --- a/compose/koin-androidx-compose/build.gradle +++ b/compose/koin-androidx-compose/build.gradle @@ -42,7 +42,7 @@ dependencies { api "io.insert-koin:koin-android:$koin_android_version" api project(":koin-compose") // Compose - api "androidx.compose.runtime:runtime:1.4.3" + api "androidx.compose.runtime:runtime:1.5.0" api "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1" } From bbd18decab33a8879d2b4443d760dafcbb668780 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:45:07 +0200 Subject: [PATCH 25/55] allow to run koinApplication and specify if eager instances are created or not --- core/koin-core/api/koin-core.api | 4 +-- .../commonMain/kotlin/org/koin/core/Koin.kt | 2 +- .../kotlin/org/koin/dsl/KoinApplication.kt | 9 ++++-- .../org/koin/core/DeclareInstanceTest.kt | 30 +++++++++++++++++++ .../org/koin/core/context/GlobalContext.kt | 4 +-- 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/core/koin-core/api/koin-core.api b/core/koin-core/api/koin-core.api index 7386b7f5d..c6f1f3a89 100644 --- a/core/koin-core/api/koin-core.api +++ b/core/koin-core/api/koin-core.api @@ -585,8 +585,8 @@ public final class org/koin/dsl/DefinitionBindingKt { } public final class org/koin/dsl/KoinApplicationKt { - public static final fun koinApplication (Lkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; - public static synthetic fun koinApplication$default (Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; + public static final fun koinApplication (ZLkotlin/jvm/functions/Function1;)Lorg/koin/core/KoinApplication; + public static synthetic fun koinApplication$default (ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/koin/core/KoinApplication; } public final class org/koin/dsl/ModuleDSLKt { diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index 626f4ce63..01a98bc01 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -317,7 +317,7 @@ class Koin { * Create Single instances Definitions marked as createdAtStart */ fun createEagerInstances() { - logger.debug("Eager instances ...") + logger.debug("Create eager instances ...") val duration = measureDuration { instanceRegistry.createAllEagerInstances() } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt index 9c7de2079..c898f4bfc 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/dsl/KoinApplication.kt @@ -23,11 +23,16 @@ typealias KoinAppDeclaration = KoinApplication.() -> Unit /** * Create a KoinApplication instance and help configure it * @author Arnaud Giuliani + * + * @param createEagerInstances - allow to create eager instances or not + * @param appDeclaration */ @KoinApplicationDslMarker -fun koinApplication(appDeclaration: KoinAppDeclaration? = null): KoinApplication { +fun koinApplication(createEagerInstances : Boolean = true, appDeclaration: KoinAppDeclaration? = null): KoinApplication { val koinApplication = KoinApplication.init() appDeclaration?.invoke(koinApplication) - koinApplication.createEagerInstances() + if (createEagerInstances) { + koinApplication.createEagerInstances() + } return koinApplication } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt index 7db2b9dc9..f3411f62d 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/DeclareInstanceTest.kt @@ -264,4 +264,34 @@ class DeclareInstanceTest { session2.get() } + + @Test + fun `avoid to start eager instances`() { + var count = 0 + koinApplication { + modules( + module { + single(createdAtStart = true){ + count++ + Simple.ComponentA() + } + }, + ) + } + + assertEquals(1,count) + count = 0 + + koinApplication(createEagerInstances = false) { + modules( + module { + single(createdAtStart = true){ + count++ + Simple.ComponentA() + } + }, + ) + } + assertEquals(0,count) + } } diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index 8b2655809..e1b0f8d77 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -55,7 +55,7 @@ internal class MutableGlobalContext : KoinContext { override fun startKoin(koinApplication: KoinApplication): KoinApplication = lock.withLock { register(koinApplication) koinApplication.createEagerInstances() - return koinApplication + koinApplication } override fun startKoin(appDeclaration: KoinAppDeclaration): KoinApplication = lock.withLock { @@ -63,7 +63,7 @@ internal class MutableGlobalContext : KoinContext { register(koinApplication) appDeclaration(koinApplication) koinApplication.createEagerInstances() - return koinApplication + koinApplication } override fun loadKoinModules(module: Module) = lock.withLock { From d7382d92b232296eb37a4adfec4366378d60db47 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 10:48:46 +0200 Subject: [PATCH 26/55] K2 experiment property --- core/gradle.properties | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/gradle.properties b/core/gradle.properties index 19058b8e2..5772b2bf8 100644 --- a/core/gradle.properties +++ b/core/gradle.properties @@ -25,4 +25,7 @@ org.gradle.configureondemand=false kotlin.incremental=true org.gradle.caching=true #kotlin.mpp.enableGranularSourceSetsMetadata=true -#kotlin.native.enableDependencyPropagation=false \ No newline at end of file +#kotlin.native.enableDependencyPropagation=false + +# K2 experiment +# kotlin.experimental.tryK2=true \ No newline at end of file From d2597b8d9d27c4119f9a79010b0698b999955006 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 11:09:51 +0200 Subject: [PATCH 27/55] add 3.5.0 branch to security scan --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0a557794f..fa0426297 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,10 +2,10 @@ name: "CodeQL" on: push: - branches: [ 'main' ] + branches: [ 'main','3.5.0' ] pull_request: # The branches below must be a subset of the branches above - branches: [ 'main' ] + branches: [ 'main','3.5.0' ] schedule: - cron: '52 13 * * 6' From f12ee82a939b2d7860552a413675daf001e17427 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 11:36:06 +0200 Subject: [PATCH 28/55] fix compose compilation --- .../build.gradle | 2 +- compose/koin-androidx-compose/build.gradle | 2 +- .../kotlin/org/koin/compose/KoinApplication.kt | 2 +- compose/sample-android-compose/build.gradle | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compose/koin-androidx-compose-navigation/build.gradle b/compose/koin-androidx-compose-navigation/build.gradle index 834f55038..3eb2f98fe 100644 --- a/compose/koin-androidx-compose-navigation/build.gradle +++ b/compose/koin-androidx-compose-navigation/build.gradle @@ -14,7 +14,7 @@ ext { } android { - compileSdkVersion 33 + compileSdkVersion 34 buildToolsVersion '30.0.3' defaultConfig { diff --git a/compose/koin-androidx-compose/build.gradle b/compose/koin-androidx-compose/build.gradle index 0de91c231..b6df4fed3 100644 --- a/compose/koin-androidx-compose/build.gradle +++ b/compose/koin-androidx-compose/build.gradle @@ -15,7 +15,7 @@ ext { } android { - compileSdkVersion 33 + compileSdkVersion 34 buildToolsVersion '30.0.3' defaultConfig { diff --git a/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt b/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt index bbd594175..c511b6243 100644 --- a/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt +++ b/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt @@ -55,7 +55,7 @@ fun KoinApplication( application: KoinAppDeclaration, content: @Composable () -> Unit ) { - val koinApplication = koinApplication(application) + val koinApplication = koinApplication(appDeclaration = application) CompositionLocalProvider( LocalKoinApplication provides koinApplication.koin, LocalKoinScope provides koinApplication.koin.scopeRegistry.rootScope diff --git a/compose/sample-android-compose/build.gradle b/compose/sample-android-compose/build.gradle index b04d52657..2d2d03b81 100644 --- a/compose/sample-android-compose/build.gradle +++ b/compose/sample-android-compose/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android' apply from: "../gradle/versions.gradle" android { - compileSdkVersion 33 + compileSdkVersion 34 buildToolsVersion '30.0.3' defaultConfig { @@ -48,16 +48,16 @@ dependencies { implementation project(":koin-androidx-compose-navigation") // Compose - implementation "androidx.compose.runtime:runtime:1.3.3" - implementation "androidx.compose.ui:ui:1.3.3" - implementation "androidx.compose.foundation:foundation-layout:1.3.1" - implementation "androidx.compose.material:material:1.3.1" + implementation "androidx.compose.runtime:runtime:1.5.0" + implementation "androidx.compose.ui:ui:1.5.0" + implementation "androidx.compose.foundation:foundation-layout:1.5.0" + implementation "androidx.compose.material:material:1.5.0" - implementation "androidx.navigation:navigation-compose:2.5.3" + implementation "androidx.navigation:navigation-compose:2.7.1" // Tooling preview - debugImplementation "androidx.compose.ui:ui-tooling:1.3.3" - implementation "androidx.compose.ui:ui-tooling-preview:1.3.3" + debugImplementation "androidx.compose.ui:ui-tooling:1.5.0" + implementation "androidx.compose.ui:ui-tooling-preview:1.5.0" implementation 'androidx.appcompat:appcompat:1.6.1' testImplementation 'junit:junit:4.13.2' From b885b64b3df1725cf0f583dcebaa3067fb950081 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 11:58:19 +0200 Subject: [PATCH 29/55] try to fix CI build --- .github/workflows/build.yml | 2 +- .github/workflows/codeql.yml | 2 +- .../commonTest/kotlin/org/koin/core/SetterInjectTest.kt | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02e9cf388..797dbb810 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: run: cd android && ./test.sh build-compose: - runs-on: ubuntu-latest + runs-on: macos-latest timeout-minutes: 30 steps: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fa0426297..a2246726c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,7 +12,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: macos-latest permissions: actions: read contents: read diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt index e1a89721d..dfa00e253 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/SetterInjectTest.kt @@ -10,6 +10,7 @@ import org.koin.core.scope.Scope import org.koin.core.time.measureDuration import org.koin.dsl.module import org.koin.ext.inject +import kotlin.test.AfterTest import kotlin.test.Test class B : KoinScopeComponent { @@ -38,8 +39,14 @@ class A_inj : KoinComponent { class PlayTest { + @AfterTest + fun after(){ + stopKoin() + } + @Test fun setter_injection() { + stopKoin() val koin = startKoin { modules( module { From e03a0927331d9bf0f333d4c7f82a9c1fcda9a4c2 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 12:46:02 +0200 Subject: [PATCH 30/55] fix android compile version --- android/gradle/versions.gradle | 2 +- android/koin-android-compat/build.gradle | 2 +- android/koin-android-test/build.gradle | 2 +- android/koin-android/build.gradle | 2 +- android/koin-androidx-navigation/build.gradle | 2 +- android/koin-androidx-workmanager/build.gradle | 2 +- compose/koin-androidx-compose-navigation/build.gradle | 2 +- compose/koin-androidx-compose/build.gradle | 3 ++- compose/sample-android-compose/build.gradle | 2 +- examples/android-perfs/build.gradle | 2 +- examples/androidx-samples/build.gradle | 4 ++-- 11 files changed, 13 insertions(+), 12 deletions(-) diff --git a/android/gradle/versions.gradle b/android/gradle/versions.gradle index 73670cfbd..050652523 100644 --- a/android/gradle/versions.gradle +++ b/android/gradle/versions.gradle @@ -4,7 +4,7 @@ ext { // build Tools android_min_version = 14 - android_target_version = 33 + android_target_version = 34 android_build_tools_version = '33.0.1' android_gradle_version = '7.3.1' } \ No newline at end of file diff --git a/android/koin-android-compat/build.gradle b/android/koin-android-compat/build.gradle index 12e2eb9bf..570765511 100644 --- a/android/koin-android-compat/build.gradle +++ b/android/koin-android-compat/build.gradle @@ -7,7 +7,7 @@ ext { } android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/android/koin-android-test/build.gradle b/android/koin-android-test/build.gradle index cfd0f63ff..940c3edb6 100644 --- a/android/koin-android-test/build.gradle +++ b/android/koin-android-test/build.gradle @@ -7,7 +7,7 @@ ext { } android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/android/koin-android/build.gradle b/android/koin-android/build.gradle index 7fb9e170b..6de09fdf5 100644 --- a/android/koin-android/build.gradle +++ b/android/koin-android/build.gradle @@ -7,7 +7,7 @@ ext { } android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/android/koin-androidx-navigation/build.gradle b/android/koin-androidx-navigation/build.gradle index 5563b5035..130bc007a 100644 --- a/android/koin-androidx-navigation/build.gradle +++ b/android/koin-androidx-navigation/build.gradle @@ -7,7 +7,7 @@ ext { } android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/android/koin-androidx-workmanager/build.gradle b/android/koin-androidx-workmanager/build.gradle index 07f2f9f3b..804362d56 100644 --- a/android/koin-androidx-workmanager/build.gradle +++ b/android/koin-androidx-workmanager/build.gradle @@ -7,7 +7,7 @@ ext { } android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/compose/koin-androidx-compose-navigation/build.gradle b/compose/koin-androidx-compose-navigation/build.gradle index 3eb2f98fe..73c30e0b3 100644 --- a/compose/koin-androidx-compose-navigation/build.gradle +++ b/compose/koin-androidx-compose-navigation/build.gradle @@ -14,7 +14,7 @@ ext { } android { - compileSdkVersion 34 + compileSdk android_target_version buildToolsVersion '30.0.3' defaultConfig { diff --git a/compose/koin-androidx-compose/build.gradle b/compose/koin-androidx-compose/build.gradle index b6df4fed3..ccfbc09fa 100644 --- a/compose/koin-androidx-compose/build.gradle +++ b/compose/koin-androidx-compose/build.gradle @@ -15,11 +15,12 @@ ext { } android { - compileSdkVersion 34 + compileSdk android_target_version buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 21 + targetSdkVersion android_target_version testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/compose/sample-android-compose/build.gradle b/compose/sample-android-compose/build.gradle index 2d2d03b81..77a1f95a7 100644 --- a/compose/sample-android-compose/build.gradle +++ b/compose/sample-android-compose/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android' apply from: "../gradle/versions.gradle" android { - compileSdkVersion 34 + compileSdk android_target_version buildToolsVersion '30.0.3' defaultConfig { diff --git a/examples/android-perfs/build.gradle b/examples/android-perfs/build.gradle index ab7f46900..ec7a838a1 100644 --- a/examples/android-perfs/build.gradle +++ b/examples/android-perfs/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { diff --git a/examples/androidx-samples/build.gradle b/examples/androidx-samples/build.gradle index 00f05aae5..c51574553 100644 --- a/examples/androidx-samples/build.gradle +++ b/examples/androidx-samples/build.gradle @@ -13,12 +13,12 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion android_target_version + compileSdk android_target_version buildToolsVersion android_build_tools_version defaultConfig { minSdkVersion 23 - targetSdkVersion android_target_version +// targetSdkVersion android_target_version applicationId "org.koin.sample.sandbox" versionCode 1 versionName "1.0" From 06b846348a2045c979d9128bd6d3a97b64435c09 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 12:58:08 +0200 Subject: [PATCH 31/55] fixing build for CodeQL --- .github/workflows/codeql.yml | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a2246726c..7554f45b4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,7 +12,7 @@ on: jobs: analyze: name: Analyze - runs-on: macos-latest + runs-on: ubuntu-latest permissions: actions: read contents: read @@ -28,6 +28,15 @@ jobs: # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 11 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Checkout repository uses: actions/checkout@v3 @@ -43,25 +52,9 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - - name: Build core - working-directory: core - run: ./install.sh - - - name: Build android - working-directory: android - run: ./install.sh - - - name: Build compose - working-directory: compose - run: ./install.sh - - - name: Build ktor - working-directory: ktor - run: ./install.sh - - - name: Build plugins - working-directory: plugins - run: ./install.sh + - name: Build and install all + # working-directory: core + run: ./install_all.sh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 73acbcf0bee45388aef83a2c03040db7002459bc Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 19:10:23 +0200 Subject: [PATCH 32/55] bom project wip w --- bom/build.gradle | 16 ++ bom/gradle.properties | 31 +++ bom/gradle/publish.gradle | 129 ++++++++++ bom/gradle/versions.gradle | 5 + bom/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes bom/gradle/wrapper/gradle-wrapper.properties | 5 + bom/gradlew | 248 +++++++++++++++++++ bom/gradlew.bat | 92 +++++++ bom/install.sh | 4 + bom/koin-bom/build.gradle | 33 +++ bom/release.sh | 5 + bom/settings.gradle | 1 + 12 files changed, 569 insertions(+) create mode 100644 bom/build.gradle create mode 100644 bom/gradle.properties create mode 100644 bom/gradle/publish.gradle create mode 100644 bom/gradle/versions.gradle create mode 100644 bom/gradle/wrapper/gradle-wrapper.jar create mode 100644 bom/gradle/wrapper/gradle-wrapper.properties create mode 100755 bom/gradlew create mode 100644 bom/gradlew.bat create mode 100755 bom/install.sh create mode 100644 bom/koin-bom/build.gradle create mode 100755 bom/release.sh create mode 100644 bom/settings.gradle diff --git a/bom/build.gradle b/bom/build.gradle new file mode 100644 index 000000000..5f34cfbfc --- /dev/null +++ b/bom/build.gradle @@ -0,0 +1,16 @@ +allprojects { + + repositories { + mavenLocal() + mavenCentral() + } + + apply plugin: 'java-platform' + apply plugin: 'maven-publish' + + group = 'io.insert-koin' + + javaPlatform { + allowDependencies() + } +} \ No newline at end of file diff --git a/bom/gradle.properties b/bom/gradle.properties new file mode 100644 index 000000000..5772b2bf8 --- /dev/null +++ b/bom/gradle.properties @@ -0,0 +1,31 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +#Enable daemon +org.gradle.daemon=true + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects + +org.gradle.parallel=true +org.gradle.configureondemand=false + +# Kotlin +kotlin.incremental=true +org.gradle.caching=true +#kotlin.mpp.enableGranularSourceSetsMetadata=true +#kotlin.native.enableDependencyPropagation=false + +# K2 experiment +# kotlin.experimental.tryK2=true \ No newline at end of file diff --git a/bom/gradle/publish.gradle b/bom/gradle/publish.gradle new file mode 100644 index 000000000..739f55c1e --- /dev/null +++ b/bom/gradle/publish.gradle @@ -0,0 +1,129 @@ +apply plugin: 'maven-publish' +apply plugin: 'signing' + +// --- Prepare Settings --- +static def isReleaseBuild() { + return System.getenv('IS_RELEASE') == "true" ?: false +} +def getRepositoryUsername() { + return findProperty('OSSRH_USERNAME') ?: System.getenv('OSSRH_USERNAME') ?: "" +} +def getRepositoryPassword() { + return findProperty('OSSRH_PASSWORD') ?: System.getenv('OSSRH_PASSWORD') ?: "" +} +def getSigningKeyId() { + return findProperty('SIGNING_KEY_ID') ?: System.getenv('SIGNING_KEY_ID') ?: "" +} +def getSigningKey() { + return findProperty('SIGNING_KEY') ?: System.getenv('SIGNING_KEY') ?: "" +} +def getSigningPassword() { + return findProperty('SIGNING_PASSWORD') ?: System.getenv('SIGNING_PASSWORD') ?: "" +} + +//if (!project.tasks.findByName('sourcesJar')) { +// task sourcesJar(type: Jar) { +// archiveClassifier.set('sources') +// if (pluginManager.hasPlugin('com.android.library')) { +// from android.sourceSets.main.java.srcDirs +// } else { +// from sourceSets.main.allSource.srcDirs +// } +// } +//} +// +//artifacts { +// archives dokkaJar +// archives sourcesJar +//} + +// --- Publish --- + +// OSS Sonatype Repo +// s01.oss.sonatype.com +def OSSRepo = "s01.oss.sonatype.org" +//def OSSRepo = "oss.sonatype.org" + +afterEvaluate { + publishing { + repositories { + maven { + name "snapshot" + url = "https://$OSSRepo/content/repositories/snapshots" + credentials { + username = getRepositoryUsername() + password = getRepositoryPassword() + } + } + maven { + name "staging" + url = "https://$OSSRepo/service/local/staging/deploy/maven2" + credentials { + username = getRepositoryUsername() + password = getRepositoryPassword() + } + } + } + +// if (!pluginManager.hasPlugin('org.jetbrains.kotlin.multiplatform')) { + publications { + release(MavenPublication) { + from components.javaPlatform +// artifact sourcesJar + artifactId = project.name + } + } +// } + + publications.all { +// artifact dokkaJar + + pom.withXml { + def root = asNode() + + root.children().last() + { + resolveStrategy = Closure.DELEGATE_FIRST + + description "KOIN - Kotlin simple Dependency Injection Framework" + name project.name + url "https://insert-koin.io/" + licenses { + license { + name "The Apache Software License, Version 2.0" + url "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + scm { + url "https://github.com/InsertKoinIO/koin" + connection "scm:git:git://github.com/InsertKoinIO/koin.git" + developerConnection "scm:git:git://github.com/InsertKoinIO/koin.git" + } + developers { + developer { + id "arnaudgiuliani" + name "Arnaud Giuliani" + } + } + } + } + } + } + + if (isReleaseBuild()) { + signing { + useInMemoryPgpKeys( + getSigningKeyId(), + getSigningKey(), + getSigningPassword(), + ) + + if (pluginManager.hasPlugin('org.jetbrains.kotlin.multiplatform')) { + publishing.publications.all { + sign it + } + } else { + sign publishing.publications.release + } + } + } +} diff --git a/bom/gradle/versions.gradle b/bom/gradle/versions.gradle new file mode 100644 index 000000000..b4bd868dc --- /dev/null +++ b/bom/gradle/versions.gradle @@ -0,0 +1,5 @@ +ext { + koin_bom_version = '3.5.0' + + koin_annotations_bom_version = '1.2.3' +} \ No newline at end of file diff --git a/bom/gradle/wrapper/gradle-wrapper.jar b/bom/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f GIT binary patch literal 59203 zcma&O1CT9Y(k9%tZ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qLw78E zhY2dI8@+N^qrMI1+;TUda(vGqGSRyU{Fnm`aqrr7bz42c5xsOO-~oZpkzorD1g}Y<6rk&3>PsSGy}W?MtqFky@A(X# zIuNZK0cK?^=;PUAu>j0#HtjbHCV*6?jzA&OoE$*Jlga*}LF`SF?WLhv1O|zqC<>*> zYB;#lsYKx0&kH@BFpW8n*yDcc6?;_zaJs<-jPSkCsSX-!aV=P5kUgF@Nu<{a%#K*F z134Q{9|YX7X(v$62_cY3^G%t~rD>Q0z@)1|zs)vjJ6Jq9;7#Ki`w+eS**En?7;n&7 zu==V3T&eFboN3ZiMx3D8qYc;VjFUk_H-WWCau(VFXSQf~viH0L$gwD$UfFHqNcgN`x}M+YQ6RnN<+@t>JUp#)9YOkqst-Ga?{FsDpEeX0(5v{0J~SEbWiL zXC2}M4?UH@u&|;%0y`eb33ldo4~z-x8zY!oVmV=c+f$m?RfDC35mdQ2E>Pze7KWP- z>!Bh<&57I+O_^s}9Tg^k)h7{xx@0a0IA~GAOt2yy!X%Q$1rt~LbTB6@Du!_0%HV>N zlf)QI1&gvERKwso23mJ!Ou6ZS#zCS5W`gxE5T>C#E|{i<1D35C222I33?Njaz`On7 zi<+VWFP6D{e-{yiN#M|Jgk<44u1TiMI78S5W`Sdb5f+{zu34s{CfWN7a3Cf^@L%!& zN$?|!!9j2c)j$~+R6n#891w-z8(!oBpL2K=+%a$r2|~8-(vQj5_XT`<0Ksf;oP+tz z9CObS!0m)Tgg`K#xBM8B(|Z)Wb&DYL{WTYv`;A=q6~Nnx2+!lTIXtj8J7dZE!P_{z z#f8w6F}^!?^KE#+ZDv+xd5O&3EmomZzsv?>E-~ygGum45fk!SBN&|eo1rKw^?aZJ4 E2O(~oYXATM literal 0 HcmV?d00001 diff --git a/bom/gradle/wrapper/gradle-wrapper.properties b/bom/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..92f06b50f --- /dev/null +++ b/bom/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/bom/gradlew b/bom/gradlew new file mode 100755 index 000000000..fcb6fca14 --- /dev/null +++ b/bom/gradlew @@ -0,0 +1,248 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/bom/gradlew.bat b/bom/gradlew.bat new file mode 100644 index 000000000..6689b85be --- /dev/null +++ b/bom/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/bom/install.sh b/bom/install.sh new file mode 100755 index 000000000..ebecf8b21 --- /dev/null +++ b/bom/install.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +../gradlew publishToMavenLocal + diff --git a/bom/koin-bom/build.gradle b/bom/koin-bom/build.gradle new file mode 100644 index 000000000..e19008548 --- /dev/null +++ b/bom/koin-bom/build.gradle @@ -0,0 +1,33 @@ +apply from: "../gradle/versions.gradle" +apply from: "../../core/gradle/versions.gradle" +apply from: "../../ktor/gradle/versions.gradle" +apply from: "../../android/gradle/versions.gradle" +apply from: "../../compose/gradle/versions.gradle" + +version = "$koin_bom_version" + +dependencies { + constraints { + // core + api "io.insert-koin:koin-core:$koin_version" + api "io.insert-koin:koin-core-coroutines:$koin_version" + api "io.insert-koin:koin-test:$koin_version" + api "io.insert-koin:koin-test-junit4:$koin_version" + api "io.insert-koin:koin-test-junit5:$koin_version" + // core + api "io.insert-koin:koin-ktor:$koin_ktor_version" + api "io.insert-koin:koin-logger-slf4j:$koin_ktor_version" + // android + api "io.insert-koin:koin-android:$koin_android_version" + api "io.insert-koin:koin-android-compat:$koin_android_version" + api "io.insert-koin:koin-android-test:$koin_android_version" + api "io.insert-koin:koin-androidx-navigation:$koin_android_version" + api "io.insert-koin:koin-androidx-workmnanager:$koin_android_version" + // compose + api "io.insert-koin:koin-androidx-compose:$koin_androidx_compose_version" + api "io.insert-koin:koin-androidx-compose-navigation:$koin_androidx_compose_version" + api "io.insert-koin:koin-compose:$koin_compose_version" + } +} + +apply from: '../gradle/publish.gradle' \ No newline at end of file diff --git a/bom/release.sh b/bom/release.sh new file mode 100755 index 000000000..a1fc0a72a --- /dev/null +++ b/bom/release.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +../gradlew publishAllPublicationsToStagingRepository --max-workers 1 + + diff --git a/bom/settings.gradle b/bom/settings.gradle new file mode 100644 index 000000000..74dcb50dd --- /dev/null +++ b/bom/settings.gradle @@ -0,0 +1 @@ +include 'koin-bom' \ No newline at end of file From 1b510c31385eadf66f87ee93a3fe31bca39d26d1 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Wed, 30 Aug 2023 20:05:31 +0200 Subject: [PATCH 33/55] Fix #1519 Add koin-bom and koin-annotations-bom projects --- bom/gradle/versions.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/bom/gradle/versions.gradle b/bom/gradle/versions.gradle index b4bd868dc..590575e6c 100644 --- a/bom/gradle/versions.gradle +++ b/bom/gradle/versions.gradle @@ -1,5 +1,3 @@ ext { koin_bom_version = '3.5.0' - - koin_annotations_bom_version = '1.2.3' } \ No newline at end of file From 565f642e2ee2e3baf4ab8ffd241eaa6f32575864 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 31 Aug 2023 15:30:29 +0200 Subject: [PATCH 34/55] protect logger & make printlogger KMP --- .../java/org/koin/android/ext/koin/KoinExt.kt | 4 ++-- .../scope/LifecycleViewModelScopeDelegate.kt | 2 ++ .../koin/test/android/AndroidModuleTest.kt | 5 +++- .../koin/test/android/ext/koin/KoinExtTest.kt | 1 + .../commonMain/kotlin/org/koin/core/Koin.kt | 3 +++ .../org/koin/core/logger/PrintLogger.kt | 24 +++++++++++++++++++ .../koin/core/registry/PropertyRegistry.kt | 2 ++ .../org/koin/dsl/KoinAppCreationTest.kt | 2 ++ .../org/koin/core/logger/PrintLogger.kt | 2 +- .../org/koin/core/logger/PrintLogger.kt | 2 +- .../koin/core/registry/PropertyRegistryExt.kt | 3 +++ .../kotlin/org/koin/core/DebugLogTest.kt | 2 ++ .../org/koin/core/logger/PrintLogger.kt | 2 +- .../main/kotlin/org/koin/test/KoinTestRule.kt | 2 ++ .../org/koin/test/check/CheckModules.kt | 1 + 15 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt diff --git a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt index 37e333168..40ef4d33c 100644 --- a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt +++ b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +@file:OptIn(KoinInternalApi::class) + package org.koin.android.ext.koin import android.app.Application @@ -39,8 +41,6 @@ import java.util.* * Setup Android Logger for Koin * @param level */ -@OptIn(KoinInternalApi::class) - fun KoinApplication.androidLogger( level: Level = Level.INFO, ): KoinApplication { diff --git a/android/koin-android/src/main/java/org/koin/androidx/scope/LifecycleViewModelScopeDelegate.kt b/android/koin-android/src/main/java/org/koin/androidx/scope/LifecycleViewModelScopeDelegate.kt index 178faf830..689fee05c 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/scope/LifecycleViewModelScopeDelegate.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/scope/LifecycleViewModelScopeDelegate.kt @@ -6,12 +6,14 @@ import androidx.lifecycle.DefaultLifecycleObserver import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleOwner import org.koin.core.Koin +import org.koin.core.annotation.KoinInternalApi import org.koin.core.component.getScopeName import org.koin.core.scope.Scope import kotlin.properties.ReadOnlyProperty import kotlin.reflect.KProperty //TODO Deprecate +@OptIn(KoinInternalApi::class) class LifecycleViewModelScopeDelegate( private val lifecycleOwner: ComponentActivity, private val koin : Koin, diff --git a/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt b/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt index 99c12d1a6..ce918998b 100644 --- a/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt +++ b/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt @@ -7,7 +7,9 @@ import org.junit.Assert.assertTrue import org.junit.Test import org.koin.android.ext.koin.androidApplication import org.koin.android.ext.koin.androidContext +import org.koin.core.annotation.KoinInternalApi import org.koin.core.logger.EmptyLogger +import org.koin.core.logger.PrintLogger import org.koin.dsl.koinApplication import org.koin.dsl.module import org.koin.test.KoinTest @@ -16,6 +18,7 @@ import org.mockito.Mockito.mock /** * Android Module Tests */ +@OptIn(KoinInternalApi::class) class AndroidModuleTest : KoinTest { companion object { @@ -95,6 +98,6 @@ class AndroidModuleTest : KoinTest { modules(SampleModule) }.koin - assertTrue(koin.logger is EmptyLogger) + assertTrue(koin.logger is PrintLogger) } } \ No newline at end of file diff --git a/android/koin-android/src/test/java/org/koin/test/android/ext/koin/KoinExtTest.kt b/android/koin-android/src/test/java/org/koin/test/android/ext/koin/KoinExtTest.kt index 3c8ca309c..c8b1ecc31 100644 --- a/android/koin-android/src/test/java/org/koin/test/android/ext/koin/KoinExtTest.kt +++ b/android/koin-android/src/test/java/org/koin/test/android/ext/koin/KoinExtTest.kt @@ -18,6 +18,7 @@ import org.koin.core.logger.Logger import org.koin.core.logger.MESSAGE import org.koin.core.registry.saveProperties +@OptIn(KoinInternalApi::class) class KoinExtTest { @Test diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index 01a98bc01..dcf7efda7 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -22,7 +22,9 @@ import org.koin.core.component.getScopeName import org.koin.core.error.ScopeNotCreatedException import org.koin.core.extension.ExtensionManager import org.koin.core.logger.EmptyLogger +import org.koin.core.logger.Level import org.koin.core.logger.Logger +import org.koin.core.logger.PrintLogger import org.koin.core.module.Module import org.koin.core.module.flatten import org.koin.core.parameter.ParametersDefinition @@ -59,6 +61,7 @@ class Koin { @KoinInternalApi val extensionManager = ExtensionManager(this) + @KoinInternalApi var logger: Logger = EmptyLogger() private set diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt new file mode 100644 index 000000000..a9c8c11ea --- /dev/null +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -0,0 +1,24 @@ +/* + * Copyright 2017-Present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.koin.core.logger + +/** + * Multiplatform Basic Logger + * + * @author Arnaud Giuliani + */ +expect class PrintLogger(level: Level = Level.INFO) : Logger \ No newline at end of file diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt index 5c4373080..43b9aeafd 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/PropertyRegistry.kt @@ -16,6 +16,7 @@ package org.koin.core.registry import org.koin.core.Koin +import org.koin.core.annotation.KoinInternalApi import org.koin.mp.KoinPlatformTools /** @@ -24,6 +25,7 @@ import org.koin.mp.KoinPlatformTools * * @author Arnaud Giuliani */ +@OptIn(KoinInternalApi::class) @Suppress("UNCHECKED_CAST") class PropertyRegistry(internal val _koin: Koin) { diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt index 30bb98dce..792648eb7 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/dsl/KoinAppCreationTest.kt @@ -1,5 +1,6 @@ package org.koin.dsl +import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.core.error.KoinAppAlreadyStartedException @@ -12,6 +13,7 @@ import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.fail +@OptIn(KoinInternalApi::class) class KoinAppCreationTest { @AfterTest diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt index ad2e0ea09..c5619235d 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -class PrintLogger(level: Level = Level.INFO) : Logger(level) { +actual class PrintLogger actual constructor(level: Level) : Logger(level) { override fun display(level: Level, msg: MESSAGE) { println("[$level] $KOIN_TAG $msg") diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt index abf1f86a6..393f68f46 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -class PrintLogger(level: Level = Level.INFO) : Logger(level) { +actual class PrintLogger actual constructor(level: Level) : Logger(level) { private val printer = if (level >= Level.WARNING) System.err else System.out diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt index 336b0eb89..16c3c997a 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/registry/PropertyRegistryExt.kt @@ -1,6 +1,9 @@ +@file:OptIn(KoinInternalApi::class) + package org.koin.core.registry import org.koin.core.Koin +import org.koin.core.annotation.KoinInternalApi import org.koin.core.error.NoPropertyFileFoundException import java.util.* diff --git a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt index 37ed03575..3ccb14a5e 100644 --- a/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt +++ b/core/koin-core/src/jvmTest/kotlin/org/koin/core/DebugLogTest.kt @@ -1,10 +1,12 @@ package org.koin.core import org.junit.Test +import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.core.logger.Level +@OptIn(KoinInternalApi::class) class DebugLogTest { @Test diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt index ad2e0ea09..c5619235d 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -class PrintLogger(level: Level = Level.INFO) : Logger(level) { +actual class PrintLogger actual constructor(level: Level) : Logger(level) { override fun display(level: Level, msg: MESSAGE) { println("[$level] $KOIN_TAG $msg") diff --git a/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt b/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt index af566b5e0..e11a02aa8 100644 --- a/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt +++ b/core/koin-test-junit4/src/main/kotlin/org/koin/test/KoinTestRule.kt @@ -19,6 +19,7 @@ import org.junit.rules.TestRule import org.junit.rules.TestWatcher import org.junit.runner.Description import org.koin.core.Koin +import org.koin.core.annotation.KoinInternalApi import org.koin.core.context.startKoin import org.koin.core.context.stopKoin import org.koin.dsl.KoinAppDeclaration @@ -30,6 +31,7 @@ import org.koin.mp.KoinPlatformTools * @author Nick Cipollo * @author Jan Mottl */ +@OptIn(KoinInternalApi::class) class KoinTestRule private constructor(private val appDeclaration: KoinAppDeclaration) : TestWatcher() { private var _koin: Koin? = null diff --git a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt index 997b7eafc..44a6e4cd1 100644 --- a/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt +++ b/core/koin-test/src/commonMain/kotlin/org/koin/test/check/CheckModules.kt @@ -14,6 +14,7 @@ * limitations under the License. */ @file:Suppress("UNUSED_PARAMETER") +@file:OptIn(KoinInternalApi::class) package org.koin.test.check From 40cc6cd2d9b2ee8615baba9f20f87cb81091601a Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 31 Aug 2023 15:43:31 +0200 Subject: [PATCH 35/55] Test Bom in project + fix back KMP logger --- .../koin/test/android/AndroidModuleTest.kt | 2 +- bom/koin-bom/build.gradle | 2 +- .../commonMain/kotlin/org/koin/core/Koin.kt | 2 -- .../org/koin/core/logger/PrintLogger.kt | 24 ------------------- .../org/koin/core/logger/PrintLogger.kt | 2 +- .../org/koin/core/logger/PrintLogger.kt | 2 +- .../org/koin/core/logger/PrintLogger.kt | 2 +- examples/androidx-samples/build.gradle | 22 ++++++++--------- 8 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt diff --git a/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt b/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt index ce918998b..1c5b0af9b 100644 --- a/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt +++ b/android/koin-android/src/test/java/org/koin/test/android/AndroidModuleTest.kt @@ -98,6 +98,6 @@ class AndroidModuleTest : KoinTest { modules(SampleModule) }.koin - assertTrue(koin.logger is PrintLogger) + assertTrue(koin.logger is EmptyLogger) } } \ No newline at end of file diff --git a/bom/koin-bom/build.gradle b/bom/koin-bom/build.gradle index e19008548..004e6b410 100644 --- a/bom/koin-bom/build.gradle +++ b/bom/koin-bom/build.gradle @@ -22,7 +22,7 @@ dependencies { api "io.insert-koin:koin-android-compat:$koin_android_version" api "io.insert-koin:koin-android-test:$koin_android_version" api "io.insert-koin:koin-androidx-navigation:$koin_android_version" - api "io.insert-koin:koin-androidx-workmnanager:$koin_android_version" + api "io.insert-koin:koin-androidx-workmanager:$koin_android_version" // compose api "io.insert-koin:koin-androidx-compose:$koin_androidx_compose_version" api "io.insert-koin:koin-androidx-compose-navigation:$koin_androidx_compose_version" diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index dcf7efda7..9fbd48aed 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -22,9 +22,7 @@ import org.koin.core.component.getScopeName import org.koin.core.error.ScopeNotCreatedException import org.koin.core.extension.ExtensionManager import org.koin.core.logger.EmptyLogger -import org.koin.core.logger.Level import org.koin.core.logger.Logger -import org.koin.core.logger.PrintLogger import org.koin.core.module.Module import org.koin.core.module.flatten import org.koin.core.parameter.ParametersDefinition diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt deleted file mode 100644 index a9c8c11ea..000000000 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2017-Present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.koin.core.logger - -/** - * Multiplatform Basic Logger - * - * @author Arnaud Giuliani - */ -expect class PrintLogger(level: Level = Level.INFO) : Logger \ No newline at end of file diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt index c5619235d..ad2e0ea09 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -actual class PrintLogger actual constructor(level: Level) : Logger(level) { +class PrintLogger(level: Level = Level.INFO) : Logger(level) { override fun display(level: Level, msg: MESSAGE) { println("[$level] $KOIN_TAG $msg") diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt index 393f68f46..abf1f86a6 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -actual class PrintLogger actual constructor(level: Level) : Logger(level) { +class PrintLogger(level: Level = Level.INFO) : Logger(level) { private val printer = if (level >= Level.WARNING) System.err else System.out diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt index c5619235d..ad2e0ea09 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/logger/PrintLogger.kt @@ -19,7 +19,7 @@ package org.koin.core.logger * Logger that print on system.out * @author - Arnaud GIULIANI */ -actual class PrintLogger actual constructor(level: Level) : Logger(level) { +class PrintLogger(level: Level = Level.INFO) : Logger(level) { override fun display(level: Level, msg: MESSAGE) { println("[$level] $KOIN_TAG $msg") diff --git a/examples/androidx-samples/build.gradle b/examples/androidx-samples/build.gradle index c51574553..81e53e703 100644 --- a/examples/androidx-samples/build.gradle +++ b/examples/androidx-samples/build.gradle @@ -55,21 +55,19 @@ android { } dependencies { - // Leak - implementation 'com.squareup.leakcanary:leakcanary-android:2.7' - - // Koin - implementation "io.insert-koin:koin-android:$koin_android_version" - implementation "io.insert-koin:koin-core-coroutines:$koin_version" - implementation "io.insert-koin:koin-androidx-workmanager:$koin_android_version" - implementation "io.insert-koin:koin-androidx-navigation:$koin_android_version" - testImplementation "io.insert-koin:koin-test-junit4:$koin_version" implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.work:work-runtime-ktx:2.8.1" - // implementation "org.jetbrains.anko:anko-commons:0.10.4" - - testImplementation "io.insert-koin:koin-android-test:$koin_android_version" + implementation 'com.squareup.leakcanary:leakcanary-android:2.7' testImplementation 'androidx.arch.core:core-testing:2.2.0' testImplementation "junit:junit:4.13.2" + + // Koin + implementation platform("io.insert-koin:koin-bom:$koin_android_version") + implementation "io.insert-koin:koin-android" + implementation "io.insert-koin:koin-core-coroutines" + implementation "io.insert-koin:koin-androidx-workmanager" + implementation "io.insert-koin:koin-androidx-navigation" + testImplementation "io.insert-koin:koin-test-junit4" + testImplementation "io.insert-koin:koin-android-test" } \ No newline at end of file From 49b298c7756a92b54df9df8b6d5c555c6bc7d38f Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 31 Aug 2023 15:54:51 +0200 Subject: [PATCH 36/55] Fix CI test & add release for BOM --- .github/workflows/release-bom.yml | 42 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 3 +++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/release-bom.yml diff --git a/.github/workflows/release-bom.yml b/.github/workflows/release-bom.yml new file mode 100644 index 000000000..347b56d1c --- /dev/null +++ b/.github/workflows/release-bom.yml @@ -0,0 +1,42 @@ +name: Release Android + +on: + push: + tags: + - 'bom*' + +env: + IS_RELEASE: true + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} + SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} + SIGNING_KEY: ${{ secrets.SIGNING_KEY }} + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 11 + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + - name: Install Bom + run: cd bom && ./install.sh + + - name: Release Bom + run: cd bom && ./release.sh + + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab5b02ceb..b11b4cff4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,9 @@ jobs: - name: Install Android run: cd android && ./install.sh + - name: Install BOM + run: cd bom && ./install.sh + - name: Test Examples run: cd examples && ./test.sh From 8ca591b53e75ad75e08eaf301559bef98db8b2f6 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 31 Aug 2023 18:02:08 +0200 Subject: [PATCH 37/55] Compose KoinIsolatedContext to help run child composables using a isolated Koin context --- .../org/koin/compose/KoinApplication.kt | 29 +++++++++++++++ .../org/koin/sample/androidx/compose/App.kt | 5 +++ .../sample/androidx/compose/MainActivity.kt | 6 +++ .../sample/androidx/compose/SDKComposable.kt | 37 +++++++++++++++++++ .../androidx/compose/data/sdk/SDKData.kt | 7 ++++ .../androidx/compose/di/IsolatedContext.kt | 17 +++++++++ 6 files changed, 101 insertions(+) create mode 100644 compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/SDKComposable.kt create mode 100644 compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/data/sdk/SDKData.kt create mode 100644 compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/di/IsolatedContext.kt diff --git a/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt b/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt index c511b6243..36b518889 100644 --- a/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt +++ b/compose/koin-compose/src/commonMain/kotlin/org/koin/compose/KoinApplication.kt @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + @file:OptIn(KoinInternalApi::class) package org.koin.compose @@ -21,6 +22,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.compositionLocalOf import org.koin.core.Koin +import org.koin.core.KoinApplication import org.koin.core.annotation.KoinInternalApi import org.koin.core.module.Module import org.koin.dsl.KoinAppDeclaration @@ -84,4 +86,31 @@ fun KoinApplication( ) { content() } +} + +//TODO Test Isolated Context +/** + * Provides Koin Isolated context to be setup into LocalKoinApplication & LocalKoinScope via CompositionLocalProvider, + * to be used by child Composable. + * + * This allows to use an isolated context, directly in all current Composable API + * + * Koin isolated context has to created with koinApplication() function, storing the instance in a static field + * + * @param context - Koin isolated context + * @param content - child Composable + * + * @author Arnaud Giuliani + */ +@Composable +fun KoinIsolatedContext( + context: KoinApplication, + content: @Composable () -> Unit +) { + CompositionLocalProvider( + LocalKoinApplication provides context.koin, + LocalKoinScope provides context.koin.scopeRegistry.rootScope + ) { + content() + } } \ No newline at end of file diff --git a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/App.kt b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/App.kt index 4f54f7b94..5176535cc 100644 --- a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/App.kt +++ b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/App.kt @@ -10,6 +10,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.koin.androidx.compose.koinViewModel import org.koin.androidx.compose.scope.KoinActivityScope +import org.koin.compose.KoinIsolatedContext import org.koin.compose.koinInject import org.koin.compose.module.rememberKoinModules import org.koin.compose.rememberKoinInject @@ -18,6 +19,8 @@ import org.koin.sample.androidx.compose.data.MyFactory import org.koin.sample.androidx.compose.data.MyInnerFactory import org.koin.sample.androidx.compose.data.MyScoped import org.koin.sample.androidx.compose.data.MySingle +import org.koin.sample.androidx.compose.data.sdk.SDKData +import org.koin.sample.androidx.compose.di.IsolatedContextSDK import org.koin.sample.androidx.compose.di.secondModule import org.koin.sample.androidx.compose.viewmodel.SSHViewModel import org.koin.sample.androidx.compose.viewmodel.UserViewModel @@ -37,6 +40,7 @@ fun App(userViewModel: UserViewModel = koinViewModel()) { SingleComposable(parentStatus = updatedTime) FactoryComposable(parentStatus = updatedTime) ViewModelComposable(parentStatus = updatedTime) + IsolatedSDKComposable(parentStatus = updatedTime) } } @@ -85,6 +89,7 @@ fun ViewModelComposable( // } //} + @Composable fun SingleComposable( parentStatus: String = "- status -", diff --git a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/MainActivity.kt b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/MainActivity.kt index bf39eed1f..25d744942 100644 --- a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/MainActivity.kt +++ b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/MainActivity.kt @@ -3,13 +3,19 @@ package org.koin.sample.androidx.compose import android.os.Bundle import androidx.activity.compose.setContent import androidx.compose.material.MaterialTheme +import org.koin.android.ext.android.getKoin import org.koin.androidx.scope.ScopeActivity +import org.koin.sample.androidx.compose.data.sdk.SDKData import java.util.logging.Logger class MainActivity : ScopeActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + + // ensure SDK is not accessible in main context + assert(getKoin().getOrNull() == null) + setContent { MaterialTheme { App() } } diff --git a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/SDKComposable.kt b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/SDKComposable.kt new file mode 100644 index 000000000..c3783e83b --- /dev/null +++ b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/SDKComposable.kt @@ -0,0 +1,37 @@ +package org.koin.sample.androidx.compose + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import org.koin.compose.KoinIsolatedContext +import org.koin.compose.rememberKoinInject +import org.koin.sample.androidx.compose.data.sdk.SDKData +import org.koin.sample.androidx.compose.di.IsolatedContextSDK + + +@Composable +fun IsolatedSDKComposable( + parentStatus: String = "- status -", +) { + KoinIsolatedContext(IsolatedContextSDK.koinApp) { + SDKComposable(parentStatus) + } +} + +@Composable +private fun SDKComposable( + parentStatus: String = "- status -", + sdkData: SDKData = rememberKoinInject() +) { + var created by remember { mutableStateOf(false) } + + if (created) { + clickComponent("sdkData", sdkData.id, parentStatus) { + ButtonForCreate("-X- sdkData") { created = !created } + } + } else { + ButtonForCreate("(+) sdkData") { created = !created } + } +} \ No newline at end of file diff --git a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/data/sdk/SDKData.kt b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/data/sdk/SDKData.kt new file mode 100644 index 000000000..6c880393b --- /dev/null +++ b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/data/sdk/SDKData.kt @@ -0,0 +1,7 @@ +package org.koin.sample.androidx.compose.data.sdk + +import java.util.UUID + +class SDKData { + val id = UUID.randomUUID().toString() +} \ No newline at end of file diff --git a/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/di/IsolatedContext.kt b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/di/IsolatedContext.kt new file mode 100644 index 000000000..091e95f7c --- /dev/null +++ b/compose/sample-android-compose/src/main/java/org/koin/sample/androidx/compose/di/IsolatedContext.kt @@ -0,0 +1,17 @@ +package org.koin.sample.androidx.compose.di + +import org.koin.dsl.koinApplication +import org.koin.dsl.module +import org.koin.sample.androidx.compose.data.sdk.SDKData + +val sdkModule = module { + single { SDKData() } +} + +object IsolatedContextSDK { + + val koinApp = koinApplication { + modules(sdkModule) + } + +} \ No newline at end of file From fe49b2780247232d144bf643ec184a2daa2ed3a6 Mon Sep 17 00:00:00 2001 From: kamosama <837080904@qq.com> Date: Fri, 1 Sep 2023 18:13:24 +0800 Subject: [PATCH 38/55] perf The module flattening function reduce GC by removing 'tailrec' and using 'MutableSet' --- .../kotlin/org/koin/core/module/Module.kt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt index 422eef27d..2fa53edca 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/Module.kt @@ -236,17 +236,12 @@ operator fun List.plus(module: Module): List = this + listOf(mod * Run through the module list to flatten all modules & submodules */ @OptIn(KoinInternalApi::class) -tailrec fun flatten(modules: List, newModules: MutableSet = mutableSetOf()): Set { - return if (modules.isNotEmpty()) { - val head = modules.first() - val tail = modules.subList(1, modules.size) - newModules.add(head) - if (head.includedModules.isEmpty()) { - flatten(tail, newModules) - } else { - flatten(head.includedModules + tail, newModules) +fun flatten(modules: List): Set { + fun flat(modules: List, newModules: MutableSet){ + modules.forEach{ + newModules += it + flat(it.includedModules,newModules) } - } else { - newModules } + return mutableSetOf().apply { flat(modules,this) } } \ No newline at end of file From 088d8da2c715bf22bf81a04e8065ca40707866b4 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Fri, 1 Sep 2023 17:30:36 +0200 Subject: [PATCH 39/55] clean up verify() logs & better error messages --- .../org/koin/test/verify/Verification.kt | 45 +++++++++++++------ .../org/koin/test/verify/VerifyModule.kt | 6 +-- .../test => jvmTest/kotlin}/Components.kt | 2 - .../src/jvmTest/kotlin/VerifyModulesTest.kt | 1 + install_all.sh | 4 ++ 5 files changed, 40 insertions(+), 18 deletions(-) rename core/koin-test/src/{jvmMain/kotlin/org/koin/test => jvmTest/kotlin}/Components.kt (94%) diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt index d087e65a6..9e4d56264 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/Verification.kt @@ -7,7 +7,6 @@ import org.koin.core.instance.InstanceFactory import org.koin.core.module.Module import org.koin.core.module.flatten import org.koin.ext.getFullName -import java.util.HashMap import kotlin.reflect.KClass import kotlin.reflect.KFunction import kotlin.reflect.KVisibility @@ -35,13 +34,24 @@ class Verification(val module: Module, extraTypes: List>) { index: List, ): List> { val beanDefinition = factory.beanDefinition - println("|-> $beanDefinition") - val types = listOf(beanDefinition.primaryType) + beanDefinition.secondaryTypes - println("| bound types : $types") + println("\n|-> definition $beanDefinition") + if (beanDefinition.qualifier != null){ + println("| qualifier: ${beanDefinition.qualifier}") + } + + val boundTypes = listOf(beanDefinition.primaryType) + beanDefinition.secondaryTypes + println("| bind types: $boundTypes") - return types.flatMap { type -> - val constructors = type.constructors.filter { it.visibility == KVisibility.PUBLIC } - constructors.flatMap { ctor -> verifyConstructor(ctor, type, index, beanDefinition) } + val functionType = beanDefinition.primaryType + val constructors = functionType.constructors.filter { it.visibility == KVisibility.PUBLIC } + + return constructors.flatMap { constructor -> + verifyConstructor( + constructor, + functionType, + index, + beanDefinition + ) } } @@ -52,28 +62,37 @@ class Verification(val module: Module, extraTypes: List>) { beanDefinition: BeanDefinition<*>, ): List> { val constructorParameters = constructorFunction.parameters - println("| constructor: $classOrigin -> $constructorParameters") + + if (constructorParameters.isEmpty()){ + println("| no dependency to check") + } else { + println("| ${constructorParameters.size} dependencies to check") + } return constructorParameters.map { constructorParameter -> val ctorParamClass = (constructorParameter.type.classifier as KClass<*>) val ctorParamClassName = ctorParamClass.getFullName() val isDefinitionDeclared = index.any { k -> k.contains(ctorParamClassName) } - val alreadyBoundFactory = verifiedFactories.keys.firstOrNull { ctorParamClass in listOf(it.beanDefinition.primaryType) + it.beanDefinition.secondaryTypes } val factoryDependencies = verifiedFactories[alreadyBoundFactory] val isCircular = factoryDependencies?.let { classOrigin in factoryDependencies } ?: false when { !isDefinitionDeclared -> { - System.err.println("* ----- > Missing type '${ctorParamClass.qualifiedName}' for class '${classOrigin.qualifiedName}' in definition '$beanDefinition'\nFix your Koin configuration or add extraTypes parameter: verify(extraTypes = listOf(${ctorParamClass.qualifiedName}::class))") - throw MissingKoinDefinitionException("Missing type '${ctorParamClass.qualifiedName}' for class '${classOrigin.qualifiedName}' in definition '$beanDefinition'") + val errorMessage = "Missing definition type '${ctorParamClass.qualifiedName}' in definition '$beanDefinition'" + System.err.println("* ----- > $errorMessage\nFix your Koin configuration or add extraTypes parameter to whitelist the type: verify(extraTypes = listOf(${ctorParamClass.qualifiedName}::class))") + throw MissingKoinDefinitionException(errorMessage) } + isCircular -> { - throw CircularInjectionException("Circular type injection '${ctorParamClass.qualifiedName}' to '${classOrigin.qualifiedName}'") + val errorMessage = "Circular injection between '${ctorParamClass.qualifiedName}' and '${classOrigin.qualifiedName}'. Fix your Koin configuration" + System.err.println("* ----- > $errorMessage") + throw CircularInjectionException(errorMessage) } + else -> { - println("|- '$ctorParamClass'") + println("|- dependency '$ctorParamClass' found ✅") ctorParamClass } } diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt index d88b7b5b2..ba2d050b0 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt +++ b/core/koin-test/src/jvmMain/kotlin/org/koin/test/verify/VerifyModule.kt @@ -66,13 +66,13 @@ object Verify { val timer = Timer.start() val verification = Verification(module, extraTypes) - println("Verifying Module '$module' ...") - println("- index keys: ${verification.definitionIndex.size}") + println("Verifying module '$module' ...") +// println("- index: ${verification.definitionIndex.size}") verification.verify() timer.stop() val time = if (timer.getTimeInMillis() < 1000) "${timer.getTimeInMillis()} ms" else "${timer.getTimeInSeconds()} sec" - println("[SUCCESS] module '$this' has been verified in $time.") + println("\n[SUCCESS] module '$this' has been verified in $time.") } } diff --git a/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt b/core/koin-test/src/jvmTest/kotlin/Components.kt similarity index 94% rename from core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt rename to core/koin-test/src/jvmTest/kotlin/Components.kt index dd242912b..3034a6a7f 100644 --- a/core/koin-test/src/jvmMain/kotlin/org/koin/test/Components.kt +++ b/core/koin-test/src/jvmTest/kotlin/Components.kt @@ -1,5 +1,3 @@ -package org.koin.test - import org.koin.core.qualifier.Qualifier import org.koin.mp.KoinPlatformTools diff --git a/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt b/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt index 667eeea60..d1acfa89c 100644 --- a/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt +++ b/core/koin-test/src/jvmTest/kotlin/VerifyModulesTest.kt @@ -1,4 +1,5 @@ import org.koin.core.module.dsl.singleOf +import org.koin.core.qualifier.named import org.koin.dsl.bind import org.koin.dsl.module import org.koin.test.Simple diff --git a/install_all.sh b/install_all.sh index 261347150..1154d2ba1 100755 --- a/install_all.sh +++ b/install_all.sh @@ -19,3 +19,7 @@ cd .. cd ./plugins ./install.sh cd .. + +cd ./bom +./install.sh +cd .. From 1110c2a7a1d9173c520565f32623ae411478e357 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Fri, 1 Sep 2023 17:31:04 +0200 Subject: [PATCH 40/55] push Scope class as regular class (no need of data class) --- .../src/commonMain/kotlin/org/koin/core/scope/Scope.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index bbc746954..1852d8fec 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -38,7 +38,7 @@ import kotlin.reflect.KClass @Suppress("UNCHECKED_CAST") @OptIn(KoinInternalApi::class) @KoinDslMarker -data class Scope( +class Scope( val scopeQualifier: Qualifier, val id: ScopeID, val isRoot: Boolean = false, From 3dca59a3c9381ad39eddd0ffee95b1d424282ba7 Mon Sep 17 00:00:00 2001 From: Tobias Preuss Date: Sat, 2 Sep 2023 23:20:16 +0200 Subject: [PATCH 41/55] Improve formatting. --- .../kotlin/org/koin/core/CascadeParamTest.kt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt index 4685f518c..1c695fd20 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/CascadeParamTest.kt @@ -19,11 +19,11 @@ class CascadeParamTest { val stringParam = "_string_" val p = parametersOf(intParam, stringParam) - assertEquals(0,p.index) - assertEquals(stringParam,p.getOrNull()) - assertEquals(0,p.index) - assertEquals(intParam,p.getOrNull()) - assertEquals(stringParam,p.getOrNull()) + assertEquals(0, p.index) + assertEquals(stringParam, p.getOrNull()) + assertEquals(0, p.index) + assertEquals(intParam, p.getOrNull()) + assertEquals(stringParam, p.getOrNull()) } @Test @@ -32,11 +32,11 @@ class CascadeParamTest { val stringParam = "_string_" val p = parameterArrayOf(intParam, stringParam) - assertEquals(0,p.index) + assertEquals(0, p.index) assertNull(p.getOrNull()) - assertEquals(intParam,p.get()) - assertEquals(stringParam,p.get()) - assertEquals(1,p.index) + assertEquals(intParam, p.get()) + assertEquals(stringParam, p.get()) + assertEquals(1, p.index) } @Test @@ -45,11 +45,11 @@ class CascadeParamTest { val stringParam = "_string_" val p = parameterSetOf(intParam, stringParam) - assertEquals(0,p.index) - assertEquals(stringParam,p.getOrNull()) - assertEquals(intParam,p.getOrNull()) - assertEquals(stringParam,p.getOrNull()) - assertEquals(0,p.index) + assertEquals(0, p.index) + assertEquals(stringParam, p.getOrNull()) + assertEquals(intParam, p.getOrNull()) + assertEquals(stringParam, p.getOrNull()) + assertEquals(0, p.index) } @Test From 6bdfbcb228cd228b4a7a84e859f06948e0f69ead Mon Sep 17 00:00:00 2001 From: J!nl!n Date: Mon, 4 Sep 2023 16:36:47 +0800 Subject: [PATCH 42/55] Fix #1631, Disable BuildConfig for android modules --- android/koin-android-compat/build.gradle | 6 +++++- android/koin-android-test/build.gradle | 6 +++++- android/koin-android/build.gradle | 4 ++++ android/koin-androidx-navigation/build.gradle | 6 +++++- android/koin-androidx-workmanager/build.gradle | 6 +++++- compose/koin-androidx-compose-navigation/build.gradle | 1 + compose/koin-androidx-compose/build.gradle | 1 + 7 files changed, 26 insertions(+), 4 deletions(-) diff --git a/android/koin-android-compat/build.gradle b/android/koin-android-compat/build.gradle index 12e2eb9bf..7318a4c18 100644 --- a/android/koin-android-compat/build.gradle +++ b/android/koin-android-compat/build.gradle @@ -14,6 +14,10 @@ android { minSdkVersion android_min_version // testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + + buildFeatures { + buildConfig false + } } dependencies { @@ -21,4 +25,4 @@ dependencies { api project(":koin-android") } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' diff --git a/android/koin-android-test/build.gradle b/android/koin-android-test/build.gradle index cfd0f63ff..1174f870d 100644 --- a/android/koin-android-test/build.gradle +++ b/android/koin-android-test/build.gradle @@ -14,6 +14,10 @@ android { minSdkVersion android_min_version } + buildFeatures { + buildConfig false + } + compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 @@ -32,4 +36,4 @@ dependencies { } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' diff --git a/android/koin-android/build.gradle b/android/koin-android/build.gradle index 8a83d3b7e..5b90189d2 100644 --- a/android/koin-android/build.gradle +++ b/android/koin-android/build.gradle @@ -14,6 +14,10 @@ android { minSdkVersion android_min_version } + buildFeatures { + buildConfig false + } + compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 diff --git a/android/koin-androidx-navigation/build.gradle b/android/koin-androidx-navigation/build.gradle index 76d6fbf10..c1f78e784 100644 --- a/android/koin-androidx-navigation/build.gradle +++ b/android/koin-androidx-navigation/build.gradle @@ -17,6 +17,10 @@ android { } + buildFeatures { + buildConfig false + } + kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() } @@ -34,4 +38,4 @@ dependencies { api "androidx.navigation:navigation-fragment-ktx:2.5.3" } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' diff --git a/android/koin-androidx-workmanager/build.gradle b/android/koin-androidx-workmanager/build.gradle index 07f2f9f3b..9c57b9180 100644 --- a/android/koin-androidx-workmanager/build.gradle +++ b/android/koin-androidx-workmanager/build.gradle @@ -17,6 +17,10 @@ android { } + buildFeatures { + buildConfig false + } + kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() } @@ -38,4 +42,4 @@ dependencies { testImplementation "org.mockito:mockito-inline:$mockito_version" } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' diff --git a/compose/koin-androidx-compose-navigation/build.gradle b/compose/koin-androidx-compose-navigation/build.gradle index c69c878ef..c5c60d76f 100644 --- a/compose/koin-androidx-compose-navigation/build.gradle +++ b/compose/koin-androidx-compose-navigation/build.gradle @@ -28,6 +28,7 @@ android { buildFeatures { compose true + buildConfig false } composeOptions { diff --git a/compose/koin-androidx-compose/build.gradle b/compose/koin-androidx-compose/build.gradle index 95219c581..ab27e6131 100644 --- a/compose/koin-androidx-compose/build.gradle +++ b/compose/koin-androidx-compose/build.gradle @@ -29,6 +29,7 @@ android { buildFeatures { compose true + buildConfig false } composeOptions { From e8503b09e71beea534c2540f3dc1ce03a5ce8263 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Mon, 4 Sep 2023 08:23:07 +0000 Subject: [PATCH 43/55] Fix number of type parameters for scopedOf dsl --- .../org/koin/core/module/dsl/ScopedOf.kt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt index 4a97c25a5..721522f83 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/module/dsl/ScopedOf.kt @@ -128,7 +128,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -136,7 +136,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -144,7 +144,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -152,7 +152,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -160,7 +160,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -168,7 +168,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -176,7 +176,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -184,7 +184,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -192,7 +192,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -200,7 +200,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) @@ -208,7 +208,7 @@ inline fun ScopeDSL.scopedOf( +inline fun ScopeDSL.scopedOf( crossinline constructor: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) -> R, noinline options: DefinitionOptions? = null, ): KoinDefinition = scoped { new(constructor) }.onOptions(options) From e7cbcf5670193d7de896bd0de79123aa80d8b0b6 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 10:37:15 +0200 Subject: [PATCH 44/55] fix test config --- examples/jvm-perfs/build.gradle.kts | 6 +++--- .../main/kotlin/org/koin/benchmark/BenchmarkClass.kt | 4 ++-- .../src/main/kotlin/org/koin/benchmark/PerfRunner.kt | 10 ++++------ .../src/main/kotlin/org/koin/benchmark/module_400.kt | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/examples/jvm-perfs/build.gradle.kts b/examples/jvm-perfs/build.gradle.kts index 2eddc6120..60b2daed0 100644 --- a/examples/jvm-perfs/build.gradle.kts +++ b/examples/jvm-perfs/build.gradle.kts @@ -16,12 +16,12 @@ tasks.getByName("compileKotlin" } val jmhVersion = "1.36" -val koin_version = "3.4.0" -val coroutines_version = "1.6.4" +//TODO get from existing version.gradle file +val koin_version = "3.5.0" +val coroutines_version = "1.7.3" dependencies { api("io.insert-koin:koin-core:$koin_version") - api("io.insert-koin:koin-core-coroutines:$koin_version") api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") implementation("org.openjdk.jmh:jmh-core:$jmhVersion") kapt("org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion") diff --git a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/BenchmarkClass.kt b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/BenchmarkClass.kt index 9405fe803..34ed14461 100644 --- a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/BenchmarkClass.kt +++ b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/BenchmarkClass.kt @@ -22,14 +22,14 @@ open class BenchmarkClass { @Benchmark fun start400() { koinApplication { - modules(perfModule400().value) + modules(perfModule400()) }.koin } @Benchmark fun start400AndInject() { val koin = koinApplication { - modules(perfModule400().value) + modules(perfModule400()) }.koin koinScenario(koin) } diff --git a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/PerfRunner.kt b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/PerfRunner.kt index 3ac310855..66f1b54ef 100644 --- a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/PerfRunner.kt +++ b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/PerfRunner.kt @@ -5,8 +5,6 @@ import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withContext import org.koin.core.Koin import org.koin.core.annotation.KoinExperimentalAPI -import org.koin.core.awaitAllStartJobs -import org.koin.core.lazyModules import org.koin.core.time.measureDurationForResult import org.koin.dsl.koinApplication import kotlin.math.roundToInt @@ -27,7 +25,7 @@ object PerfRunner { fun runScenario(index: Int): Pair { val (app, duration) = measureDurationForResult { koinApplication { - lazyModules( + modules( perfModule400() ) } @@ -36,9 +34,9 @@ object PerfRunner { val koin: Koin = app.koin - runBlocking { - koin.awaitAllStartJobs() - } +// runBlocking { +// koin.awaitAllStartJobs() +// } val (_, executionDuration) = measureDurationForResult { koinScenario(koin) diff --git a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/module_400.kt b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/module_400.kt index 19a74408c..6547e5aa9 100644 --- a/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/module_400.kt +++ b/examples/jvm-perfs/src/main/kotlin/org/koin/benchmark/module_400.kt @@ -1,8 +1,8 @@ package org.koin.benchmark -import org.koin.dsl.lazyModule +import org.koin.dsl.module -fun perfModule400() = lazyModule { +fun perfModule400() = module { single { A1() } single { B1(get()) } single { C1(get(), get()) } From 0a6422c2e8084f40c0ff95b937af246dc0b650a9 Mon Sep 17 00:00:00 2001 From: Alexander Mitropolsky Date: Tue, 18 Apr 2023 16:21:21 +0300 Subject: [PATCH 45/55] Fixing race condition in Scope --- core/koin-core/build.gradle | 1 + .../kotlin/org/koin/core/scope/Scope.kt | 71 ++++++++----------- .../kotlin/org/koin/mp/KoinPlatformTools.kt | 6 ++ .../org/koin/core/ParameterStackTest.kt | 2 +- .../org/koin/core/ParametersInjectionTest.kt | 4 +- .../kotlin/org/koin/mp/PlatformTools.kt | 19 +++++ .../kotlin/org/koin/mp/KoinPlatformTools.kt | 18 +++++ .../kotlin/org/koin/mp/KoinPlatformTools.kt | 3 + 8 files changed, 80 insertions(+), 44 deletions(-) diff --git a/core/koin-core/build.gradle b/core/koin-core/build.gradle index 0f3c6512c..cfd4955f2 100644 --- a/core/koin-core/build.gradle +++ b/core/koin-core/build.gradle @@ -75,6 +75,7 @@ kotlin { dependsOn commonMain dependencies { implementation 'org.jetbrains.kotlin:kotlin-stdlib-js' + implementation "co.touchlab:stately-concurrency:1.2.2" } } diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index 1852d8fec..f39daeea9 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -33,6 +33,7 @@ import org.koin.ext.getFullName import org.koin.mp.KoinPlatformTimeTools import org.koin.mp.KoinPlatformTools import org.koin.mp.Lockable +import org.koin.mp.ThreadLocal import kotlin.reflect.KClass @Suppress("UNCHECKED_CAST") @@ -58,7 +59,7 @@ class Scope( private val _callbacks = arrayListOf() @KoinInternalApi - val _parameterStack = ArrayDeque() + val _parameterStackLocal = ThreadLocal>() private var _closed: Boolean = false val logger: Logger get() = _koin.logger @@ -223,19 +224,17 @@ class Scope( throw ClosedScopeException("Scope '$id' is closed") } val parameters = parameterDef?.invoke() + var localDeque: ArrayDeque? = null if (parameters != null) { _koin.logger.log(Level.DEBUG) { "| >> parameters $parameters " } - KoinPlatformTools.synchronized(this@Scope) { - _parameterStack.addFirst(parameters) - } + localDeque = _parameterStackLocal.get() ?: ArrayDeque().also(_parameterStackLocal::set) + localDeque.addFirst(parameters) } val instanceContext = InstanceContext(_koin.logger, this, parameters) val value = resolveValue(qualifier, clazz, instanceContext, parameterDef) - if (parameters != null) { + if (localDeque != null) { _koin.logger.debug("| << parameters") - KoinPlatformTools.synchronized(this@Scope) { - _parameterStack.removeFirstOrNull() - } + localDeque.removeFirstOrNull() } return value } @@ -244,41 +243,31 @@ class Scope( qualifier: Qualifier?, clazz: KClass<*>, instanceContext: InstanceContext, - parameterDef: ParametersDefinition?, - ) = ( - _koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) - ?: run { - // try resolve in injected param - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in injected parameters") - _parameterStack.firstOrNull()?.getOrNull(clazz) - } - ?: run { - // try resolve in scope source - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source") - _source?.let { source -> - if (source::class == clazz && qualifier == null) { - _source as? T - } else { - null - } - } - } - ?: run { - // try resolve in other scopes - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in other scopes") - findInOtherScope(clazz, qualifier, parameterDef) + parameterDef: ParametersDefinition? + ) = (_koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) + ?: run { + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in injected parameters") + _parameterStackLocal.get()?.firstOrNull()?.getOrNull(clazz) + } + ?: run { + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source" ) + _source?.let { source -> + if (source::class == clazz && qualifier == null) { + _source as? T + } else null } - ?: run { - // in case of error - if (parameterDef != null) { - KoinPlatformTools.synchronized(this@Scope) { - _parameterStack.removeFirstOrNull() - } - _koin.logger.debug("|- << parameters") - } - throwDefinitionNotFound(qualifier, clazz) + } + ?: run { + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in other scopes" ) + findInOtherScope(clazz, qualifier, parameterDef) + } + ?: run { + if (parameterDef != null) { + _parameterStackLocal.remove() + _koin.logger.debug("|- << parameters") } - ) + throwDefinitionNotFound(qualifier, clazz) + }) @Suppress("UNCHECKED_CAST") private fun getFromSource(clazz: KClass<*>): T? { diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt index 3b38108da..5621bb32f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -32,3 +32,9 @@ expect object KoinPlatformTools { } expect open class Lockable() + +expect open class ThreadLocal() { + fun get(): T? + fun set(value: T?) + fun remove() +} \ No newline at end of file diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt index de4c68c9f..5de507e9f 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParameterStackTest.kt @@ -28,6 +28,6 @@ class ParameterStackTest { koin.get { parametersOf(KoinPlatformTools.generateId()) } } - assertTrue(koin.scopeRegistry.rootScope._parameterStack.isEmpty()) + assertTrue(koin.scopeRegistry.rootScope._parameterStackLocal.get()!!.isEmpty()) } } diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt index 46d163589..f7f05bfab 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/ParametersInjectionTest.kt @@ -74,8 +74,8 @@ class ParametersInjectionTest { val koin = app.koin val a: Simple.MySingleAndNull = koin.get { parametersOf(42) } - assertEquals(42, a.ms.id) - assertTrue { koin.scopeRegistry.rootScope._parameterStack.isEmpty() } + assertEquals(42, a.ms.id, "id is the right injected") + assertTrue("parameter stack is empty") { koin.scopeRegistry.rootScope._parameterStackLocal.get()?.isEmpty() == true } } @Test diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt index 2510a7fec..3612f0a69 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/mp/PlatformTools.kt @@ -1,5 +1,22 @@ +/* + * Copyright 2017-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.koin.mp +import co.touchlab.stately.concurrency.ThreadLocalRef import org.koin.core.context.GlobalContext import org.koin.core.context.KoinContext import org.koin.core.logger.* @@ -38,3 +55,5 @@ actual object KoinPlatformTools { } actual typealias Lockable = Any + +actual typealias ThreadLocal = ThreadLocalRef \ No newline at end of file diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt index 621c3dca2..4980d1e04 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2017-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.koin.mp import org.koin.core.context.GlobalContext @@ -22,3 +38,5 @@ actual object KoinPlatformTools { } actual typealias Lockable = Any + +actual typealias ThreadLocal = java.lang.ThreadLocal \ No newline at end of file diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt index 6a6085288..4b92b9a67 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/mp/KoinPlatformTools.kt @@ -2,6 +2,7 @@ package org.koin.mp import co.touchlab.stately.concurrency.Lock import co.touchlab.stately.concurrency.withLock +import co.touchlab.stately.concurrency.ThreadLocalRef import org.koin.core.context.KoinContext import org.koin.core.context.globalContextByMemoryModel import org.koin.core.logger.Level @@ -33,3 +34,5 @@ actual object KoinPlatformTools { actual open class Lockable { internal val lock = Lock() } + +actual typealias ThreadLocal = ThreadLocalRef \ No newline at end of file From fedb3e2b926472b04de608e73e90a5b05f590617 Mon Sep 17 00:00:00 2001 From: Lammert Westerhoff Date: Tue, 23 May 2023 09:48:04 -0600 Subject: [PATCH 46/55] Don't ignore key to get a viewmodel when a qualifier is present --- .../src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt index 70c157b28..467aad81f 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt @@ -39,7 +39,7 @@ fun resolveViewModel( val factory = KoinViewModelFactory(vmClass, scope, qualifier, parameters) val provider = ViewModelProvider(viewModelStore, factory, extras) return when { - qualifier != null -> provider[qualifier.value, modelClass] + qualifier != null -> provider[qualifier.value + key?.let { "_$it" }, modelClass] key != null -> provider[key, modelClass] else -> provider[modelClass] } From 0f1bc73dd2c893c5c027ec11f3f4f656a05e083d Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 12:57:04 +0200 Subject: [PATCH 47/55] fix key filter --- .../src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt index 467aad81f..9b8971f27 100644 --- a/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt +++ b/android/koin-android/src/main/java/org/koin/androidx/viewmodel/GetViewModel.kt @@ -39,7 +39,7 @@ fun resolveViewModel( val factory = KoinViewModelFactory(vmClass, scope, qualifier, parameters) val provider = ViewModelProvider(viewModelStore, factory, extras) return when { - qualifier != null -> provider[qualifier.value + key?.let { "_$it" }, modelClass] + qualifier != null -> provider[qualifier.value + (key?.let { "_$it" } ?: ""), modelClass] key != null -> provider[key, modelClass] else -> provider[modelClass] } From 1c630c1b9613965264c826d446b1b3305b40f3d7 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 14:53:00 +0200 Subject: [PATCH 48/55] Fix Java compat for ViewModel creation extras - #1584 --- .../java/org/koin/android/compat/ViewModelCompat.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/koin-android-compat/src/main/java/org/koin/android/compat/ViewModelCompat.kt b/android/koin-android-compat/src/main/java/org/koin/android/compat/ViewModelCompat.kt index 845fdbf34..340a83240 100644 --- a/android/koin-android-compat/src/main/java/org/koin/android/compat/ViewModelCompat.kt +++ b/android/koin-android-compat/src/main/java/org/koin/android/compat/ViewModelCompat.kt @@ -15,6 +15,7 @@ */ package org.koin.android.compat +import androidx.activity.ComponentActivity import androidx.annotation.MainThread import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelStoreOwner @@ -48,10 +49,11 @@ object ViewModelCompat { owner: ViewModelStoreOwner, clazz: Class, qualifier: Qualifier? = null, + extrasProducer: (() -> CreationExtras)? = null, parameters: ParametersDefinition? = null ): Lazy { return lazy(LazyThreadSafetyMode.NONE) { - getViewModel(owner, clazz, qualifier, parameters) + getViewModel(owner, clazz, qualifier, extrasProducer, parameters) } } @@ -72,13 +74,17 @@ object ViewModelCompat { owner: ViewModelStoreOwner, clazz: Class, qualifier: Qualifier? = null, + extrasProducer: (() -> CreationExtras)? = null, parameters: ParametersDefinition? = null ): T = resolveViewModelCompat( clazz, owner.viewModelStore, - extras = CreationExtras.Empty, + extras = extrasProducer?.invoke() ?: getDefaultViewModelCreationExtras(owner), qualifier = qualifier, parameters = parameters, scope = GlobalContext.get().scopeRegistry.rootScope ) + + private fun getDefaultViewModelCreationExtras(owner: ViewModelStoreOwner): CreationExtras = + if (owner is ComponentActivity) owner.defaultViewModelCreationExtras else CreationExtras.Empty } \ No newline at end of file From 02d43736babec4b983030c520d7aba6942144fc6 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 15:13:21 +0200 Subject: [PATCH 49/55] prepare for new native target --- core/koin-core/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/koin-core/build.gradle b/core/koin-core/build.gradle index cfd4955f2..6f95aa1db 100644 --- a/core/koin-core/build.gradle +++ b/core/koin-core/build.gradle @@ -38,6 +38,8 @@ kotlin { mingwX64() linuxX64() +// linuxArm64() + // mingwX86() // linuxArm32Hfp() // linuxMips32() @@ -53,7 +55,7 @@ kotlin { dependencies { implementation kotlin("test-common") implementation kotlin("test-annotations-common") - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version" } } @@ -130,7 +132,9 @@ kotlin { } configure([ targets.linuxX64, +// targets.linuxArm64, targets.mingwX64, + // targets.linuxArm32Hfp, // targets.linuxMips32, // targets.mingwX86 From 4477082c00b8a7603b3dcd7b033eddc6a8918946 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 15:34:37 +0200 Subject: [PATCH 50/55] add optional boolean "createEagerinstances" to loadKoinModules function, to let decide to create eager instances or not --- .../commonMain/kotlin/org/koin/core/Koin.kt | 9 ++++++- .../kotlin/org/koin/core/KoinApplication.kt | 2 +- .../org/koin/core/context/KoinContext.kt | 4 +-- .../org/koin/core/DynamicModulesTest.kt | 26 ++++++++++++++++--- .../org/koin/core/context/GlobalContext.kt | 8 +++--- .../org/koin/core/context/GlobalContext.kt | 8 +++--- .../org/koin/core/context/GlobalContext.kt | 8 +++--- 7 files changed, 46 insertions(+), 19 deletions(-) diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt index 9fbd48aed..7434f1d37 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/Koin.kt @@ -302,11 +302,18 @@ class Koin { /** * Load module & create eager instances + * + * @param allowOverride - allow to override definitions + * @param createEagerInstances - run instance creation for eager single definitions */ - fun loadModules(modules: List, allowOverride: Boolean = true) { + fun loadModules(modules: List, allowOverride: Boolean = true, createEagerInstances : Boolean = false) { val flattedModules = flatten(modules) instanceRegistry.loadModules(flattedModules, allowOverride) scopeRegistry.loadScopes(flattedModules) + + if (createEagerInstances){ + createEagerInstances() + } } fun unloadModules(modules: List) { diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt index 5488b4ec0..00fbe3f06 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/KoinApplication.kt @@ -84,7 +84,7 @@ class KoinApplication private constructor() { } private fun loadModules(modules: List) { - koin.loadModules(modules, allowOverride = allowOverride) + koin.loadModules(modules, allowOverride = allowOverride, createEagerInstances = false) } /** diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt index dcf3df054..70ab2121f 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/context/KoinContext.kt @@ -55,12 +55,12 @@ interface KoinContext { /** * load Koin module in global Koin context */ - fun loadKoinModules(module: Module) + fun loadKoinModules(module: Module, createEagerInstances: Boolean = false) /** * load Koin modules in global Koin context */ - fun loadKoinModules(modules: List) + fun loadKoinModules(modules: List, createEagerInstances: Boolean = false) /** * unload Koin module from global Koin context diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt index dd5b3683f..305f182bd 100644 --- a/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/DynamicModulesTest.kt @@ -187,7 +187,7 @@ class DynamicModulesTest : KoinCoreTest() { assertEquals(42, app.koin.get { parametersOf(42) }.id) koin.unloadModules(listOf(module)) - koin.loadModules(listOf(module)) + koin.loadModules(listOf(module), createEagerInstances = false) assertNotNull(app.getBeanDefinition(Simple.MySingle::class)) @@ -209,7 +209,7 @@ class DynamicModulesTest : KoinCoreTest() { val koin = app.koin - koin.loadModules(listOf(module)) + koin.loadModules(listOf(module), createEagerInstances = false) koin.createEagerInstances() assertTrue(created) @@ -230,12 +230,32 @@ class DynamicModulesTest : KoinCoreTest() { val koin = app.koin - koin.loadModules(listOf(module)) + koin.loadModules(listOf(module), createEagerInstances = false) koin.createEagerInstances() assertTrue(created) } + @Test + fun `create at start for external modules - create eager`() { + var created = false + val module = module(createdAtStart = true) { + single { + created = true + Simple.MySingle(42) + } + } + val app = koinApplication { + printLogger(Level.DEBUG) + } + + val koin = app.koin + + koin.loadModules(listOf(module), createEagerInstances = true) + + assertTrue(created) + } + @Test fun `should reload module definition - global context`() { val module = module { diff --git a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt index ac9db5f64..68e5767a5 100644 --- a/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jsMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -60,12 +60,12 @@ object GlobalContext : KoinContext { return koinApplication } - override fun loadKoinModules(module: Module) { - get().loadModules(listOf(module)) + override fun loadKoinModules(module: Module,createEagerInstances : Boolean) { + get().loadModules(listOf(module), createEagerInstances = createEagerInstances) } - override fun loadKoinModules(modules: List) { - get().loadModules(modules) + override fun loadKoinModules(modules: List, createEagerInstances : Boolean) { + get().loadModules(modules, createEagerInstances = createEagerInstances) } override fun unloadKoinModules(module: Module) { diff --git a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt index 3b1d70664..0cf7f219c 100644 --- a/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/jvmMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -66,12 +66,12 @@ object GlobalContext : KoinContext { return koinApplication } - override fun loadKoinModules(module: Module) = synchronized(this) { - get().loadModules(listOf(module)) + override fun loadKoinModules(module: Module, createEagerInstances : Boolean) = synchronized(this) { + get().loadModules(listOf(module), createEagerInstances = createEagerInstances) } - override fun loadKoinModules(modules: List) = synchronized(this) { - get().loadModules(modules) + override fun loadKoinModules(modules: List, createEagerInstances : Boolean) = synchronized(this) { + get().loadModules(modules, createEagerInstances = createEagerInstances) } override fun unloadKoinModules(module: Module) = synchronized(this) { diff --git a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt index e1b0f8d77..3e98dd2b3 100644 --- a/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt +++ b/core/koin-core/src/nativeMain/kotlin/org/koin/core/context/GlobalContext.kt @@ -66,12 +66,12 @@ internal class MutableGlobalContext : KoinContext { koinApplication } - override fun loadKoinModules(module: Module) = lock.withLock { - get().loadModules(listOf(module)) + override fun loadKoinModules(module: Module, createEagerInstances : Boolean) = lock.withLock { + get().loadModules(listOf(module), createEagerInstances = createEagerInstances) } - override fun loadKoinModules(modules: List) = lock.withLock { - get().loadModules(modules) + override fun loadKoinModules(modules: List, createEagerInstances : Boolean) = lock.withLock { + get().loadModules(modules, createEagerInstances = createEagerInstances) } override fun unloadKoinModules(module: Module) = lock.withLock { From 137005a315ae5b01a461eee61c4f816b0874b140 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Mon, 4 Sep 2023 18:42:54 +0200 Subject: [PATCH 51/55] rework case of type resolution shadowing, with Context resolution - fix #1595 --- .../java/org/koin/android/ext/koin/KoinExt.kt | 10 ++-- .../org/koin/core/registry/ScopeRegistry.kt | 5 +- .../kotlin/org/koin/core/scope/Scope.kt | 18 ++++--- .../kotlin/org/koin/core/SourceScopeTest.kt | 54 +++++++++++++++++++ docs/reference/koin-android/get-instances.md | 28 +++++++++- .../sandbox/components/mvvm/Presenters.kt | 7 +++ .../org/koin/sample/sandbox/di/AppModule.kt | 3 ++ .../koin/sample/sandbox/mvvm/MVVMActivity.kt | 7 +++ 8 files changed, 116 insertions(+), 16 deletions(-) create mode 100644 core/koin-core/src/commonTest/kotlin/org/koin/core/SourceScopeTest.kt create mode 100644 examples/androidx-samples/src/main/java/org/koin/sample/sandbox/components/mvvm/Presenters.kt diff --git a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt index 40ef4d33c..2f63235cf 100644 --- a/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt +++ b/android/koin-android/src/main/java/org/koin/android/ext/koin/KoinExt.kt @@ -24,9 +24,7 @@ import org.koin.android.logger.AndroidLogger import org.koin.core.KoinApplication import org.koin.core.annotation.KoinInternalApi import org.koin.core.logger.Level -import org.koin.core.module.KoinApplicationDslMarker import org.koin.core.registry.saveProperties -import org.koin.dsl.bind import org.koin.dsl.binds import org.koin.dsl.module import java.util.* @@ -42,7 +40,7 @@ import java.util.* * @param level */ fun KoinApplication.androidLogger( - level: Level = Level.INFO, + level: Level = Level.INFO, ): KoinApplication { koin.setupLogger(AndroidLogger(level)) return this @@ -60,11 +58,11 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication { if (androidContext is Application) { koin.loadModules(listOf(module { - single { androidContext } binds arrayOf(Context::class,Application::class) + single { androidContext } binds arrayOf(Context::class, Application::class) })) } else { koin.loadModules(listOf(module { - single{ androidContext } + single { androidContext } })) } @@ -77,7 +75,7 @@ fun KoinApplication.androidContext(androidContext: Context): KoinApplication { */ @OptIn(KoinInternalApi::class) fun KoinApplication.androidFileProperties( - koinPropertyFile: String = "koin.properties", + koinPropertyFile: String = "koin.properties", ): KoinApplication { val koinProperties = Properties() val androidContext = koin.get() diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt index 520c46c7d..45638b31b 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/registry/ScopeRegistry.kt @@ -64,7 +64,10 @@ class ScopeRegistry(private val _koin: Koin) { throw ScopeAlreadyCreatedException("Scope with id '$scopeId' is already created") } val scope = Scope(qualifier, scopeId, _koin = _koin) - source?.let { scope._source = source } + source?.let { + _koin.logger.debug("|- Scope source set id:'$scopeId' -> $source") + scope._source = source + } scope.linkTo(rootScope) _scopes[scopeId] = scope return scope diff --git a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt index f39daeea9..1cc62f766 100644 --- a/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt +++ b/core/koin-core/src/commonMain/kotlin/org/koin/core/scope/Scope.kt @@ -141,7 +141,6 @@ class Scope( * * Deprecation: Source instance resolution is now done within graph resolution part. It's done in the regular "get()" function. */ - @Deprecated("No need to use getSource(). You can an use get() directly.", ReplaceWith("get()")) inline fun getSource(): T? { return _source as? T } @@ -244,18 +243,21 @@ class Scope( clazz: KClass<*>, instanceContext: InstanceContext, parameterDef: ParametersDefinition? - ) = (_koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) + ) = ( + _koin.instanceRegistry.resolveInstance(qualifier, clazz, this.scopeQualifier, instanceContext) ?: run { _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in injected parameters") _parameterStackLocal.get()?.firstOrNull()?.getOrNull(clazz) } ?: run { - _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source" ) - _source?.let { source -> - if (source::class == clazz && qualifier == null) { - _source as? T - } else null - } + if (!isRoot){ + _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look at scope source" ) + _source?.let { source -> + if (clazz.isInstance(source) && qualifier == null) { + _source as? T + } else null + } + } else null } ?: run { _koin.logger.debug("|- ? t:'${clazz.getFullName()}' - q:'$qualifier' look in other scopes" ) diff --git a/core/koin-core/src/commonTest/kotlin/org/koin/core/SourceScopeTest.kt b/core/koin-core/src/commonTest/kotlin/org/koin/core/SourceScopeTest.kt new file mode 100644 index 000000000..6cdf6424b --- /dev/null +++ b/core/koin-core/src/commonTest/kotlin/org/koin/core/SourceScopeTest.kt @@ -0,0 +1,54 @@ +package org.koin.core + +import org.koin.core.logger.Level +import org.koin.core.module.dsl.bind +import org.koin.core.module.dsl.withOptions +import org.koin.core.qualifier.named +import org.koin.dsl.bind +import org.koin.dsl.koinApplication +import org.koin.dsl.module +import kotlin.test.Test +import kotlin.test.assertTrue + +class SourceScopeTest { + + interface Ctx + class AppCtx : Ctx + class Act : Ctx + class Presenter1(val appCtx: AppCtx) + class Presenter2(val appCtx: Ctx) + class Presenter3(val appCtx: Act) + + @Test + fun return_right_ctx(){ + val module = module { + single { AppCtx() } withOptions { + bind() + bind() + } + scope{ + scoped { Presenter1(get()) } + scoped { Presenter2(get()) } + scoped { Presenter3(get()) } + } + } + + val koin = koinApplication { + printLogger(Level.DEBUG) + modules(module) + }.koin + + val act = Act() + val scope = koin.createScope("_scope_",act) + val p1 = scope.get() + val p2 = scope.get() + val p3 = scope.get() + val source = scope.getSource() + val appCtx = koin.get() + + assertTrue { p1.appCtx == appCtx } + assertTrue { source != appCtx } + assertTrue { p2.appCtx == source } + assertTrue { p3.appCtx == source } + } +} \ No newline at end of file diff --git a/docs/reference/koin-android/get-instances.md b/docs/reference/koin-android/get-instances.md index b839e55f9..4655f6394 100644 --- a/docs/reference/koin-android/get-instances.md +++ b/docs/reference/koin-android/get-instances.md @@ -81,4 +81,30 @@ val appModule = module { MyPresenter(androidContext().resources.getString(R.string.mystring)) } } -``` \ No newline at end of file +``` + +## Android Scope & Android Context resolution + +While you have a scope that is binding the `Context` type, you may need to resolve the `Context` but from different level. + +Let's take a config: + +```kotlin +class MyPresenter(val context : Context) + +startKoin { + androidContext(context) + modules( + module { + scope { + scoped { MyPresenter( ) } + } + } + ) +} +``` + +To resolve the right type in `MyPresenter`, use the following: +- `get()` will resolve closest `Context` definition, here it will be the source scope `MyActivity` +- `androidContext()` will also resolve closest `Context` definition, here it will be the source scope `MyActivity` +- `androidApplication()` will also resolve `Application` definition, here it will be the source scope `context` object defined in Koin setup diff --git a/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/components/mvvm/Presenters.kt b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/components/mvvm/Presenters.kt new file mode 100644 index 000000000..0440bf28c --- /dev/null +++ b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/components/mvvm/Presenters.kt @@ -0,0 +1,7 @@ +package org.koin.sample.sandbox.components.mvvm + +import android.app.Application +import android.content.Context + +class MVVMPresenter1(val ctx : Context) +class MVVMPresenter2(val ctx : Application) \ No newline at end of file diff --git a/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/di/AppModule.kt b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/di/AppModule.kt index fc4342f3b..955523505 100644 --- a/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/di/AppModule.kt +++ b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/di/AppModule.kt @@ -68,6 +68,9 @@ val mvvmModule = lazyModule { viewModelOf(::ExtSimpleViewModel) viewModelOf(::ExtSimpleViewModel) { named("ext") } viewModelOf(::SavedStateViewModel) { named("vm2") } + + scoped { MVVMPresenter1(get()) } + scoped { MVVMPresenter2(get()) } } scope { scoped { (id: String) -> ScopedPresenter(id, get()) } diff --git a/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/mvvm/MVVMActivity.kt b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/mvvm/MVVMActivity.kt index 991616495..7328a6bf4 100644 --- a/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/mvvm/MVVMActivity.kt +++ b/examples/androidx-samples/src/main/java/org/koin/sample/sandbox/mvvm/MVVMActivity.kt @@ -1,5 +1,6 @@ package org.koin.sample.sandbox.mvvm +import android.app.Application import android.os.Bundle import android.widget.Button import org.koin.android.ext.android.getKoin @@ -75,5 +76,11 @@ class MVVMActivity : ScopeActivity(contentLayoutId = R.layout.mvvm_activity) { assert(scopeVm.session.id == extScopeVm.session.id) assert(stateVM.result == "vm1") assert(vm1.id != vm2.id) + + val p1 = scope.get() + val p2 = scope.get() + + assert(p1.ctx == this) + assert(p2.ctx == getKoin().get()) } } \ No newline at end of file From dc46cec44a14bea61aa7183bb803db59f0eeb920 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 7 Sep 2023 14:44:16 +0200 Subject: [PATCH 52/55] ktor - clean koin plugin --- .../main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt | 5 +++-- .../src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt | 4 ++-- .../src/main/kotlin/org/koin/ktor/ext/RouteExt.kt | 7 +++---- .../src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt | 5 ++--- .../src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt | 7 ++++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt index 9d7dd06cb..0be0362b8 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationCallExt.kt @@ -19,7 +19,8 @@ import io.ktor.server.application.* import org.koin.core.Koin import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier -import org.koin.ktor.plugin.koinKey +import org.koin.ktor.plugin.KOIN_ATTRIBUTE_KEY +import org.koin.ktor.plugin.KOIN_KEY /** * Ktor Koin extensions for ApplicationCall class @@ -70,4 +71,4 @@ fun ApplicationCall.getProperty(key: String, defaultValue: String) = /** * Help work on ModuleDefinition */ -fun ApplicationCall.getKoin(): Koin = application.attributes.get(koinKey).koin +fun ApplicationCall.getKoin(): Koin = application.attributes.get(KOIN_ATTRIBUTE_KEY).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt index b5b81b884..b9153bf9a 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/ApplicationExt.kt @@ -19,7 +19,7 @@ import io.ktor.server.application.* import org.koin.core.Koin import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier -import org.koin.ktor.plugin.koinKey +import org.koin.ktor.plugin.KOIN_ATTRIBUTE_KEY /** * Ktor Koin extensions @@ -31,7 +31,7 @@ import org.koin.ktor.plugin.koinKey /** * Help work on ModuleDefinition */ -fun Application.getKoin(): Koin = attributes.get(koinKey).koin +fun Application.getKoin(): Koin = attributes.get(KOIN_ATTRIBUTE_KEY).koin /** * inject lazily given dependency diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt index 09297824e..95c6d246d 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RouteExt.kt @@ -17,10 +17,9 @@ package org.koin.ktor.ext import io.ktor.server.routing.* import org.koin.core.Koin -import org.koin.core.context.GlobalContext import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier -import org.koin.ktor.plugin.koinKey +import org.koin.ktor.plugin.KOIN_ATTRIBUTE_KEY /** * Ktor Koin extensions for Routing class @@ -55,7 +54,7 @@ inline fun Route.get( * Retrieve given property for KoinComponent * @param key - key property */ -fun Route.getProperty(key: String) = +fun Route.getProperty(key: String) = getKoin().getProperty(key) /** @@ -72,4 +71,4 @@ fun Route.getProperty(key: String, defaultValue: String) = /** * Help work on ModuleDefinition */ -fun Route.getKoin(): Koin = application.attributes.get(koinKey).koin +fun Route.getKoin(): Koin = application.attributes.get(KOIN_ATTRIBUTE_KEY).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt index da8721433..6eb86fd8e 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/ext/RoutingExt.kt @@ -17,10 +17,9 @@ package org.koin.ktor.ext import io.ktor.server.routing.* import org.koin.core.Koin -import org.koin.core.context.GlobalContext import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier -import org.koin.ktor.plugin.koinKey +import org.koin.ktor.plugin.KOIN_ATTRIBUTE_KEY /** * Ktor Koin extensions for Routing class @@ -72,4 +71,4 @@ inline fun Routing.getProperty(key: String, defaultValue: T) = /** * Help work on ModuleDefinition */ -fun Routing.getKoin(): Koin = application.attributes.get(koinKey).koin +fun Routing.getKoin(): Koin = application.attributes.get(KOIN_ATTRIBUTE_KEY).koin diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt index c136a75b8..6fb7b8ead 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt @@ -34,7 +34,7 @@ import org.koin.dsl.koinApplication // Plugin val Koin = createApplicationPlugin(name = "Koin", createConfiguration = ::koinApplication) { val koinApplication = pluginConfig - application.attributes.put(koinKey, koinApplication) + application.attributes.put(KOIN_ATTRIBUTE_KEY, koinApplication) val monitor = environment?.monitor monitor?.raise(KoinApplicationStarted, koinApplication) @@ -47,7 +47,8 @@ val Koin = createApplicationPlugin(name = "Koin", createConfiguration = ::koinAp } fun Application.koin(configuration: KoinAppDeclaration) = pluginOrNull(Koin)?.let { - attributes.getOrNull(koinKey)?.apply(configuration) + attributes.getOrNull(KOIN_ATTRIBUTE_KEY)?.apply(configuration) } ?: install(Koin, configuration) -val koinKey = AttributeKey("KoinKey") +const val KOIN_KEY = "KOIN" +val KOIN_ATTRIBUTE_KEY = AttributeKey(KOIN_KEY) From 2e491fb0977be9bcaec2ec95be90751d3ae9456a Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 7 Sep 2023 15:56:01 +0200 Subject: [PATCH 53/55] ktor - RequestScope holder added in main plugin + sample test --- .../main/kotlin/org/koin/sample/AppModule2.kt | 1 + .../main/kotlin/org/koin/sample/Application.kt | 11 +++++------ .../main/kotlin/org/koin/sample/Components.kt | 6 ++++++ .../kotlin/org/koin/sample/KoinAppModule.kt | 6 ++++++ .../kotlin/org/koin/ktor/plugin/KoinPlugin.kt | 18 +++++++++++++++++- .../org/koin/ktor/plugin/RequestScope.kt | 10 ++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/RequestScope.kt diff --git a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/AppModule2.kt b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/AppModule2.kt index 07656b0fa..01cc86206 100644 --- a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/AppModule2.kt +++ b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/AppModule2.kt @@ -5,6 +5,7 @@ import io.ktor.server.response.* import io.ktor.server.routing.* import org.koin.ktor.ext.inject import org.koin.ktor.plugin.koin +import org.koin.ktor.plugin.scope fun Application.module2() { koin { diff --git a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Application.kt b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Application.kt index 4444be97a..6c232e923 100644 --- a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Application.kt +++ b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Application.kt @@ -6,11 +6,9 @@ import io.ktor.server.netty.* import io.ktor.server.plugins.callloging.* import io.ktor.server.response.* import io.ktor.server.routing.* +import org.koin.core.logger.Level import org.koin.ktor.ext.inject -import org.koin.ktor.plugin.Koin -import org.koin.ktor.plugin.KoinApplicationStarted -import org.koin.ktor.plugin.KoinApplicationStopPreparing -import org.koin.ktor.plugin.KoinApplicationStopped +import org.koin.ktor.plugin.* import org.koin.logger.slf4jLogger fun main(args: Array) { @@ -23,7 +21,7 @@ fun main(args: Array) { fun Application.mainModule() { install(CallLogging) install(Koin) { - slf4jLogger() + slf4jLogger(Level.DEBUG) modules(appModule) } @@ -42,9 +40,10 @@ fun Application.mainModule() { // Routing section routing { get("/hello") { + val newId = call.scope.get().id + println("ScopeComponent.id = $newId") call.respondText(helloService.sayHello()) } } } - diff --git a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Components.kt b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Components.kt index a4efacc4d..2fe55b31e 100644 --- a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Components.kt +++ b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/Components.kt @@ -1,5 +1,7 @@ package org.koin.sample +import java.util.UUID + class HelloRepository { fun getHello(): String = "Ktor & Koin" } @@ -14,4 +16,8 @@ class HelloServiceImpl(val helloRepository: HelloRepository) : HelloService { class HelloService2() : HelloService{ override fun sayHello() = "Hello Again!" +} + +class ScopeComponent { + val id = UUID.randomUUID().toString() } \ No newline at end of file diff --git a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/KoinAppModule.kt b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/KoinAppModule.kt index 233f2c2f5..e69150ab5 100644 --- a/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/KoinAppModule.kt +++ b/ktor/examples/hello-ktor/src/main/kotlin/org/koin/sample/KoinAppModule.kt @@ -2,8 +2,10 @@ package org.koin.sample import org.koin.core.module.dsl.bind import org.koin.core.module.dsl.createdAtStart +import org.koin.core.module.dsl.scopedOf import org.koin.core.module.dsl.singleOf import org.koin.dsl.module +import org.koin.ktor.plugin.RequestScope val appModule = module { singleOf(::HelloServiceImpl){ @@ -11,6 +13,10 @@ val appModule = module { createdAtStart() } singleOf(::HelloRepository) + + scope{ + scopedOf(::ScopeComponent) + } } val appModule2 = module { diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt index 6fb7b8ead..487c87d7e 100644 --- a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/KoinPlugin.kt @@ -16,8 +16,10 @@ package org.koin.ktor.plugin import io.ktor.server.application.* +import io.ktor.server.application.hooks.* import io.ktor.util.* import org.koin.core.KoinApplication +import org.koin.core.scope.Scope import org.koin.dsl.KoinAppDeclaration import org.koin.dsl.koinApplication @@ -38,12 +40,21 @@ val Koin = createApplicationPlugin(name = "Koin", createConfiguration = ::koinAp val monitor = environment?.monitor monitor?.raise(KoinApplicationStarted, koinApplication) - + // Core Plugin monitor?.subscribe(ApplicationStopping) { monitor.raise(KoinApplicationStopPreparing, koinApplication) koinApplication.koin.close() monitor.raise(KoinApplicationStopped, koinApplication) } + + // Scope Handling + on(CallSetup) { call -> + val scopeComponent = RequestScope(koinApplication.koin) + call.attributes.put(KOIN_SCOPE_ATTRIBUTE_KEY, scopeComponent.scope) + } + on(ResponseSent) { call -> + call.attributes[KOIN_SCOPE_ATTRIBUTE_KEY].close() + } } fun Application.koin(configuration: KoinAppDeclaration) = pluginOrNull(Koin)?.let { @@ -52,3 +63,8 @@ fun Application.koin(configuration: KoinAppDeclaration) = pluginOrNull(Koin)?.le const val KOIN_KEY = "KOIN" val KOIN_ATTRIBUTE_KEY = AttributeKey(KOIN_KEY) + +val ApplicationCall.scope: Scope get() = this.attributes[KOIN_SCOPE_ATTRIBUTE_KEY] + +const val KOIN_SCOPE_KEY = "KOIN_SCOPE" +val KOIN_SCOPE_ATTRIBUTE_KEY = AttributeKey(KOIN_SCOPE_KEY) \ No newline at end of file diff --git a/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/RequestScope.kt b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/RequestScope.kt new file mode 100644 index 000000000..10984bc37 --- /dev/null +++ b/ktor/koin-ktor/src/main/kotlin/org/koin/ktor/plugin/RequestScope.kt @@ -0,0 +1,10 @@ +package org.koin.ktor.plugin + +import org.koin.core.Koin +import org.koin.core.component.KoinScopeComponent +import org.koin.core.component.createScope + +class RequestScope(private val _koin: Koin) : KoinScopeComponent { + override fun getKoin(): Koin = _koin + override val scope = createScope() +} \ No newline at end of file From 280fdfeb79a5108225dd8c87e72e76405a41ddb8 Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 7 Sep 2023 16:53:45 +0200 Subject: [PATCH 54/55] Ktor doc update + doc update on Scope per request --- docs/reference/koin-ktor/ktor.md | 75 +++++++++++++------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/docs/reference/koin-ktor/ktor.md b/docs/reference/koin-ktor/ktor.md index fa3d908e5..b3b09038d 100644 --- a/docs/reference/koin-ktor/ktor.md +++ b/docs/reference/koin-ktor/ktor.md @@ -1,15 +1,10 @@ --- -title: Koin for Ktor +title: Ktor dependency injection with Koin --- -:::note - The koin-ktor project is updated for Ktor `2.0.1` -::: - - -The `koin-ktor` project is dedicated to bring dependency injection for Ktor. +The `koin-ktor` module is dedicated to bring dependency injection for Ktor. -## Install Koin & inject +## Install Koin Plugin To start a Koin container in Ktor, just install the `Koin` plugin like follow: @@ -25,22 +20,20 @@ fun Application.main() { ``` :::note - You can also start it from outside of Ktor, but you won't be compatible with `autoreload` feature. + Koin Ktor plugin uses isolated Koin context. You won't be able to start Koin outside of Ktor ::: -### Injection in Application +## Inject in Ktor -Koin `inject()` and `get()` functions are available from `Application` class: +Koin `inject()` and `get()` functions are available from `Application`,`Route`,`Routing` classes: ```kotlin fun Application.main() { - //... - // Lazy inject HelloService + // inject HelloService val service by inject() - // Routing section routing { get("/hello") { call.respondText(service.sayHello()) @@ -49,55 +42,49 @@ fun Application.main() { } ``` -### Declaring Koin for a Ktor Module - -For a Ktor module, you can load specific Koin modules. Just declare them with `koin { }` function: +### Resolve from Ktor Request Scope (since 3.5.0) +You can declare components to live within Ktor request scope timeline. For this, you just need to declare your component inside a `scope` section. Given a `ScopeComponent` class to instantiate on RequestScope, let's declare it: ```kotlin -fun Application.module2() { - koin { - // load appModule2 for module2 Ktor module - modules(appModule2) - } - +scope{ + scopedOf(::ScopeComponent) } ``` - -### Injecting in Routing & Route - -Koin `inject()` and `get()` functions are available from `Route` & `Routing` classes: +And from your http call, just call `call.scope.get()` to resolve the right dependency: ```kotlin -fun Routing.v1() { - - // Lazy inject HelloService from within a Ktor Routing Node - val service by inject() - - get("/v1/hello") { - call.respondText("[/v1/hello] " + service.sayHello()) +routing { + get("/hello") { + val component = call.scope.get() + // ... } } - ``` -From `Route` class: +:::note + For each new request, the scope will be recreated. This creates and drop scope instances, for each request +::: + -```kotlin -fun Route.hello() { +### Run Koin from an external Ktor Module - // Lazy inject HelloService from within a Ktor Route - val service by inject() +For a Ktor module, you can load specific Koin modules. Just declare them with `koin { }` function: - get("/v1/bye") { - call.respondText("[/v1/bye] " + service.sayHello()) + +```kotlin +fun Application.module2() { + + koin { + // load koin modules + modules(appModule2) } -} +} ``` -### Events +### Ktor Events You can listen to KTor Koin events: From 217e2cb97f83ed81163a24efe1602df3b9fbfc7b Mon Sep 17 00:00:00 2001 From: Arnaud Giuliani Date: Thu, 7 Sep 2023 17:39:27 +0200 Subject: [PATCH 55/55] fix coroutines lib version --- core/koin-core-coroutines/build.gradle | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/koin-core-coroutines/build.gradle b/core/koin-core-coroutines/build.gradle index c7ec689b1..cdd6f913c 100644 --- a/core/koin-core-coroutines/build.gradle +++ b/core/koin-core-coroutines/build.gradle @@ -45,8 +45,7 @@ kotlin { dependencies { api kotlin("stdlib-common") api project(":koin-core") - - api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" + api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" } } @@ -54,8 +53,7 @@ kotlin { dependencies { implementation kotlin("test-common") implementation kotlin("test-annotations-common") - - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutines_version" } }