Install Gradle on Windows

Gradle is an open source build tool, builds upon the concepts of Apache Ant and Apache Maven, can be used to build Java, C/C++, Python, Android, etc. In this tutorial, we’ll show you how to install Gradle on Windows so that you can get started to explore more features of Gradle.

1. Prerequisites

Gradle requires Java 7 or higher version

2. Install Gradle on Windows

2.1. Download Gradle

You can download a distribution of Gradle from its website. There are 2 distributions: Completed distribution (including source code and offline docs) and Binary only distribution. In this tutorial, we will download the Binary only distribution of Gradle 3.0

After downloading, unzip the downloaded file to a proper location, for example: D:\Soft\gradle-3.0

2.2.  Define GRADLE_HOME Variable

2.2.1.In Windows 7, right click My Computer and select Properties > Advanced.
In Windows 8, Windows 10,  go to Control Panel > System > Advanced System Settings.

2.2.2. Under System Variables, click New

2.2.3. In the Variable Name field, enter GRADLE_HOME

2.2.4. In the Variable Value field, enter the Gradle directory, for example: D:\Soft\gradle-3.0

Install Gradle on Windows - Add GRADLE_HOME variable

Add GRADLE_HOME variable

2.3.  Append %GRADLE_HOME%/bin to the PATH

2.3.1. Select the Path variable and click Edit button.

2.3.2. For the Windows 7, 8 or some earlier version of Windows 10

In the Variable Value field, append ;%GRADLE_HOME%\bin to the end

For the latest version of Windows 10, click New, then add %GRADLE_HOME%\bin to the new line



2.3.3. Click OK to finish

3. Verification

Open the terminal and issue below command to check whether the Gradle was installed successfully or not

The output should be:

4. References

We have just finished to install Gradle on Windows. Below are other articles related to Gradle you may interested in, please refer to the following links:

Gradle Tutorials

Install Gradle on Ubuntu 16.04 LTS (Xenial Xerus)

Gradle Proxy Settings

Where is Gradle Cache Location

Specify The Build File in Gradle

Using Gradlew, The Gradle Wrapper

Set Java Source Compatibility and Target Compatibility in Gradle

Convert Maven POM File to Gradle Build File