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.
Use the following command to find the Java JDK installation directory.
This command output should show you the Java installation directory.
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
Here is the java.sh file content.
Reboot the computer.
Use the following command to verify if the JAVA_HOME variable was created.
Here is the command output:
Use the following command to test the Java installation.
Here is the command output:
You have finished the Java installation required by Gradle.
Tutorial Gradle – Installation on Ubuntu Linux
Install the list of required packages.
Download the Gradle installation package from the official website.
Extract and install the Gradle software.
You need to create an environment variable named GRADLE_HOME.
Let’s create a file to automate the required environment variables configuration
Here is the gradle.sh file content.
Reboot the computer.
Use the following command to verify if all the required environment variables were created.
Here is the command output:
Test your Gradle installation.
This command will verify the Gradle version installed.
Congratulations! The Gradle installation was successfully completed.