Graddle — installing it

Daniel Maioni
2 min readApr 3, 2023

--

Graddle is a build automation tool for java projects and other languages (Groovy, Scala, others). Based on concepts from Apache Ant and Apache Maven.

First of all, you need to setup the Java:

To work with graddle projects, we have to install it first.

Check it out the last graddle binaries at https://gradle.org/releases

Download it, and extract into your optional software folder or /opt/graddle (if opt is not available, create it with sudo mkdir /opt) :

sudo apt update
sudo mkdir /opt/gradle
wget https://services.gradle.org/distributions/gradle-8.6-bin.zip -P /tmp
sudo unzip -d /opt /tmp/gradle-8.6-bin.zip
ls /opt/gradle-8.6
bin init.d lib LICENSE NOTICE README

Create a symbolic link to gradle with the command ln adding the parameters s (symbolic) f (force) and n (no-dereference):

sudo ln -sf /opt/gradle-8.6/ /opt/gradle
ls -ld /opt/gradle
which gradle

Let’s configure the environment variables, make sure that you already have java installed otherwise click here to know how to do it first:

sudo echo "export JAVA_HOME=/usr/lib/jvm/java-in-use" >> ~/.bashrc
sudo echo "export GRADLE_HOME=/opt/gradle" >> ~/.bashrc
sudo echo "export PATH=${GRADLE_HOME}/bin:${PATH}" >> ~/.bashrc
source ~/.bashrc

And make sure all is setup:

echo $JAVA_HOME
echo $GRADLE_HOME
echo $PATH
gradle -version

If you need to upgrade the link, repeated the process to download and extract, and update the symbolic link to the new value with the same ln command:

sudo ln -sfn /opt/gradle-8.1.1/ /opt/gradle

But if you do not need it anymore, you can delete the link:

sudo rm /opt/gradle
Gradle logo, an elephant engraving the name Gradle.
Gradle is ready!

Gradle is ready!

IT’s my problem, maybe yours…

--

--