Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions acp-ktor-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {
}

kotlin {
js {
browser()
nodejs()
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nerzhulart Btw, should we add wasm target too? (And to the other ktor modules)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasm has been added as a shared target in buildSrc.

sourceSets {
commonMain {
dependencies {
Expand Down
5 changes: 5 additions & 0 deletions acp-ktor-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ plugins {
}

kotlin {
js {
browser()
nodejs()
}

sourceSets {
commonTest {
dependencies {
Expand Down
5 changes: 5 additions & 0 deletions acp-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {
}

kotlin {
js {
browser()
nodejs()
}

sourceSets {
commonMain {
dependencies {
Expand Down
5 changes: 5 additions & 0 deletions acp-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {
}

kotlin {
js {
browser()
nodejs()
}

sourceSets {
commonMain {
dependencies {
Expand Down
5 changes: 5 additions & 0 deletions acp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ plugins {
}

kotlin {
js {
browser()
nodejs()
}

sourceSets {
commonMain {
dependencies {
Expand Down
7 changes: 5 additions & 2 deletions buildSrc/src/main/kotlin/acp.multiplatform.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

Expand Down Expand Up @@ -31,9 +34,9 @@ kotlin {
jvm {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}
js { nodejs() }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only nodejs()? I.e. why other modules have both nodejs and browser?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent adding the browser target for the server, since including browser there would cause an exception

wasmJs { nodejs() }
// Future multiplatform targets can be added here without changing the code
// js { nodejs() }
wasmJs { nodejs() }
// linuxX64(); macosX64(); mingwX64()

explicitApi = ExplicitApiMode.Strict
Expand Down
Loading