From ff28301a80183b3c6e937f5ebd4b7637344a39fc Mon Sep 17 00:00:00 2001 From: trdelnk Date: Wed, 1 May 2024 15:40:03 +0300 Subject: [PATCH] support js target --- .../elmslie.kotlin-multiplatform-lib.gradle.kts | 14 ++++++++++++-- .../vivid/elmslie/core/utils/DispatcherProvider.kt | 0 .../vivid/elmslie/core/utils/ResolveStoreKey.kt | 0 3 files changed, 12 insertions(+), 2 deletions(-) rename elmslie-core/src/{wasmJsMain => commonWebMain}/kotlin/money/vivid/elmslie/core/utils/DispatcherProvider.kt (100%) rename elmslie-core/src/{wasmJsMain => commonWebMain}/kotlin/money/vivid/elmslie/core/utils/ResolveStoreKey.kt (100%) diff --git a/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts b/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts index 17fe5c76..5e207f0c 100644 --- a/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts +++ b/build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts @@ -7,7 +7,14 @@ plugins { } kotlin { - applyDefaultHierarchyTemplate() + applyDefaultHierarchyTemplate { + common { + group("commonWeb") { + withJs() + withWasm() + } + } + } jvm { compilations.all { @@ -21,8 +28,11 @@ kotlin { iosSimulatorArm64() iosX64() + js(IR) { + browser() + } @OptIn(ExperimentalWasmDsl::class) wasmJs { - nodejs() + browser() } } \ No newline at end of file diff --git a/elmslie-core/src/wasmJsMain/kotlin/money/vivid/elmslie/core/utils/DispatcherProvider.kt b/elmslie-core/src/commonWebMain/kotlin/money/vivid/elmslie/core/utils/DispatcherProvider.kt similarity index 100% rename from elmslie-core/src/wasmJsMain/kotlin/money/vivid/elmslie/core/utils/DispatcherProvider.kt rename to elmslie-core/src/commonWebMain/kotlin/money/vivid/elmslie/core/utils/DispatcherProvider.kt diff --git a/elmslie-core/src/wasmJsMain/kotlin/money/vivid/elmslie/core/utils/ResolveStoreKey.kt b/elmslie-core/src/commonWebMain/kotlin/money/vivid/elmslie/core/utils/ResolveStoreKey.kt similarity index 100% rename from elmslie-core/src/wasmJsMain/kotlin/money/vivid/elmslie/core/utils/ResolveStoreKey.kt rename to elmslie-core/src/commonWebMain/kotlin/money/vivid/elmslie/core/utils/ResolveStoreKey.kt