Gradle Installation Process
Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, C/C++, and JavaScript.
I have used Gradle for more than 2+ years to build projects. Gradle is one of the most used building tools. It’s very essential for a developer.
Therefore, there is also a maven that you can use to build your project but I am very comfortable using Gradle in this case.
In this tutorial, I will be showing how to install Gradle both for Linux and Windows OS.
Download the latest Gradle distribution
The current Gradle release is version 7.2, released on 17 Aug 2021. The distribution zip file comes in two flavors:
- Binary-only
- Complete, with docs and sources
If in doubt, choose the binary-only version and browse docs and sources online.
For Linux
Download Gradle from here: https://gradle.org/next-steps/?version=6.8.1&format=all
Add the following path inside the .bashrc file
$ vim ~/.bashrc
$ export PATH=$PATH:/home/mobusshar/mobusshar.islam/dirsoftware/gradle-7.1/bin
$ source ~/.bash_profile [reloading env. variables]
If you want to edit the bashrc using a GUI
$ gedit .bashrc
$ export PATH=$PATH:/home/mobusshar/mobussharislam/dirsoftware/gradle-7.1/bin
$ source .bashrc [reloading env. variables]
For Windows
- Download the latest distribution: gradle.org/releases/
- Create a new directory C:\Gradle with File Explorer
- Extract the zip archive and drag the content folder to the newly created C:\Gradle folder
- In File Explorer right-click on the This PC (or Computer) icon, then click Properties -> Advanced System Settings -> Environment Variables
- Under System Variables select Path, then click Edit.
Add an entry for C:\Gradle\gradle-7.1.1\bin. Click OK to save.