-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support upgrading Gradle itself #7124
Comments
Thanks for the detailed description. Does native Gradle have a feature to update this line itself? Ie, if we leveraged more native Gradle tooling, would it make it easier to solve this as a byproduct? An alternative approach that'd make it easy to solve this is probably: |
There is also a command to upgrade which does the same thing:
I'm not sure if this is also available with the tooling API, but that may complicate things more compared to just editing a string in the properties file. |
I think that this would be a "new ecosystem" as we would be entering the business of upgrading a different type of files (wrapper files) |
See also: #2223 |
Sometimes newer versions of a Gradle wrapper also make changes to the following files (which are used for downloading the wrapper executable):
We could naively edit the value in If we could run (Also as a personal thing, I would love it if it would also ensure that |
That would indeed be great! Note that the proposed command is not complete. It's often desirable to use the new version's checksum as well, which means providing the For more info about the possibilities for this, please have a look at this GitHub Action:
Because of this, it's usually useful to run the
I agree with this too!
That should just be done the first time you generate the files. Or if the first person committing |
And since Gradle 8.1, it's possible to use a label, instead of a specific version, for example: ./gradlew wrapper --gradle-version latest |
IS there any update on this? |
Is there an existing issue for this?
Feature description
Gradle projects store which version of Gradle to use in the
/gradle/wrapper/gradle-wrapper.properties
file, and frequently forget to upgrade it.A gradle-wrapper.properties may have various entries in any order but only the
distributionUrl
entry is relevant to the versioning and looks something like this:To upgrade the gradle version, you only need to update the string in between
gradle-
and-bin
. For example to upgrade from Gradle 8.1 to 9.0.1 as above, the line needs to be changed to:It may end in either "-bin" or "-all" depending on which kind of distribution the user picked, but doesn't make a difference for upgrading the version.
The latest release of Gradle can be obtained programmatically from Gradle's GitHub releases.
The text was updated successfully, but these errors were encountered: