gradlegradlewgradle-wrapper

How to determine the version of the Gradle Wrapper?


Gradle Wrapper is typically a small JAR checked into source control, which just downloads the specified version of Gradle and passes commands through to it. Therefore even if you upgrade your Gradle version (either globally on your machine, or locally within your project via gradle-wrapper.properties) you are going to have the same Gradle Wrapper version (i.e. the JAR itself is unchanged). Even so, Gradle Wrapper itself is sometimes updated - in April 2022 for example.

Running gradlew -version is going to tell you the version of Gradle within the project, not the Gradle Wrapper version. So how do you determine the Gradle Wrapper version?


Solution

  • The Gradle Wrapper (the jar) does not have any baked-in version information. The closest you can get, is comparing SHA checksum of the jar against the official list of checksums. It will give you several versions that has same wrapper.