refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

RefreshVersions task recommends upgrades to Gradle pre-release versions

Open GeorgEchterling opened this issue 1 year ago • 1 comments

🐛 Describe the bug

Running ./gradlew refreshVersionsMigrate with an up-to-date version of Gradle results in this message:

The Gradle version used in this project is not up to date.
To update from version 8.0.2, run this command:
./gradlew wrapper --gradle-version 8.1-rc-1

Version 8.0.2 is up-to-date. I don't want to upgrade to pre-release versions. Since I always get this message, I cannot rely on the plugin to notify me about actual Gradle releases in the 8.0.x line.

⚠️ Current behavior

The plugin always recommends upgrading Gradle to the latest (pre-release) version.

✅ Expected behavior

The plugin should only recommend upgrades to Gradle versions that have the same or higher stability level.

  • It should not recommend upgrading from release versions to pre-release versions.
  • It may recommend upgrading from one pre-release to a newer pre-release or release version.

💣 Steps to reproduce

  • Create a project with the Gradle wrapper at version 8.0.2.
  • Add the refreshVersions plugin.
  • Run ./gradlew refreshVersionsMigrate

GeorgEchterling avatar Mar 27 '23 11:03 GeorgEchterling

The plugin does actually recommend the latest release as well as the latest RC:

The Gradle version used in this project is not up to date.
To update from version 7.6.1, run one of these commands:
./gradlew wrapper --gradle-version 8.1.1
./gradlew wrapper --gradle-version 8.2-rc-1

I think recommending both is fine. However, the recommendation message to upgrade from the latest release to the latest RC should be reworded. ("The Gradle version used in this project is not up to date.")

GeorgEchterling avatar Jun 05 '23 12:06 GeorgEchterling