Skip to content

Commit

Permalink
Add more build targets for coroutines extensions
Browse files Browse the repository at this point in the history
kotlinx-coroutines has since started publishing more native build
targets since we first became multiplatform. This commit ensures we also
build native targets for the platforms that were previously missing,
namely:

- androidNativeArm32
- androidNativeArm64
- androidNativeX64
- androidNativeX86
- linuxArm64
- wasmJs

This ensures that we are now supporting all three tiers of Kotlin/Native
target support.

See: https://kotlinlang.org/docs/native-target-support.html
  • Loading branch information
michaelbull committed Mar 3, 2024
1 parent a4fe9f6 commit 5b9e424
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
41 changes: 31 additions & 10 deletions buildSrc/src/main/kotlin/kotlin-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask

Expand All @@ -15,25 +16,45 @@ kotlin {
nodejs()
}

linuxX64()
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
binaries.executable()
nodejs()
}

mingwX64()
/* https://kotlinlang.org/docs/native-target-support.html#tier-1 */

macosArm64()
macosX64()

iosArm64()
macosArm64()
iosSimulatorArm64()
iosX64()

tvosArm64()
tvosSimulatorArm64()
tvosX64()
/* https://kotlinlang.org/docs/native-target-support.html#tier-2 */

linuxX64()
linuxArm64()

watchosArm32()
watchosArm64()
watchosSimulatorArm64()
watchosX64()
watchosArm32()
watchosArm64()

tvosSimulatorArm64()
tvosX64()
tvosArm64()

iosArm64()

/* https://kotlinlang.org/docs/native-target-support.html#tier-3 */

androidNativeArm32()
androidNativeArm64()
androidNativeX86()
androidNativeX64()

mingwX64()

watchosDeviceArm64()

sourceSets {
all {
Expand Down
16 changes: 0 additions & 16 deletions kotlin-result/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
`maven-publish`
id("kotlin-conventions")
Expand All @@ -8,18 +6,4 @@ plugins {

kotlin {
explicitApi()

// Additional targets not currently supported by coroutines
androidNativeArm32()
androidNativeArm64()
androidNativeX64()
androidNativeX86()

linuxArm64()

@OptIn(ExperimentalWasmDsl::class)
wasmJs {
binaries.executable()
nodejs()
}
}

0 comments on commit 5b9e424

Please sign in to comment.