Skip to content

chore: migrate away from deprecated NodeJS/Yarn extensions #372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.gradle.api.tasks.PathSensitivity.NAME_ONLY
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin.Companion.kotlinNodeJsRootExtension
import org.jetbrains.kotlin.gradle.targets.js.yarn.yarn
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsEnvSpec
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootEnvSpec

plugins {
kotlin("multiplatform") version "2.1.21"
Expand Down Expand Up @@ -167,13 +167,17 @@ kotlin {
}
}

kotlinNodeJsRootExtension.version = "20.18.1"

// disable the KMP plugin adding custom repositories which is bad practice
// and promotes supply chain attacks
// instead we define the repositories ourselves in the settings script
kotlinNodeJsRootExtension.downloadBaseUrl = null
yarn.downloadBaseUrl = null
configure<NodeJsEnvSpec> {
version.set("20.18.1")
downloadBaseUrl.set(provider { null })
}

configure<YarnRootEnvSpec> {
downloadBaseUrl.set(provider { null })
}

distributions {
main {
Expand Down
Loading