Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure node version for wasm
Browse files Browse the repository at this point in the history
russell committed Nov 17, 2023
1 parent ea5722a commit 7185905
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask

/*
* Copyright 2020 Russell Wolf
*
@@ -105,3 +108,12 @@ val isReleaseBuild: Boolean
apiValidation {
ignoredProjects.add("tests")
}

// Need new enough node for WASM as of Kotlin 1.9.20
rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
tasks.withType<KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
11 changes: 11 additions & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension

/*
* Copyright 2020 Russell Wolf
*
@@ -32,3 +34,12 @@ allprojects {
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}

// Need new enough node for WASM as of Kotlin 1.9.20
rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
tasks.withType<KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}

0 comments on commit 7185905

Please sign in to comment.