Gradle has become one of the most widely used build automation tools in modern software development. If you want to Install Gradle Ubuntu systems for Java, Kotlin, C++, or Android development, the process is straightforward and takes only a few steps. Gradle combines powerful build management features with flexible scripting, making it a popular choice among developers and DevOps teams.
In this guide, you’ll learn how to install Gradle on Ubuntu, configure the required environment variables, and verify that everything is working correctly.
Gradle is a versatile build automation platform designed to simplify software compilation, testing, packaging, and deployment. Unlike traditional build tools that rely heavily on XML configuration files, Gradle uses a more flexible scripting approach based on Groovy or Kotlin.
Some key advantages include:
Before installing Gradle, you’ll need a supported Java runtime environment on your Ubuntu machine.
Gradle requires Java 8 or later. Most developers prefer OpenJDK because it is open source and readily available in Ubuntu repositories.
Update your package database and install OpenJDK:
sudo apt updatesudo apt install openjdk-11-jdk
After installation, confirm Java is available:
java -version
The command should display the installed Java version and runtime details.
Once Java is configured, download the latest Gradle release from the official distribution repository. It is recommended to verify the latest version before downloading.
Download the Gradle binary package:
wget https://services.gradle.org/distributions/gradle-version-bin.zip -P /tmp
Extract the archive into the /opt/gradle directory:
sudo unzip -d /opt/gradle /tmp/gradle-version-bin.zip
For easier future upgrades, create a symbolic link that points to the active Gradle installation:
sudo ln -s /opt/gradle/gradle-version /opt/gradle/latest
This approach allows administrators to switch versions without modifying environment settings.
To ensure Gradle commands are available system-wide, configure the required environment variables.
Create a profile script:
sudo nano /etc/profile.d/gradle.sh
Add the following configuration:
export GRADLE_HOME=/opt/gradle/latestexport PATH=${GRADLE_HOME}/bin:${PATH} Save the file and make it executable:
sudo chmod +x /etc/profile.d/gradle.sh
Apply the changes immediately:
source /etc/profile.d/gradle.sh
After completing the configuration, verify that Gradle is correctly installed.
Run:
gradle -v
The output should display detailed information about the installed Gradle version, Java runtime, operating system, and supported build features.
If version information appears successfully, the installation is complete and ready for development use.
Learning how to Install Gradle Ubuntu systems is an essential skill for developers working with Java, Android, and enterprise applications. By installing Java, downloading the latest Gradle release, and configuring environment variables, you can quickly prepare your Ubuntu machine for modern software development. Once the setup is complete, Gradle provides a powerful platform for automating builds, managing dependencies, and supporting efficient CI/CD pipelines.
OSINT is not just about tools. In 2026, the best open-source intelligence work depends on…
Building an OSINT lab does not have to be expensive. In 2026, many of the…
Website security is no longer optional. An Apache SSL Certificate helps encrypt data exchanged between…
Managing multiple websites on a single Linux server becomes much easier with Nginx Server Blocks.…
Modern web applications often rely on caching to deliver faster response times and reduce database…
Install Jenkins Ubuntu systems quickly and efficiently to build powerful CI/CD pipelines for software development…