File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
gradle/build-logic/src/main/kotlin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -193,19 +193,20 @@ artifacts {
193193 }
194194}
195195
196- // Initialize Node.js and NPM extensions only once in a multi-module project
196+ // Ideally, NodeJsPlugin should be applied to the root project,
197+ // but this is a hack to apply from the kotlin.mpp convention plugin.
197198var nodeJsEnabled: String? by rootProject.extra
198199
199200if (nodeJsEnabled.toBoolean().not ()) {
200- rootProject.plugins.withType<NodeJsRootPlugin > {
201- rootProject.extensions.configure< NodeJsRootExtension > {
201+ rootProject.plugins.withType<NodeJsPlugin > {
202+ rootProject.the< NodeJsEnvSpec >(). apply {
202203 download = true
203204 nodeJsEnabled = " true"
204205 // version = libs.versions.nodejs.version.get()
205- // nodeDownloadBaseUrl = "https://nodejs.org/download/nightly"
206+ // downloadBaseUrl = "https://nodejs.org/download/nightly"
206207 }
207208
208- rootProject.extensions.configure <NpmExtension > {
209+ rootProject.the <NpmExtension >(). apply {
209210 lockFileDirectory = project.rootDir.resolve(" gradle/kotlin-js-store" )
210211 packageLockMismatchReport = LockFileMismatchReport .WARNING
211212 packageLockAutoReplace = false
You can’t perform that action at this time.
0 commit comments