Skip to content

Commit 5e49982

Browse files
author
Oleksandr Dzhychko
authored
Merge pull request #248 from modelix/chore/unify-node-plugin-configuration
build: unify node plugin configuration
2 parents a4d9b17 + 9b70e8f commit 5e49982

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import com.github.gradle.node.NodeExtension
2+
import com.github.gradle.node.NodePlugin
13
import kotlinx.html.FlowContent
24
import kotlinx.html.a
35
import kotlinx.html.body
@@ -38,6 +40,7 @@ plugins {
3840
alias(libs.plugins.spotless) apply false
3941
alias(libs.plugins.tasktree)
4042
alias(libs.plugins.dokka)
43+
alias(libs.plugins.node) apply false
4144
}
4245

4346
group = "org.modelix"
@@ -100,6 +103,13 @@ subprojects {
100103
}
101104
}
102105
}
106+
107+
plugins.withType<NodePlugin> {
108+
project.extensions.configure<NodeExtension> {
109+
version.set(libs.versions.node)
110+
download.set(true)
111+
}
112+
}
103113
}
104114

105115
allprojects {

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spotless = { id = "com.diffplug.spotless", version = "6.21.0" }
1616
tasktree = { id = "com.dorongold.task-tree", version = "2.1.1" }
1717
modelix-mps-buildtools = { id = "org.modelix.mps.build-tools", version = "1.1.0" }
1818
dokka = {id = "org.jetbrains.dokka", version = "1.9.0"}
19+
node = {id = "com.github.node-gradle.node", version = "7.0.0"}
1920

2021
[versions]
2122
kotlin = "1.9.10"
@@ -25,6 +26,7 @@ kotlinHtml="0.8.0"
2526
kotlinSerialization="1.6.0"
2627
ignite="2.15.0"
2728
apacheCxf="3.6.2"
29+
node="18.17.1"
2830

2931
[libraries]
3032

model-api-gen-gradle-test/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ repositories {
2323

2424
plugins {
2525
alias(libs.plugins.kotlin.jvm)
26-
id("base")
26+
base
2727
id("org.modelix.model-api-gen")
28-
id("com.github.node-gradle.node") version "3.4.0"
28+
alias(libs.plugins.node)
2929
}
3030

3131
val mps by configurations.creating

ts-model-api/build.gradle.kts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@ import com.github.gradle.node.npm.task.NpmTask
22

33
plugins {
44
base
5-
id("com.github.node-gradle.node") version "7.0.0"
5+
alias(libs.plugins.node)
66
id("org.jlleitschuh.gradle.ktlint") apply false
77
}
88

9-
node {
10-
version.set("18.12.1")
11-
npmVersion.set("8.19.2")
12-
download.set(true)
13-
}
14-
159
tasks.named("npm_run_build") {
1610
inputs.dir("src")
1711
inputs.file("package.json")

0 commit comments

Comments
 (0)