Skip to content

Conversation

lourw
Copy link
Contributor

@lourw lourw commented Sep 11, 2025

  • use gradle V2 plugin within the console repo.
  • reorganize build.gradle.kts dependencies and plugins to remove redundancy in imports

@lourw lourw requested a review from MaxKless as a code owner September 11, 2025 16:22
@lourw lourw self-assigned this Sep 11, 2025
Copy link
Contributor

nx-cloud bot commented Sep 11, 2025

View your CI Pipeline Execution ↗ for commit ed930bc

Command Status Duration Result
nx affected --targets=lint,test,build,e2e-ci,ty... ✅ Succeeded 7m 58s View ↗
nx-cloud record -- yarn nx sync:check ✅ Succeeded 4s View ↗
nx-cloud record -- yarn nx run-many -t ktfmtFormat ✅ Succeeded 40s View ↗
nx run-many -t ktfmtFormat ✅ Succeeded 34s View ↗
nx-cloud record -- yarn nx format:check --verbose ✅ Succeeded 3m 59s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-23 20:04:18 UTC

@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 7eb90da to 6c91658 Compare September 11, 2025 16:29
@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 6c91658 to fbd337a Compare September 11, 2025 16:38
nx-cloud[bot]

This comment was marked as outdated.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch from c600bc4 to fbd337a Compare September 11, 2025 17:15
nx-cloud[bot]

This comment was marked as outdated.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch 2 times, most recently from f0b24c4 to 14f01c7 Compare September 11, 2025 18:52
nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch 2 times, most recently from cf36dc8 to a95cc31 Compare September 18, 2025 18:53
Comment on lines 202 to 203
# 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"'
Copy link
Contributor

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

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@nrwl nrwl deleted a comment from graphite-app bot Sep 18, 2025
nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 731b6cf to 809ea1a Compare September 19, 2025 08:37
@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 3213f39 to 38d5a6e Compare September 19, 2025 19:12
@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 219ccef to 4b374e7 Compare September 19, 2025 21:38
nx-cloud[bot]

This comment was marked as outdated.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch 2 times, most recently from 51c14c3 to 2b00c15 Compare September 20, 2025 06:46
@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 2b00c15 to 732c46f Compare September 20, 2025 06:57
Comment on lines +5 to +11
include("intellij-models")

project(":intellij-models").projectDir = file("libs/intellij/models")

include("intellij")

project(":intellij").projectDir = file("apps/intellij")
Copy link
Contributor

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.

Suggested change
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

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

nx-cloud[bot]

This comment was marked as outdated.

@MaxKless MaxKless force-pushed the lourw/update-gradle-v2 branch from fecc929 to a836b9c Compare September 23, 2025 11:53
cursor[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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 }
     }
 }

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

@MaxKless MaxKless force-pushed the lourw/update-gradle-v2 branch from a836b9c to 935b976 Compare September 23, 2025 14:47
Copy link
Collaborator

@MaxKless MaxKless left a 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")
Copy link

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.

Fix in Cursor Fix in Web

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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()

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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
         }

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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()

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

Copy link
Contributor

@nx-cloud nx-cloud bot left a 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()

Apply fix via Nx Cloud  Reject fix via Nx Cloud

Nx CloudApply fix locally ↗  Nx CloudView interactive diff ↗


⚙️ An Nx Cloud workspace admin can disable these reviews in workspace settings.

@lourw lourw force-pushed the lourw/update-gradle-v2 branch from 288aa99 to ea787b1 Compare September 23, 2025 19:38
@lourw lourw force-pushed the lourw/update-gradle-v2 branch from ea787b1 to ed930bc Compare September 23, 2025 19:47
@lourw lourw merged commit 8b5e76e into master Sep 23, 2025
7 checks passed
@lourw lourw deleted the lourw/update-gradle-v2 branch September 23, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants