Gradle Installation: How To Install Gradle in 4 Simple Steps?

Every Java enthusiast has to start somewhere, and if you are new to Gradle, this is where you begin. In order to use Gradle effectively, every person has to know what it is and understand its basic concepts. So, before getting started with the process to install Gradle, we suggest you read this article on the What is Gradle? 

So, in this article, we shall see how to install Gradle on to our local system to move forward and work on the same.

Learn the Ins & Outs of Software Development

Caltech Coding BootcampExplore Program
Learn the Ins & Outs of Software Development

What is Gradle?

Gradle is a build automation tool known for its ability to create software. It is known to build automation on many programming languages like Scala, Java, Android, C/C++, and Groovy. The tool supports groovy based Domain Specific Language over XML.

No matter how big or small an organization is, Gradle helps in building, automating, and delivering software at a better quality and at a faster pace. It includes the pros and curbs the cons of ANT and Maven.

Let's go on to see the way to install Gradle on to our local system in four simple steps.

How to Download and Install Gradle?

There are four crucial steps to install Gradle:

1. Check if Java is installed in your local system.

  • To check if Java is installed in your system:
    • Go to your command prompt.
    • Type Java -version.

java version

If Java is installed, you can go forward with the Gradle Installation; else, you can select this link for JDK (Java Development Kit) installation.

You can also refer to this Java installation video.

The next step after the JDK installation is to download the Gradle tool.

2. Download Gradle

  • To download the latest version, type Download Gradle on your browser and open the first link. Or you can go to the following link [https://gradle.org/install/]
  • Next, download the latest version of Gradle distribution.
  • Now, click on “Download” on the website.

The distribution ZIP comes in two files:

  1. Binary-only (bin)
  2. Complete (all) with docs and sources

We will take the “Binary-only (bin)” and browse for docs and sources online.

  • Select the latest version of Gradle and download “binary-only”.
  • Now, wait for the downloading to finish.

gradle installation

  • Now go to ‘downloads’ and extract the files. 

extraction of gradle

Learn From The Best Mentors in the Industry!

Automation Testing Masters ProgramExplore Program
Learn From The Best Mentors in the Industry!

3. Set Environment Variables

Setting up the environment refers to extracting the distribution file and copying the library files into the desired location.

  • Open the folder that appears on the screen.

gradle folder

  • Go inside the bin folder and copy the path.

gradle bin

  • Now, go to this PC or My Computer -> right click on the This PC icon ->  select the properties option ->  go for Advanced system settings -> click on Environment Variables
  • When the dialog box appears, do the following:
    • In the Variable name, put “Gradle_Home”.
    • In the Variable value, paste the bin address copied before (removing “bin” from the address).

environment variable

    • Click on “OK”.
  • Then click on Path in the list.
  • In the dialog box that appears, make a new entry. 
  • Paste the bin directory address copied above.

gradle variable

  • Click on OK.

Now, after the complete extraction is done, you can go forward to verify if the Gradle installation is finished or not.

Here's How to Land a Top Software Developer Job

Full Stack Developer - MERN StackExplore Program
Here's How to Land a Top Software Developer Job

4. Verify Gradle Installation 

  • Now open the command prompt.
  • In the command prompt, enter Gradle -version.
  • It will display the current version of Gradle just installed on the screen.

gradle version

Congratulations, we have successfully installed Gradle on our system.

Conclusion

By now, you would have a brief introduction to the DevOps build tool Gradle. In this article, we learned how to install Gradle on to our local system in four simple steps.

If you have any questions on the topic, do place them below in the comment section of this "How to Install Gradle in 4 Simple Steps?" article. We'll get our SMEs to answer them for you as soon as possible!

About the Author

Ishan GabaIshan Gaba

Ishan Gaba is a Research Analyst at Simplilearn. He is proficient in Java Programming, Data Structures, and Project Management. Graduated in Information Technology, Ishan is also passionate about writing and traveling.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.