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 93% 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..1393a172 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 @@ -2,14 +2,17 @@ package money.vivid.elmslie.core.config 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 import money.vivid.elmslie.core.store.StoreListener +import kotlin.concurrent.Volatile object ElmslieConfig { - @Volatile private lateinit var _logger: ElmslieLogger + @Volatile + private lateinit var _logger: ElmslieLogger @Volatile private lateinit var _ioDispatchers: CoroutineDispatcher 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/ScreenReducer.kt b/elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/ScreenReducer.kt similarity index 100% rename from elmslie-core/src/main/kotlin/money/vivid/elmslie/core/store/ScreenReducer.kt rename to elmslie-core/src/commonMain/kotlin/money/vivid/elmslie/core/store/ScreenReducer.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/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/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/ScreenReducerTest.kt b/elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/ScreenReducerTest.kt similarity index 100% rename from elmslie-core/src/test/kotlin/money/vivid/elmslie/core/store/dsl/ScreenReducerTest.kt rename to elmslie-core/src/commonTest/kotlin/money/vivid/elmslie/core/store/dsl/ScreenReducerTest.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