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 {
193
193
}
194
194
}
195
195
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.
197
198
var nodeJsEnabled: String? by rootProject.extra
198
199
199
200
if (nodeJsEnabled.toBoolean().not ()) {
200
- rootProject.plugins.withType<NodeJsRootPlugin > {
201
- rootProject.extensions.configure< NodeJsRootExtension > {
201
+ rootProject.plugins.withType<NodeJsPlugin > {
202
+ rootProject.the< NodeJsEnvSpec >(). apply {
202
203
download = true
203
204
nodeJsEnabled = " true"
204
205
// version = libs.versions.nodejs.version.get()
205
- // nodeDownloadBaseUrl = "https://nodejs.org/download/nightly"
206
+ // downloadBaseUrl = "https://nodejs.org/download/nightly"
206
207
}
207
208
208
- rootProject.extensions.configure <NpmExtension > {
209
+ rootProject.the <NpmExtension >(). apply {
209
210
lockFileDirectory = project.rootDir.resolve(" gradle/kotlin-js-store" )
210
211
packageLockMismatchReport = LockFileMismatchReport .WARNING
211
212
packageLockAutoReplace = false
You can’t perform that action at this time.
0 commit comments