-
Notifications
You must be signed in to change notification settings - Fork 624
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Includes: * Migrating to Kotlin 1.9.23 (with support for 2.0.0-Beta2), Gradle 8.6 * Using kotlinx.coroutines 1.8.0 * Simplifying the source set hierarchy in build scripts * Adding a common `jsHosted` source set for JS-hosted targets (`js` and `wasmJs`) * Removing `watchosX86` and `iosArm32` targets * Deprecating `kotest-extensions-http`, meanwhile restricting it to JVM Fixes #3598. --------- Co-authored-by: Emil Kantis <emil.kantis@protonmail.com> Co-authored-by: Sam <sam@sksamuel.com>
- Loading branch information
1 parent
23b0629
commit 2a61950
Showing
115 changed files
with
648 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,57 @@ | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinHierarchyTemplate | ||
|
||
plugins { | ||
id("kotlin-conventions") | ||
} | ||
|
||
kotlin { | ||
if (!project.hasProperty(Ci.JVM_ONLY)) { | ||
js(IR) { | ||
js { | ||
browser() | ||
nodejs() | ||
} | ||
|
||
wasmJs { | ||
browser() | ||
nodejs() | ||
} | ||
|
||
/* FIXME: enable wasmWasi when there is support in kotlinx-coroutines-core (1.8.0-RC does only wasmJs) | ||
wasmWasi { | ||
nodejs() | ||
} | ||
*/ | ||
|
||
applyHierarchyTemplate(KotlinHierarchyTemplate.default) { | ||
group("common") { | ||
group("jsHosted") { | ||
withJs() | ||
withWasm() // FIXME: KT-63417 – to be split into `withWasmJs` and `withWasmWasi` | ||
} | ||
} | ||
} | ||
} else { | ||
// Make sure every project has at least one valid target, otherwise Kotlin compiler will complain | ||
jvm() | ||
} | ||
} | ||
|
||
// FIXME: WORKAROUND https://youtrack.jetbrains.com/issue/KT-65864 | ||
// Use a Node.js version current enough to support Kotlin/Wasm | ||
|
||
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> { | ||
rootProject.extensions.configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> { | ||
// Initialize once in a multi-project build. | ||
// Otherwise, Gradle would complain "Configuration already finalized for previous property values". | ||
if (!System.getProperty("nodeJsCanaryConfigured").toBoolean()) { | ||
nodeVersion = "22.0.0-nightly2024010568c8472ed9" | ||
println("Using Node.js $nodeVersion to support Kotlin/Wasm") | ||
nodeDownloadBaseUrl = "https://nodejs.org/download/nightly" | ||
System.setProperty("nodeJsCanaryConfigured", "true") | ||
} | ||
} | ||
} | ||
|
||
rootProject.tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach { | ||
args.add("--ignore-engines") // Prevent Yarn from complaining about newer Node.js versions. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@file:Suppress("UNUSED_VARIABLE") | ||
|
||
plugins { | ||
id("kotlin-conventions") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.