From 172278298090c7f42dbc6139c2273765ca2b9d78 Mon Sep 17 00:00:00 2001 From: Vitaly Pestryakov <34812712+dsvag@users.noreply.github.com> Date: Fri, 9 Feb 2024 19:05:24 +0200 Subject: [PATCH] change source set dir --- .../kotlin/money/vivid/elmslie/core/ElmScope.kt | 2 +- .../kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt | 2 ++ .../money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt | 2 +- .../kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt | 0 .../kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt | 0 .../money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt | 0 .../money/vivid/elmslie/core/logger/strategy/LogStrategy.kt | 0 .../kotlin/money/vivid/elmslie/core/store/Actor.kt | 0 .../money/vivid/elmslie/core/store/EffectCachingElmStore.kt | 0 .../kotlin/money/vivid/elmslie/core/store/ElmStore.kt | 0 .../kotlin/money/vivid/elmslie/core/store/NoOpActor.kt | 0 .../kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt | 0 .../kotlin/money/vivid/elmslie/core/store/Result.kt | 0 .../kotlin/money/vivid/elmslie/core/store/StateReducer.kt | 0 .../kotlin/money/vivid/elmslie/core/store/Store.kt | 0 .../kotlin/money/vivid/elmslie/core/store/StoreListener.kt | 0 .../kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt | 0 .../money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt | 0 .../kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt | 0 .../money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt | 1 - .../kotlin/money/vivid/elmslie/core/switcher/Switcher.kt | 0 .../money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt | 0 .../kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt | 0 .../kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt | 0 .../kotlin/money/vivid/elmslie/core/store/dsl/Models.kt | 0 .../money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt | 0 .../money/vivid/elmslie/core/testutil/model/StoreModels.kt | 0 27 files changed, 4 insertions(+), 3 deletions(-) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/ElmScope.kt (93%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt (96%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt (92%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/logger/strategy/LogStrategy.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/Actor.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStore.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/ElmStore.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/NoOpActor.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/Result.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/StateReducer.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/Store.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/StoreListener.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt (100%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt (96%) rename elmslie-core/src/{main => commonMain}/kotlin/money/vivid/elmslie/core/switcher/Switcher.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/store/dsl/Models.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt (100%) rename elmslie-core/src/{test => commonTest}/kotlin/money/vivid/elmslie/core/testutil/model/StoreModels.kt (100%) diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/ElmScope.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/ElmScope.kt similarity index 93% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/ElmScope.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/ElmScope.kt index 0fe5e087..4efd69c8 100644 --- a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/ElmScope.kt +++ b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/ElmScope.kt @@ -6,7 +6,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.SupervisorJob import money.vivid.elmslie.core.config.ElmslieConfig -@SuppressWarnings("detekt.FunctionNaming") +@Suppress("detekt.FunctionNaming") fun ElmScope(name: String): CoroutineScope = CoroutineScope( context = diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt similarity index 96% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt index c1cb63d5..2cf0b73e 100644 --- a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt +++ b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/config/ElmslieConfig.kt @@ -1,7 +1,9 @@ package money.vivid.elmslie.core.config +import kotlin.concurrent.Volatile import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO import money.vivid.elmslie.core.logger.ElmslieLogConfiguration import money.vivid.elmslie.core.logger.ElmslieLogger import money.vivid.elmslie.core.logger.strategy.IgnoreLog diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt similarity index 92% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt index 7afa7096..c3220428 100644 --- a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt +++ b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/ElmslieLogConfiguration.kt @@ -23,7 +23,7 @@ class ElmslieLogConfiguration { /** Apply the same logging strategy to all log levels */ fun always(strategy: LogStrategy) = apply { - LogSeverity.values().forEach { strategies[it] = strategy } + LogSeverity.entries.forEach { strategies[it] = strategy } } internal fun build() = ElmslieLogger(strategies) diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/ElmslieLogger.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/LogSeverity.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/strategy/IgnoreLog.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/strategy/LogStrategy.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/strategy/LogStrategy.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/logger/strategy/LogStrategy.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/logger/strategy/LogStrategy.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Actor.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Actor.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Actor.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Actor.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStore.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStore.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStore.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStore.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/ElmStore.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/ElmStore.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/ElmStore.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/ElmStore.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/NoOpActor.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/NoOpActor.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/NoOpActor.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/NoOpActor.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/NoOpReducer.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Result.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Result.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Result.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Result.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/StateReducer.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/StateReducer.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/StateReducer.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/StateReducer.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Store.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Store.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/Store.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/Store.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/StoreListener.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/StoreListener.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/StoreListener.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/StoreListener.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/DslReducer.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/OperationsBuilder.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/ResultBuilder.kt diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt similarity index 96% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt index e50f073c..3485781a 100644 --- a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt +++ b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducer.kt @@ -1,6 +1,5 @@ package money.vivid.elmslie.core.store.dsl -import money.vivid.elmslie.core.store.Result import money.vivid.elmslie.core.store.StateReducer import kotlin.reflect.KClass diff --git a/elmslie-core/src/main/kotlin/money/vivid/elmslie/core/switcher/Switcher.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/switcher/Switcher.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/switcher/Switcher.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/switcher/Switcher.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/EffectCachingElmStoreTest.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/ElmStoreTest.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/DslReducerTest.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/Models.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/Models.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/Models.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/Models.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/ScreenDslReducerTest.kt diff --git a/elmslie-core/src/test/kotlin/money/vivid/elmslie/core/testutil/model/StoreModels.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/testutil/model/StoreModels.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/testutil/model/StoreModels.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/testutil/model/StoreModels.kt