Skip to content
Open
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
32 changes: 32 additions & 0 deletions wire-grpc-client/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile

Expand Down Expand Up @@ -36,6 +37,16 @@ kotlin {
tvosArm64()
tvosSimulatorArm64()
}
if (System.getProperty("kwasm", "true").toBoolean()) {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
}
@OptIn(ExperimentalWasmDsl::class)
wasmWasi {
nodejs()
}
}
sourceSets {
val commonMain by getting {
dependencies {
Expand All @@ -49,6 +60,27 @@ kotlin {
api(libs.okhttp.core)
}
}
val nonJvmMain by creating {
dependsOn(commonMain)
}
if (System.getProperty("knative", "true").toBoolean()) {
val nativeMain by getting {
dependsOn(nonJvmMain)
}
}
if (System.getProperty("kjs", "true").toBoolean()) {
val jsMain by getting {
dependsOn(nonJvmMain)
}
}
if (System.getProperty("kwasm", "true").toBoolean()) {
val wasmJsMain by getting {
dependsOn(nonJvmMain)
}
val wasmWasiMain by getting {
dependsOn(nonJvmMain)
}
}
}
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ internal actual interface Call {
actual fun execute(): GrpcResponse
}

internal actual fun Sink.asGzip(): Sink = throw UnsupportedOperationException("Gzip not implemented for JS")
internal actual fun Sink.asGzip(): Sink = throw UnsupportedOperationException("Gzip not implemented for this platform")

internal actual fun Source.asGzip(): Source = throw UnsupportedOperationException("Gzip not implemented for JS")
internal actual fun Source.asGzip(): Source = throw UnsupportedOperationException("Gzip not implemented for this platform")

internal actual fun Throwable.addSuppressed(other: Throwable) {
}
Loading