Installing Gradle on Linux Mint

Introduction

Gradle is an open-source build automation tool that is used to build Java and other software projects. In this tutorial, we will learn how to install Gradle on Linux Mint.

Prerequisites

Before we proceed, ensure that your system has:

Step 1: Update the system

Before we install Gradle, it is important to update our Linux Mint system package database to the latest version. To do this, run the following command in your terminal:

sudo apt-get update

Step 2: Install Gradle

After updating our system, we can now proceed to download Gradle. Run the following command in your terminal to download the latest Gradle package:

wget https://services.gradle.org/distributions/gradle-7.1.1-bin.zip -P /tmp

The above command will download the Gradle binary distribution package to the /tmp directory.

Next, unzip the package using the following command:

sudo unzip -d /opt/gradle /tmp/gradle-*.zip

This command will install Gradle to the /opt/gradle/ directory.

Step 3: Set environment variables

Once Gradle is installed, we need to set some environment variables to allow us to use Gradle from anywhere in the terminal. Follow the steps below.

Add the Gradle installation directory to the PATH environment variable:

export PATH=$PATH:/opt/gradle/gradle-7.1.1/bin

This will add the gradle executable file to the $PATH environment variable.

Verify Gradle installation

To verify that Gradle is installed and working correctly, type the following command in your terminal:

gradle -v

The command will output details about the Gradle installation, including the version and build date.

Conclusion

That's it! You have successfully installed Gradle on your Linux Mint system. You can now start using Gradle to build your Java projects.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!