Skip to content

Commit c380e8f

Browse files
russellrusshwolf
russell
authored andcommitted
Configure node version for wasm
1 parent a21d007 commit c380e8f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
2+
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
3+
14
/*
25
* Copyright 2020 Russell Wolf
36
*
@@ -105,3 +108,12 @@ val isReleaseBuild: Boolean
105108
apiValidation {
106109
ignoredProjects.add("tests")
107110
}
111+
112+
// Need new enough node for WASM as of Kotlin 1.9.20
113+
rootProject.extensions.findByType<NodeJsRootExtension>()?.apply {
114+
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
115+
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
116+
}
117+
tasks.withType<KotlinNpmInstallTask>().configureEach {
118+
args.add("--ignore-engines")
119+
}

sample/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
2+
import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask
3+
14
/*
25
* Copyright 2020 Russell Wolf
36
*
@@ -32,3 +35,12 @@ allprojects {
3235
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
3336
}
3437
}
38+
39+
// Need new enough node for WASM as of Kotlin 1.9.20
40+
rootProject.extensions.findByType<NodeJsRootExtension>()?.apply {
41+
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
42+
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
43+
}
44+
tasks.withType<KotlinNpmInstallTask>().configureEach {
45+
args.add("--ignore-engines")
46+
}

0 commit comments

Comments
 (0)