Throughout this book, we have used Apache Maven as our build tool, but there are other popular build tools also used widely in the Java community. One such build tool is Gradle. Instead of XML, Gradle uses a Groovy-based Domain Specific Language (DSL) as the base for the build script, which provides more flexibility when defining complex build scripts. Compared to Maven, Gradle takes less time for incremental builds. So, Gradle builds are very fast and effective for large projects.
In this appendix, we will see how to install and use Gradle as the build tool in our project.
Perform the following steps to install Gradle:
GRADLE_HOME
. Enter the extracted Gradle ZIP directory path as the value for the GRADLE_HOME
environment variable.GRADLE_HOME
variable to PATH
by simply appending the text; %GRADLE_HOME%in
to the PATH
variable.Now that you have installed Gradle on your Windows-based computer, to verify whether the installation was completed correctly, go to the command prompt, type gradle -v
, and press Enter. The output shows the Gradle version and also the local environment configuration.