From a084102d85fa3ab64c4452c44059fbca64db9054 Mon Sep 17 00:00:00 2001 From: Adrian Kuta Date: Tue, 14 Oct 2025 12:15:02 +0200 Subject: [PATCH] fix: Add JavaScript targets - Added JS (IR) targets (`browser` and `nodejs`) to the Kotlin Multiplatform configuration for publishing. --- .github/workflows/test.yml | 2 +- .idea/studiobot.xml | 6 ++++++ build.gradle.kts | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .idea/studiobot.xml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1dfd281..e9a79b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,4 +20,4 @@ jobs: # Builds the release artifacts of the library - name: Test - run: ./gradlew test \ No newline at end of file + run: ./gradlew cleanJvmTest jvmTest \ No newline at end of file diff --git a/.idea/studiobot.xml b/.idea/studiobot.xml new file mode 100644 index 0000000..539e3b8 --- /dev/null +++ b/.idea/studiobot.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 8bc6d28..21a2cd5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,6 +71,12 @@ kotlin { } } + // JS targets (IR) for publishing + js(IR) { + browser() + nodejs() + } + // iOS targets iosX64() iosArm64() @@ -91,6 +97,8 @@ kotlin { val commonTest by getting { dependencies { implementation(kotlin("test")) } } val jvmMain by getting { dependencies { implementation(kotlin("script-runtime")) } } val jvmTest by getting + val jsMain by getting + val jsTest by getting val nativeMain by getting val nativeTest by getting