How to Install Gradle on EndeavourOS Latest

Gradle is a powerful build automation tool for Java, Kotlin, Groovy, and Scala projects. Installing Gradle on EndeavourOS Latest is a straightforward process that can be completed in just a few steps.

Prerequisites

Before you start, make sure that you have the following prerequisites:

Let's start with the installation process.

Step 1: Update System Packages

Open the terminal and update the EndeavourOS package list:

sudo pacman -Syu

This ensures that your system packages are up to date.

Step 2: Install Java JDK

Gradle requires Java, so we need to install the Java development kit.

Run the following command to install the default Java JDK:

sudo pacman -S jdk11-openjdk

Step 3: Download Gradle

The next step is to download Gradle. You can download the latest version from the Gradle website. Alternatively, you can use the following command to download Gradle:

wget https://services.gradle.org/distributions/gradle-7.2-bin.zip

Step 4: Install Gradle

Once the download is complete, extract the downloaded zip file to the /opt directory.

sudo unzip -d /opt gradle-7.2-bin.zip

This will extract Gradle to the /opt/gradle-7.2 directory.

Step 5: Configure Environment Variables

To use Gradle, we need to set some environment variables. Open the .bashrc file in your home directory:

nano ~/.bashrc

Add the following lines at the end of the file:

export PATH=$PATH:/opt/gradle-7.2/bin
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk/

Save the file and exit nano by pressing Ctrl + X, followed by Y and Enter.

Step 6: Verify Installation

Once you have completed the above steps, Gradle should be installed on your system. You can verify this by running the following command:

gradle -v

This should print the Gradle version number and the installation details.

Congratulations! You have installed Gradle on your EndeavourOS Latest system. You can now use Gradle to build and manage 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!