Skip to content

Commit

Permalink
Configure node version for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
russell authored and russhwolf committed Nov 21, 2023
1 parent a21d007 commit c380e8f
Show file tree
Hide file tree
Showing 2 changed files with 24 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
*
Expand Down Expand Up @@ -105,3 +108,12 @@ val isReleaseBuild: Boolean
apiValidation {
ignoredProjects.add("tests")
}

// Need new enough node for WASM as of Kotlin 1.9.20
rootProject.extensions.findByType<NodeJsRootExtension>()?.apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}
tasks.withType<KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
12 changes: 12 additions & 0 deletions sample/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
*
Expand Down Expand Up @@ -32,3 +35,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.extensions.findByType<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 c380e8f

Please sign in to comment.