CHAPTER 2
Gradle requires a Java JDK or JRE version 7 or higher to be installed first. There is no need to install Groovy because Gradle ships with its own Groovy library; any existing installation of Groovy is ignored by Gradle.
Java JDK can be downloaded here.
To check the Java version, open a Command window and issue the java -version command.

Any Gradle distribution can be downloaded here. Every distribution comes packaged as a .zip file. A full distribution contains:
To install Gradle on Windows, follow these steps:





Note: The screenshots shown here are taken from Windows 10, so they might look different than your screen, depending on your Windows version.
After the installation process, you need to check whether Gradle is properly installed. Gradle runs via the gradle command, so open a command prompt window and type the following:
Code Listing 1
gradle -v |
The output for this command shows the Gradle version and the local environment configuration (Groovy, JVM version, OS version, etc.). The displayed Gradle version should match the distribution downloaded by the user. For the purposes of this book, the Gradle version is 2.12.

Java JDK or JRE version 7 or higher must be installed prior to Gradle installation. It’s not necessary to install Groovy, because Gradle ships with its own Groovy library.
Gradle can be downloaded from here as a .zip file. This file contains all necessary files to install Gradle in the computer, including Gradle binary files, reference documents, and samples.
To install Gradle, the user needs to decompress the distribution .zip file into a folder. It is suggested to name this folder to something similar to C:\ gradle-2.12. After that, an Environment Variable named GRADLE_HOME must be added, and its value set to the name of the installation folder (C:\ gradle-2.12). Also, the Path Environment Variable must be edited to add the name of the GRADLE_HOME variable to its value, in the format: ;%GRADLE_HOME%.
To test the installation process, the user needs to execute the command gradle -v from a command prompt window. The output for this command shows the Gradle version and the local environment configuration. The displayed Gradle version should match the distribution downloaded by the user. By the time you read this e-book, the current version of Gradle will be different, so you can use either the 2.12 version or a newer version.