Gradle build tool
Gradle
Gradle is a dependency management, and a build automation tool. It is based on Groovy which provides a DSL for writing build script. Plugins are used to provide compilation and other extended features. Gradle build steps are called tasks.
The Latest version is 6.4. From 6.3 on, java 14 is also supported.
Wrapper
The recommended way to execute any Gradle build is with the help of the Gradle Wrapper (in short just “Wrapper”). The Wrapper is a script that invokes a declared version of Gradle, downloading it beforehand if necessary.
Gradle wrapper standardizes project with a given Gradle version, which leads to more reliable and robust builds.
To make the Wrapper files available to other developers and execution environments you’ll need to check them into version control. All Wrapper files including the JAR file are very small in size. Adding the JAR file to version control is expected.
.
├── build.gradle
├── settings.gradle
├── gradle
│ └── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
└── gradlew.bat
Upgrading
You can specify with the extension what version of Gradle wrapper you want to
wrapper {
version=7.4
distributionType=ALL
}
In this case you need to run gradle wrapper task without version and distribution parameters like:
gradle wrapper
Or pass all the parameters to wrapper task in the command line:
gradle wrapper --gradle-version 7.4.2 --distribution-type all
Now you can execute Gradle wrapper task and the wrapper with specified properties will be downloaded and set up for this project.