From 903a9bb8aa4cfd5576a7b13488be33cb02183d2a Mon Sep 17 00:00:00 2001 From: "dima.avdeev" Date: Mon, 12 Feb 2024 21:21:38 +0400 Subject: [PATCH] Added WASM to components.uiToolingPreview library (#4286) Added Wasm target to gradle publication --- .../ui-tooling-preview/library/build.gradle.kts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/components/ui-tooling-preview/library/build.gradle.kts b/components/ui-tooling-preview/library/build.gradle.kts index e7a7ac4612..964b992ea0 100644 --- a/components/ui-tooling-preview/library/build.gradle.kts +++ b/components/ui-tooling-preview/library/build.gradle.kts @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi +import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { kotlin("multiplatform") @@ -23,9 +24,11 @@ kotlin { iosSimulatorArm64() js { browser { - testTask(Action { - enabled = false - }) + } + } + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + browser { } } macosX64() @@ -51,3 +54,10 @@ configureMavenPublication( name = "Experimental Compose Multiplatform tooling library API. This library provides the API required to declare " + "@Preview composables in user apps." ) + +afterEvaluate { + // TODO(o.k.): remove this after we refactor jsAndWasmMain source set in skiko to get rid of broken "common" js-interop + tasks.configureEach { + if (name == "compileWebMainKotlinMetadata") enabled = false + } +}