Gradle is an open source and advanced build automation tool known for its ability to create software. It is also known to build automation on many programming languages like Scala, Java, Android, C/C++, and Groovy. It builds up on ANT and Maven repositories and supports groovy based Domain Specific Language (DSL) over the 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 way.

Features of Gradle

  • High Performance
  • highly customizable
  • Build Anything
  • Automate Everything
  • Deliver Faster
  • support a wide variety of IDE’s

Gradle versions, Release Dates:

VersionReleased DateJava Compatibility
7.622 Nov 2022Java 8 to Java 19
6.9.314 Oct 2022Java 8 to Java 15
Gradle Latest version, released date and Java compatibility

Note: Java 20 and later versions are not yet supported.

Steps to install Gradle 7 on Linux system

Let’s go to see the simplest way to install Gradle 7 onto local Linux system like ubuntu or CentOS.

gradle 7.6 installation steps
Gradle 7.6 installation steps

Prerequisites:

  • sudo privileges.
  • Stable internet connection.
  • JDK

To run Gradle, a JVM is necessary, so the machine being used should contain the Java Development Kit (JDK). If JDK is not installed on your system please install JDK first from here: JDK installation steps

First verify installed version of Java from terminal:

# java -version

Then Install the wget and unzip if not there:

For RHEL, CentOS and Oracle Linux 7
# yum install wget unzip -y

For RHEL, CentOS and Oracle Linux 8 and 9
# dnf install wget unzip -y

For Ubuntu and Debian
# apt install wget unzip -y

Now  Download the latest distribution using terminal:

# cd /opt && wget https://downloads.gradle-dn.com/distributions/gradle-7.6-bin.zip

Now next step is unzip downloaded zip file and rename it:

# unzip gradle-7*.zip && rm -rf gradle-7*.zip && mv gradle-7* gradle

Then set installed version to default Gradle version:

# update-alternatives --install /usr/bin/gradle gradle /opt/gradle/bin/gradle 1

Verify installed version:

# gradle -v

Uninstall Gradle from Linux system

To completely remove Gradle from a system, you must remove applications, the configuration files, and any directories containing data.

WARNING: This process will completely remove Gradle and its configuration. This process is not reversible, so ensure that all of your configuration and data is backed up before proceeding.

# rm -rf /opt/gradle && update-alternatives --remove gradle /opt/gradle/bin/gradle

Conclusion

Congratulations! We’ve installed Gradle 7.6 on Linux system like CentOS, RHEL, Ubuntu and Debian. We hope this 2 minutes stuff helped you and thank you for visiting our website.
Cheers!!!