diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-workspace.gradle.kts | 10 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-worktree.gradle.kts | 20 | ||||
-rw-r--r-- | buildSrc/src/main/kotlin/tools/refinery/gradle/internal/frontend-conventions.gradle.kts | 11 | ||||
-rw-r--r-- | gradle.properties | 1 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 4 |
6 files changed, 11 insertions, 36 deletions
@@ -5,6 +5,7 @@ | |||
5 | *._trace | 5 | *._trace |
6 | .classpath | 6 | .classpath |
7 | .idea/ | 7 | .idea/ |
8 | .frontend-gradle-plugin/ | ||
8 | .gradle/ | 9 | .gradle/ |
9 | .launch | 10 | .launch |
10 | .log/ | 11 | .log/ |
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-workspace.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-workspace.gradle.kts index f1f6d952..e2bd9aec 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-workspace.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-workspace.gradle.kts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -16,13 +16,13 @@ tasks { | |||
16 | enabled = false | 16 | enabled = false |
17 | } | 17 | } |
18 | 18 | ||
19 | installYarnGlobally { | 19 | resolvePackageManager { |
20 | dependsOn(rootProject.tasks.named("installYarnGlobally")) | 20 | dependsOn(rootProject.tasks.named("resolvePackageManager")) |
21 | enabled = false | 21 | enabled = false |
22 | } | 22 | } |
23 | 23 | ||
24 | installYarn { | 24 | installPackageManager { |
25 | dependsOn(rootProject.tasks.named("installYarn")) | 25 | dependsOn(rootProject.tasks.named("installPackageManager")) |
26 | enabled = false | 26 | enabled = false |
27 | } | 27 | } |
28 | 28 | ||
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-worktree.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-worktree.gradle.kts index 609e6f24..30cfb26f 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-worktree.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/frontend-worktree.gradle.kts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -14,11 +14,7 @@ plugins { | |||
14 | id("tools.refinery.gradle.internal.frontend-conventions") | 14 | id("tools.refinery.gradle.internal.frontend-conventions") |
15 | } | 15 | } |
16 | 16 | ||
17 | val yarn1Version = providers.gradleProperty("frontend.yarn1Version") | ||
18 | |||
19 | frontend { | 17 | frontend { |
20 | yarnGlobalInstallScript.set(yarn1Version.map { version -> "install -g yarn@$version" }) | ||
21 | yarnInstallScript.set(frontend.yarnVersion.map { version -> "set version $version --only-if-needed" }) | ||
22 | installScript.set(provider { | 18 | installScript.set(provider { |
23 | if (project.hasProperty("ci")) "install --immutable --inline-builds" else "install" | 19 | if (project.hasProperty("ci")) "install --immutable --inline-builds" else "install" |
24 | }) | 20 | }) |
@@ -61,20 +57,6 @@ tasks { | |||
61 | } | 57 | } |
62 | } | 58 | } |
63 | 59 | ||
64 | installYarnGlobally { | ||
65 | onlyIf { | ||
66 | getFrontendProperty("installedYarn1Version") != yarn1Version.get() | ||
67 | } | ||
68 | doLast { | ||
69 | putFrontedProperty("installedYarn1Version", yarn1Version.get()) | ||
70 | } | ||
71 | outputs.dir(frontend.nodeInstallDirectory.map { dir -> "$dir/lib/node_modules/yarn" }) | ||
72 | } | ||
73 | |||
74 | installYarn { | ||
75 | outputs.file(frontend.yarnVersion.map { version -> ".yarn/releases/yarn-$version.cjs" }) | ||
76 | } | ||
77 | |||
78 | installFrontend { | 60 | installFrontend { |
79 | inputs.files("package.json", "yarn.lock") | 61 | inputs.files("package.json", "yarn.lock") |
80 | outputs.files(".pnp.cjs", ".pnp.loader.mjs") | 62 | outputs.files(".pnp.cjs", ".pnp.loader.mjs") |
diff --git a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/frontend-conventions.gradle.kts b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/frontend-conventions.gradle.kts index bd5d0197..65481bd1 100644 --- a/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/frontend-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/tools/refinery/gradle/internal/frontend-conventions.gradle.kts | |||
@@ -1,22 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
6 | package tools.refinery.gradle.internal | 6 | package tools.refinery.gradle.internal |
7 | 7 | ||
8 | plugins { | 8 | plugins { |
9 | id("org.siouan.frontend-jdk11") | 9 | id("org.siouan.frontend-jdk17") |
10 | } | 10 | } |
11 | 11 | ||
12 | frontend { | 12 | frontend { |
13 | nodeVersion.set(providers.gradleProperty("frontend.nodeVersion")) | 13 | nodeVersion.set(providers.gradleProperty("frontend.nodeVersion")) |
14 | nodeInstallDirectory.set(file("$rootDir/.node")) | 14 | nodeInstallDirectory.set(file("$rootDir/.node")) |
15 | yarnEnabled.set(true) | ||
16 | yarnVersion.set(providers.gradleProperty("frontend.yarnVersion")) | ||
17 | } | ||
18 | |||
19 | tasks.enableYarnBerry { | ||
20 | // There is no need to enable berry manually, because berry files are already committed to the repo. | ||
21 | enabled = false | ||
22 | } | 15 | } |
diff --git a/gradle.properties b/gradle.properties index d9fcc8c5..35134b03 100644 --- a/gradle.properties +++ b/gradle.properties | |||
@@ -5,7 +5,6 @@ | |||
5 | file.encoding=UTF-8 | 5 | file.encoding=UTF-8 |
6 | frontend.nodeVersion=20.12.1 | 6 | frontend.nodeVersion=20.12.1 |
7 | frontend.yarnVersion=4.1.1 | 7 | frontend.yarnVersion=4.1.1 |
8 | frontend.yarn1Version=1.22.22 | ||
9 | group=tools.refinery | 8 | group=tools.refinery |
10 | # Set to true once tools.refinery.gradle.frontend-worktree supports the cache. | 9 | # Set to true once tools.refinery.gradle.frontend-worktree supports the cache. |
11 | org.gradle.configuration-cache=false | 10 | org.gradle.configuration-cache=false |
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e1d3b404..98df7f01 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml | |||
@@ -1,4 +1,4 @@ | |||
1 | # SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 1 | # SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
2 | # | 2 | # |
3 | # SPDX-License-Identifier: EPL-2.0 | 3 | # SPDX-License-Identifier: EPL-2.0 |
4 | 4 | ||
@@ -18,7 +18,7 @@ eclipseCollections-api = { group = "org.eclipse.collections", name = "eclipse-co | |||
18 | ecore = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore", version = "2.36.0" } | 18 | ecore = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore", version = "2.36.0" } |
19 | ecore-xmi = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore.xmi", version = "2.37.0" } | 19 | ecore-xmi = { group = "org.eclipse.emf", name = "org.eclipse.emf.ecore.xmi", version = "2.37.0" } |
20 | ecore-codegen = { group = "org.eclipse.emf", name = "org.eclipse.emf.codegen.ecore", version = "2.37.0" } | 20 | ecore-codegen = { group = "org.eclipse.emf", name = "org.eclipse.emf.codegen.ecore", version = "2.37.0" } |
21 | gradlePlugin-frontend = { group = "org.siouan", name = "frontend-gradle-plugin-jdk11", version = "6.0.0" } | 21 | gradlePlugin-frontend = { group = "org.siouan", name = "frontend-jdk17", version = "8.0.0" } |
22 | gradlePlugin-shadow = { group = "com.github.johnrengelman", name = "shadow", version = "8.1.1" } | 22 | gradlePlugin-shadow = { group = "com.github.johnrengelman", name = "shadow", version = "8.1.1" } |
23 | gradlePlugin-sonarqube = { group = "org.sonarsource.scanner.gradle", name = "sonarqube-gradle-plugin", version = "5.0.0.4638" } | 23 | gradlePlugin-sonarqube = { group = "org.sonarsource.scanner.gradle", name = "sonarqube-gradle-plugin", version = "5.0.0.4638" } |
24 | gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" } | 24 | gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" } |