How to install Gradle on Windows 10

Tech Discover > All Articles  > How to install Gradle on Windows 10

How to install Gradle on Windows 10

In this post, I’ll show how to install Gradle on Windows 10. Therefore a short introduction about Gradle is very welcome I think. Gradle is an open-source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.

 

1. Prerequisites to install Gradle

 

Gradle runs on all major operating systems and requires only a Java JDK or JRE version 8 or higher to be installed. To check, run java -version on a command prompt. If you don’t have the JDK installed please check this post How to install Java JDK.

 

2. Download Gradle

 

You can download Gradle from here  choose  -> Download: binary-only

 

3. Set Up Environment to install Gradle

 

Setting up GRADLE_HOME and PATH environmental variables.

Create a new directory C:\Gradle with File Explorer.

Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded.

Double-click the ZIP archive to expose the content. Drag the content folder gradle-5.4.1 to your newly created C:\Gradle folder.

Alternatively you can unpack the Gradle distribution ZIP into C:\Gradle using an archiver tool of your choice.

  1. Press Windows key + Q -> in the search bar type env.
  2. Click Environment Variables. In the section System Variables
  3. Press New, add to Variable name -> GRADLE_HOME and to Variable value -> C:\Gradle\gradle-5.4.1

 

set the path for gradle install GRADLE_HOME

PATH variable

 

  1. Then find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New and create it yourself.
  2. Press New and add %GRADLE_HOME%\bin then press OK.

 

4. Verify your installation

 

Open a console (or a Windows command prompt) and run gradle -v to run gradle and display the version, e.g.:

 

show gradle version on command prompt

 

Conclusion

In this article we installed Gradle, a build automation system that is very helpful in developing any kind of java projects.

For Linux & Mac you can check this post on How to install Gradle on Linux.

If you have any question don’t esitate to post it on the comment section bellow.

If this post was helpful in any way, a share or a like would be very much appreaciated.

Thanks and happy coding.

No Comments

Post a Comment