gradlew wrapper -gradle-version, all these files get changed automatically.įor even more details about how the Gradle wrapper works, check out the article What is the Gradle wrapper and why should you use it?. When you update your Gradle version using. The gradle-wrapper.jar file is used to do the actual download of the distribution. Gradle uses the distributionUrl property to download the new version of Gradle and stores it in your user home directory in ~/.gradle/wrapper/dists. That script accesses a gradle-wrapper.properties file located in gradle/wrapper which contains the version of Gradle you’re targeting: distributionBase=GRADLE_USER_HOMEĭistributionUrl=https\:///distributions/ gradlew it executes a script in your project root directory. If you’re curious as to how that worked, read on. ✅ How does the version update actually work? That’s it! You’re all upgraded onto the new Gradle version. Modified: gradle/wrapper/gradle-wrapper.properties Modified: gradle/wrapper/gradle-wrapper.jar " to discard changes in working directory) Your branch is up to date with 'origin/master'. If you’re using git then the list should look like this when you run git status: $ git status Revision: a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4Ĭommit all the changed files into version control.
You can double check this has worked by running. If you’re using Java just remember that what Java version you want to build your project with influences what Gradle version you should choose: Highest supported Java version You can go to the Gradle releases page to find the latest version. gradlew.bat -version What updated Gradle version can I use? gradlew in this article with gradlew.bat e.g. Working on Windows? Just replace any time you see. What’s my current Gradle version?Īssuming your project is using the Gradle wrapper, which it most likely is, run. If you want to update Gradle to a newer version though, follow the simple steps in this article.
Using the Gradle wrapper means that a project can be fixed to a specific version of Gradle.