Would you like to learn how to do a Gradle installation on Ubuntu Linux? In this tutorial, we are going to show you how to download and install Gradle on a computer running Ubuntu Linux.

• Ubuntu 18.04
• Ubuntu 19.04
• Ubuntu 19.10
• Gradle 5.6.4
• Openjdk version 11.0.4

Hardware List:

The following section presents the list of equipment used to create this Gradle tutorial.

Every piece of hardware listed above can be found at Amazon website.

Gradle Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Gradle.

Tutorial Gradle - Java Installation on Ubuntu Linux

Install the Java JDK package.

Copy to Clipboard

Use the following command to find the Java JDK installation directory.

Copy to Clipboard

This command output should show you the Java installation directory.

Copy to Clipboard

In our example, our Java JDK is installed under the folder: /usr/lib/jvm/java-11-openjdk-amd64

Now, you need to create an environment variable named JAVA_HOME.

Let’s create a file to automate the required environment variables configuration

Copy to Clipboard

Here is the java.sh file content.

Copy to Clipboard

Reboot the computer.

Copy to Clipboard

Use the following command to verify if the JAVA_HOME variable was created.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Use the following command to test the Java installation.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

You have finished the Java installation required by Gradle.

Tutorial - Gradle Installation on Ubuntu Linux

Install the list of required packages.

Copy to Clipboard

Download the Gradle installation package from the official website.

Copy to Clipboard

Extract and install the Gradle software.

Copy to Clipboard

You need to create an environment variable named GRADLE_HOME.

Let’s create a file to automate the required environment variables configuration

Copy to Clipboard

Here is the gradle.sh file content.

Copy to Clipboard

Reboot the computer.

Copy to Clipboard

Use the following command to verify if all the required environment variables were created.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Test your Gradle installation.

Copy to Clipboard

This command will verify the Gradle version installed.

Copy to Clipboard

Congratulations! The Gradle installation was successfully completed.