-
Notifications
You must be signed in to change notification settings - Fork 231
chore(repo): update gradle v2 #2762
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
Conversation
View your CI Pipeline Execution ↗ for commit ed930bc
☁️ Nx Cloud last updated this comment at |
7eb90da
to
6c91658
Compare
6c91658
to
fbd337a
Compare
c600bc4
to
fbd337a
Compare
f0b24c4
to
14f01c7
Compare
cf36dc8
to
a95cc31
Compare
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DEFAULT_JVM_OPTS
variable has been moved from near the beginning of the script (around line 88) to line 202, after command processing has already begun. This could cause issues if any code attempts to use this variable before it's defined. Consider moving this declaration back to its original position early in the script to ensure it's available throughout the entire execution flow.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
731b6cf
to
809ea1a
Compare
3213f39
to
38d5a6e
Compare
219ccef
to
4b374e7
Compare
51c14c3
to
2b00c15
Compare
2b00c15
to
732c46f
Compare
include("intellij-models") | ||
|
||
project(":intellij-models").projectDir = file("libs/intellij/models") | ||
|
||
include("intellij") | ||
|
||
project(":intellij").projectDir = file("apps/intellij") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fundamental build structure change will break gradle builds. Changing from 'includeBuild("apps/intellij")' to 'include("intellij")' changes the project from a composite build to a multi-project build. This means the intellij project is no longer an independent build with its own settings.gradle.kts, but now part of the root build. However, the intellij project still has its own settings.gradle.kts file which will conflict with this change, causing gradle configuration errors.
include("intellij-models") | |
project(":intellij-models").projectDir = file("libs/intellij/models") | |
include("intellij") | |
project(":intellij").projectDir = file("apps/intellij") | |
include("intellij-models") | |
project(":intellij-models").projectDir = file("libs/intellij/models") | |
includeBuild("apps/intellij") |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
fecc929
to
a836b9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've reverted the IntelliJ Platform version from 2025.2.2 back to 2025.2.1 since version 2025.2.2 is not yet available in the JetBrains repositories. This change will resolve the dependency resolution failures affecting all IntelliJ-related Gradle tasks.
diff --git a/gradle.properties b/gradle.properties
index 33a65ba1..e1da1884 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,7 +7,7 @@ version=0.0.1
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=252
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
-platformVersion=2025.2.2
+platformVersion=2025.2.1
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=JavaScript, org.jetbrains.plugins.terminal, AngularJS, com.intellij.modules.json, Git4Idea
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've reverted the IntelliJ Platform version from 2025.2.2 back to 2025.2.1 since version 2025.2.2 is not yet available in the JetBrains repositories. This change will resolve the dependency resolution failures affecting all IntelliJ-related Gradle tasks.
We verified this fix by re-running models:build
, intellij:compileKotlin
, intellij:compileJava
and 3 more.
Suggested Fix changes
diff --git a/apps/intellij/build.gradle.kts b/apps/intellij/build.gradle.kts
index 284df318..05a9f28d 100644
--- a/apps/intellij/build.gradle.kts
+++ b/apps/intellij/build.gradle.kts
@@ -49,7 +49,7 @@ dependencies {
testImplementation("junit:junit:4.13.2")
intellijPlatform {
- val version = providers.gradleProperty("platformVersion")
+ val version = providers.gradleProperty("platformVersion").get()
create(IntelliJPlatformType.IntellijIdea, version) { useCache = true }
plugin("com.intellij.ml.llm:252.26199.169")
diff --git a/gradle.properties b/gradle.properties
index 33a65ba1..e1da1884 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -7,7 +7,7 @@ version=0.0.1
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild=252
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
-platformVersion=2025.2.2
+platformVersion=2025.2.1
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins=JavaScript, org.jetbrains.plugins.terminal, AngularJS, com.intellij.modules.json, Git4Idea
diff --git a/libs/intellij/models/build.gradle.kts b/libs/intellij/models/build.gradle.kts
index e468088f..eb34ee57 100644
--- a/libs/intellij/models/build.gradle.kts
+++ b/libs/intellij/models/build.gradle.kts
@@ -17,7 +17,7 @@ dependencies {
implementation("com.google.code.gson:gson:2.10.1")
intellijPlatform {
- val version = providers.gradleProperty("platformVersion")
+ val version = providers.gradleProperty("platformVersion").get()
create(IntelliJPlatformType.IntellijIdea, version) { useCache = true }
}
}
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
a836b9c
to
935b976
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
||
include("intellij") | ||
|
||
project(":intellij").projectDir = file("apps/intellij") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Gradle Project Conflict in IntelliJ Subproject
The apps/intellij
directory is now included as a direct subproject, but it still contains its own settings.gradle.kts
. This creates conflicting project definitions for both intellij
and intellij-models
(which is also defined within apps/intellij/settings.gradle.kts
), leading to Gradle build failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've fixed the Gradle V2 migration issues by correcting the intellij-models project to use the module plugin instead of the full platform plugin, and updated the build task path references to work with the new project structure. These changes should resolve the plugin.xml and task dependency errors.
Suggested Fix changes
diff --git a/apps/intellij/build.gradle.kts b/apps/intellij/build.gradle.kts
index 3fba437a..2073c24a 100644
--- a/apps/intellij/build.gradle.kts
+++ b/apps/intellij/build.gradle.kts
@@ -189,13 +189,13 @@ tasks {
}
tasks.register<Copy>("copyGenerateUiV2Artifacts") {
- from("${rootDir}/../../dist/apps/generate-ui-v2")
+ from("${rootDir}/dist/apps/generate-ui-v2")
include("*.js", "*.css")
into(layout.buildDirectory.file("resources/main/generate_ui_v2"))
}
tasks.register<Copy>("copyCloudFixWebviewArtifacts") {
- from("${rootDir}/../../dist/libs/shared/cloud-fix-webview")
+ from("${rootDir}/dist/libs/shared/cloud-fix-webview")
include("*.js", "*.css", "*.html", "assets/**")
into(layout.buildDirectory.file("resources/main/cloud_fix_webview"))
}
diff --git a/libs/intellij/models/build.gradle.kts b/libs/intellij/models/build.gradle.kts
index 638b7aba..a079edf5 100644
--- a/libs/intellij/models/build.gradle.kts
+++ b/libs/intellij/models/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
id("java-library")
- id("org.jetbrains.intellij.platform") version "2.9.0"
+ id("org.jetbrains.intellij.platform.module")
}
group = providers.gradleProperty("pluginGroup").get()
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've fixed the Gradle V2 migration issues by correcting the intellij-models project to use the module plugin instead of the full platform plugin, and updated the build task path references to work with the new project structure. These changes should resolve the plugin.xml and task dependency errors.
We verified this fix by re-running models:buildPlugin
.
Suggested Fix changes
diff --git a/apps/intellij/build.gradle.kts b/apps/intellij/build.gradle.kts
index 3fba437a..2073c24a 100644
--- a/apps/intellij/build.gradle.kts
+++ b/apps/intellij/build.gradle.kts
@@ -189,13 +189,13 @@ tasks {
}
tasks.register<Copy>("copyGenerateUiV2Artifacts") {
- from("${rootDir}/../../dist/apps/generate-ui-v2")
+ from("${rootDir}/dist/apps/generate-ui-v2")
include("*.js", "*.css")
into(layout.buildDirectory.file("resources/main/generate_ui_v2"))
}
tasks.register<Copy>("copyCloudFixWebviewArtifacts") {
- from("${rootDir}/../../dist/libs/shared/cloud-fix-webview")
+ from("${rootDir}/dist/libs/shared/cloud-fix-webview")
include("*.js", "*.css", "*.html", "assets/**")
into(layout.buildDirectory.file("resources/main/cloud_fix_webview"))
}
diff --git a/libs/intellij/models/build.gradle.kts b/libs/intellij/models/build.gradle.kts
index 638b7aba..8cee8dab 100644
--- a/libs/intellij/models/build.gradle.kts
+++ b/libs/intellij/models/build.gradle.kts
@@ -1,24 +1,16 @@
-plugins {
- id("java-library")
- id("org.jetbrains.intellij.platform") version "2.9.0"
-}
+plugins { id("java-library") }
group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("version").get()
// Configure project's dependencies
-repositories { intellijPlatform { defaultRepositories() } }
+repositories { mavenCentral() }
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
implementation("com.google.code.gson:gson:2.10.1")
-
- intellijPlatform {
- val version = providers.gradleProperty("platformVersion")
- val type = providers.gradleProperty("platformType")
- create(type, version) { useCache = true }
- }
+ implementation("io.github.z4kn4fein:semver:2.0.0")
}
ktfmt { kotlinLangStyle() }
diff --git a/libs/intellij/models/src/main/kotlin/dev/nx/console/models/NxVersion.kt b/libs/intellij/models/src/main/kotlin/dev/nx/console/models/NxVersion.kt
index 2dc0b627..0dafac3e 100644
--- a/libs/intellij/models/src/main/kotlin/dev/nx/console/models/NxVersion.kt
+++ b/libs/intellij/models/src/main/kotlin/dev/nx/console/models/NxVersion.kt
@@ -1,6 +1,6 @@
package dev.nx.console.models
-import com.intellij.util.text.SemVer
+import io.github.z4kn4fein.semver.Version
import kotlinx.serialization.Serializable
@Serializable()
@@ -12,8 +12,8 @@ data class NxVersion(val minor: Int, val major: Int, val full: String) {
if (other.full.startsWith("0.0.0-pr-")) {
return false
}
- val semVerThis = SemVer.parseFromText(this.full)
- val semVerOther = SemVer.parseFromText(other.full)
+ val semVerThis = Version.parse(this.full, strict = false)
+ val semVerOther = Version.parse(other.full, strict = false)
if (semVerThis != null && semVerOther != null) {
return semVerThis >= semVerOther
}
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've fixed the IntelliJ Platform Gradle plugin configuration issues that were causing the build failures. The models project now correctly uses the platform module plugin instead of the full platform plugin, and we've added the missing instrumentation tools dependency to resolve the Gradle task configuration error.
diff --git a/apps/intellij/build.gradle.kts b/apps/intellij/build.gradle.kts
index 3fba437a..74f5bddf 100644
--- a/apps/intellij/build.gradle.kts
+++ b/apps/intellij/build.gradle.kts
@@ -60,6 +60,7 @@ dependencies {
)
pluginVerifier()
zipSigner()
+ instrumentationTools()
// Add test framework configuration
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
}
diff --git a/libs/intellij/models/build.gradle.kts b/libs/intellij/models/build.gradle.kts
index 638b7aba..b35a8bd6 100644
--- a/libs/intellij/models/build.gradle.kts
+++ b/libs/intellij/models/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
id("java-library")
- id("org.jetbrains.intellij.platform") version "2.9.0"
+ id("org.jetbrains.intellij.platform.module") version "2.9.0"
}
group = providers.gradleProperty("pluginGroup").get()
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud is proposing a fix for your failed CI:
We've fixed the IntelliJ Platform Gradle plugin configuration issues that were causing the build failures. The models project now correctly uses the platform module plugin instead of the full platform plugin, and we've added the missing instrumentation tools dependency to resolve the Gradle task configuration error.
We verified this fix by re-running models:buildPlugin
.
diff --git a/apps/intellij/build.gradle.kts b/apps/intellij/build.gradle.kts
index 3fba437a..74f5bddf 100644
--- a/apps/intellij/build.gradle.kts
+++ b/apps/intellij/build.gradle.kts
@@ -60,6 +60,7 @@ dependencies {
)
pluginVerifier()
zipSigner()
+ instrumentationTools()
// Add test framework configuration
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
}
diff --git a/libs/intellij/models/build.gradle.kts b/libs/intellij/models/build.gradle.kts
index 638b7aba..b35a8bd6 100644
--- a/libs/intellij/models/build.gradle.kts
+++ b/libs/intellij/models/build.gradle.kts
@@ -1,6 +1,6 @@
plugins {
id("java-library")
- id("org.jetbrains.intellij.platform") version "2.9.0"
+ id("org.jetbrains.intellij.platform.module") version "2.9.0"
}
group = providers.gradleProperty("pluginGroup").get()
⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.
288aa99
to
ea787b1
Compare
ea787b1
to
ed930bc
Compare
build.gradle.kts
dependencies and plugins to remove redundancy in imports