Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » Linux » How to install Gradle on Ubuntu
  • nonRDP admin
    Allow RDP access for non administrators: Add User to Remote Desktop Users Group in Active Directory Windows Server
  • unnamed 1
    NSlookup Displays Error: UnKnown Default Server Windows Server
  • BitLocker selfservice or helpdesk recovery
    Force BitLocker Recovery: Perform BitLocker Recovery via the Self-Service Portal and Helpdesk Network | Monitoring
  • ad
    Service and Network Port requirements for Active Directory Windows
  • maxresdefault
    The following errors occurred attempting to join the domain: The specified domain either does not exist or could not be contacted Windows Server
  • Screenshot 2020 06 22 at 23.27.40 1
    Install MSSQL 2019 Developer Edition and SSMS on Windows Oracle/MSSQL/MySQL
  • screenshot 2020 04 07 at 21.02.45
    Trend Micro WorryFree Business Security Server Setup Anti-Virus Solution
  • Emulate Cisco Router with GNS3
    How to make a router function as a switch in GNS3 Network | Monitoring

How to install Gradle on Ubuntu

Posted on 28/03/202201/07/2023 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on How to install Gradle on Ubuntu
How to install GRADLE-FEATURE

Let’s first explain Gradle before we discuss how to install it on Ubuntu. Gradle is a build tool that is well-known for its versatility in software development, especially with regard to automation. The process of making applications is automated using a build automation tool. Compiling, linking, and packaging the code are all part of the application production process. With the help of build automation technologies, the process becomes more uniform. Furthermore, Gradle is well-known for its ability to create automation in Java, Scala, Android, C/C++, and Groovy. Over XML, the program offers groovy-based Domain Specific Language.

You can find other related articles here: How to Install & Configure Microsoft Teams on Ubuntu/, How to Install Apache OpenOffice on Ubuntu /, How to install PostgreSQL on Ubuntu/, How to install and configure Tripwire on Ubuntu/, How to install Node.js on Ubuntu.

Gradle allows you to build, test, and distribute applications across several platforms. You can use Gradle builds to specify a project’s tasks and dependencies. The project’s root folder contains at least one Gradle build file. Additionally, a task represents the work that a Gradle build must complete, such as assembling the program’s source code. Users can run multiple tasks at the same time in a single build file. At runtime, you can dynamically create and extend these tasks.

This article will show you what Gradle is all about and how to install it on Ubuntu /Debian-based machines.

Benefits of Installing Gradle on Ubuntu

  • Gradle eliminates all of the problems that other build tools, such as Maven and ANT, have.
  • Maintainability, usability, extendibility, performance, and flexibility are all priorities for the tool.
  • When it comes to different projects involving multiple technologies, it is well-known for being very customizable. Gradle can be used in a variety of ways, including Java, Android, and Groovy projects.
  • Gradle is well-known for its high-speed performance, which is double that of Maven.
  • The tools cover a wide variety of IDEs, which improves the user experience because different people prefer different IDEs to work with. It gives a command-line interface to users that prefer to work on the terminal, with capabilities such as Gradle tasks, command-line completion, and so on.

Requirements for Installing Gradle on Ubuntu

A computer with sudo privileges

Step1: Update your system

apt update 

Step2: Installing OpenJDK

Java SE 8 or later must be installed on the computer for Gradle to work.

sudo apt install openjdk-11-jdk

verify the installation with the command

java --version

Output is shown below:

openjdk 11.0.14 2022-01-18
OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Step3:  Download Gradle distribution

Please download the latest Gradle distribution using the wget command, download the Gradle binary-only zip file to the /tmp directory:

wget https://downloads.gradle-dn.com/distributions/gradle-7.0.2-bin.zip

Then, after downloading the archive, extract it and save it to the appropriate area. In general, I kept my applications in the /usr/local directory. You can use a different directory, such as /opt.

unzip gradle-7.0.2-bin.zip
mv gradle-7.0.2 /usr/local/gradle
how to install gradle on ubuntu -unzipgradle
how to install gradle on ubuntu-mvgradle

Your system has been set up with Gradle.

Step4: Setup Environment Variable

The next step is to configure Gradle with the PATH environment variable. Make sure you set the variable after you reboot the machine.

To set the PATH variable on reboot, place a shell script in the profile.d directory. Make a file that looks like this:

vim /etc/profile.d/gradle.sh

save the file with the following line added to it

export PATH=/usr/local/gradle/bin:$PATH

Save and close the file. Now you may use the script to apply the current shell’s environment.

source /etc/profile.d/gradle.sh

And you’ve successfully installed Gradle on your Ubuntu machine.

Step 5: Test Gradle Setup

Congratulations, you’ve successfully configured Gradle on your system. Moreover, to create your apps, you can utilize the Gradle tool. Let’s have a look at your system’s installed version.

Output

ubuntu

Step6: Uninstall Gradle on Ubuntu (If need be)

Gradle was installed through binary package, therefore all we have to do now is delete the packages using the rm -rf /usr/local/gradle/gradle-7.0.2/ command, that is in the code block below:

 rm -rf /usr/local/gradle/gradle-7.0.2/

Then, as shown below, remove the gradle.sh script with the rm -rf /etc/profile.d/gradle.sh command. This will delete the Gradle package from computer completely.

rm -rf /etc/profile.d/gradle.sh

Summary

We have successfully installed Gradle in Ubuntu 20.04 and these steps can work for any other version of Ubuntu as well. We have also shown you how to remove Gradle from your computer.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux Tags:Ubuntu, Ubuntu 20.04 LTS

Post navigation

Previous Post: How to install and configure Microsoft Teams on Ubuntu
Next Post: CVE-2022-22948: Patch available to address vCenter Server information disclosure vulnerability 

Related Posts

  • yarnfinalfeature
    How to Install and Uninstall Yarn on Ubuntu Linux Linux
  • squid proxy feature
    How to Set Up and Configure a Squid Proxy Server Linux
  • OPEN OFFICE
    How to Install Apache OpenOffice on Ubuntu  Linux
  • greywireshark
    How to install WireShark on a Linux Ubuntu System Linux
  • MV command in Linux
    Rename or Move Files or Directories in Linux with Bash Terminal Linux
  • images copy
    How to disable automatic screen lock in Ubuntu Linux Linux

More Related Articles

yarnfinalfeature How to Install and Uninstall Yarn on Ubuntu Linux Linux
squid proxy feature How to Set Up and Configure a Squid Proxy Server Linux
OPEN OFFICE How to Install Apache OpenOffice on Ubuntu  Linux
greywireshark How to install WireShark on a Linux Ubuntu System Linux
MV command in Linux Rename or Move Files or Directories in Linux with Bash Terminal Linux
images copy How to disable automatic screen lock in Ubuntu Linux Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • nonRDP admin
    Allow RDP access for non administrators: Add User to Remote Desktop Users Group in Active Directory Windows Server
  • unnamed 1
    NSlookup Displays Error: UnKnown Default Server Windows Server
  • BitLocker selfservice or helpdesk recovery
    Force BitLocker Recovery: Perform BitLocker Recovery via the Self-Service Portal and Helpdesk Network | Monitoring
  • ad
    Service and Network Port requirements for Active Directory Windows
  • maxresdefault
    The following errors occurred attempting to join the domain: The specified domain either does not exist or could not be contacted Windows Server
  • Screenshot 2020 06 22 at 23.27.40 1
    Install MSSQL 2019 Developer Edition and SSMS on Windows Oracle/MSSQL/MySQL
  • screenshot 2020 04 07 at 21.02.45
    Trend Micro WorryFree Business Security Server Setup Anti-Virus Solution
  • Emulate Cisco Router with GNS3
    How to make a router function as a switch in GNS3 Network | Monitoring

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,831 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.