fix(gradle): add migration script to check gradle plugin version#31304
Merged
fix(gradle): add migration script to check gradle plugin version#31304
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
|
View your CI Pipeline Execution ↗ for commit 1868ec9.
☁️ Nx Cloud last updated this comment at |
ba34da2 to
5248a5d
Compare
FrozenPandaz
approved these changes
May 22, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a migration to bump the Gradle Project Graph plugin version and refactors the init generator to use a shared utility for adding or updating that plugin.
- Introduces
change-plugin-version-0-1-0migration to update plugin version to 0.1.0 in build files. - Refactors
initGeneratorto remove inline build file logic and delegate toaddNxProjectGraphPlugin. - Adds
gradle-project-graph-plugin-utils.tswith helpers to detect, insert, or update the plugin block consistently.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/gradle/src/migrations/21-0-0/change-plugin-version-0-1-0.ts | New migration script for updating plugin version to 0.1.0 |
| packages/gradle/src/migrations/21-0-0/change-plugin-version-0-1-0.spec.ts | Tests covering migration behavior |
| packages/gradle/src/migrations/21-0-0/change-plugin-version-0-1-0.md | Migration documentation and sample before/after |
| packages/gradle/src/generators/init/init.ts | Init generator refactor to use shared plugin utils |
| packages/gradle/src/generators/init/gradle-project-graph-plugin-utils.ts | New utility for adding or updating the Gradle plugin |
| packages/gradle/src/generators/init/gradle-project-graph-plugin-utils.spec.ts | Tests for the new plugin utility functions |
5248a5d to
1868ec9
Compare
jaysoo
approved these changes
May 26, 2025
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
currently, when migrate @nx/gradle to latest, we don't check the dev.nx.gradle.project-graph version in build file
Expected Behavior
we should check the project-praph in the build file and make sure it is correct version
Related Issue(s)
Fixes #