Gradle
Install¶
Install Gradle using SDKMAN with the following command:
Wrapper¶
The gradle wrapper is an excellent tool to ensure that all developers use the same version of Gradle. It is a set of files that you can commit to your project, and it will download the correct version of Gradle when you run it.
To create a Gradle wrapper, use the following command:
This will create the following files:
gradlew # Unix shell script
gradlew.bat # Windows batch file
gradle/wrapper/gradle-wrapper.jar # Gradle wrapper JAR
gradle/wrapper/gradle-wrapper.properties # Gradle wrapper properties
Usage¶
Build¶
To build a project, run the following command:
To skip the tests, run the following command:
Test¶
To run tests in a project, run the following command:
Debug¶
To debug a Gradle build, run the following command:
Verify¶
To verify a project, run the following command:
Dependencies¶
To list the dependencies of a project, run the following command:
Tasks¶
To list the tasks of a project, run the following command:
Clean¶
To clean a project, run the following command:
Publish¶
To publish a project, run the following command:
Release¶
To release a project, run the following command:
Upgrade wrapper¶
To upgrade the Gradle wrapper, run the following command: