From 600d8bda964643a567687b879dc1290ec1dda37d Mon Sep 17 00:00:00 2001 From: igoriakovlev <54274820+igoriakovlev@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:08:59 +0200 Subject: [PATCH] Add kotlinx.browser dependency to WasmJs target --- buildSrc/src/main/kotlin/Versions.kt | 1 + buildSrc/src/main/kotlin/WasmConfig.kt | 5 +++++ gradle/libs.versions.toml | 1 + 3 files changed, 7 insertions(+) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index cdfcfd37bc2..ec65df532fd 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -9,4 +9,5 @@ object Versions { val junit = "5.10.1" val logback = "1.2.11" val puppeteer = "21.5.0" + val browser = "0.1" } diff --git a/buildSrc/src/main/kotlin/WasmConfig.kt b/buildSrc/src/main/kotlin/WasmConfig.kt index 56e4e0d0757..f9660b90196 100644 --- a/buildSrc/src/main/kotlin/WasmConfig.kt +++ b/buildSrc/src/main/kotlin/WasmConfig.kt @@ -12,6 +12,11 @@ fun Project.configureWasm() { kotlin { sourceSets { + val wasmJsMain by getting { + dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-browser:${Versions.browser}") + } + } val wasmJsTest by getting { dependencies { implementation(npm("puppeteer", Versions.puppeteer)) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 35e07cb81c4..80616814380 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,6 +6,7 @@ coroutines-version = "1.8.0" atomicfu-version = "0.25.0" serialization-version = "1.6.1" # Do not upgrade, 1.6.2 breaks maven publishing! ktlint-version = "3.15.0" +kotlinx-browser-version = "0.1" netty-version = "4.1.109.Final" netty-tcnative-version = "2.0.62.Final"