Skip to content

fix(gradle): add migration script to check gradle plugin version#31304

Merged
jaysoo merged 1 commit intomasterfrom
fix/gradle-plugin-version
May 26, 2025
Merged

fix(gradle): add migration script to check gradle plugin version#31304
jaysoo merged 1 commit intomasterfrom
fix/gradle-plugin-version

Conversation

@xiongemi
Copy link
Copy Markdown
Contributor

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 #

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview May 26, 2025 6:02am

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 22, 2025

View your CI Pipeline Execution ↗ for commit 1868ec9.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 17m 33s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 15s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 2s View ↗
nx documentation ✅ Succeeded 2m 42s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-26 06:15:33 UTC

@xiongemi xiongemi force-pushed the fix/gradle-plugin-version branch 2 times, most recently from ba34da2 to 5248a5d Compare May 22, 2025 02:56
@FrozenPandaz FrozenPandaz requested a review from Copilot May 22, 2025 21:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-0 migration to update plugin version to 0.1.0 in build files.
  • Refactors initGenerator to remove inline build file logic and delegate to addNxProjectGraphPlugin.
  • Adds gradle-project-graph-plugin-utils.ts with 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

Comment thread packages/gradle/src/migrations/21-0-0/change-plugin-version-0-1-0.ts Outdated
@jaysoo jaysoo merged commit 4a94841 into master May 26, 2025
7 checks passed
@jaysoo jaysoo deleted the fix/gradle-plugin-version branch May 26, 2025 17:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2025

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants