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

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

Add %GRADLE_HOME%/bin to PATH
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
1 |
gradle -v |
The output should be:
1 2 3 4 5 6 7 8 9 10 11 |
------------------------------------------------------------ Gradle 3.0 ------------------------------------------------------------ Build time: 2016-08-15 13:15:01 UTC Revision: ad76ba00f59ecb287bd3c037bd25fc3df13ca558 Groovy: 2.4.7 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_65 (Oracle Corporation 25.65-b01) OS: Windows 10 10.0 amd64 |
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:
Install Gradle on Ubuntu 16.04 LTS (Xenial Xerus)
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