• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Gradle on Debian 10 Buster

Written by Admin, Updated On July 20, 2020
debian, gradle, java
How to Install Gradle on Debian 10

Gradle is free and open-source build tool used for the Java projects. It is flexible and helps developers team to automate and build easier and faster software. In this tutorial we will explain how to install Gradle on Debian 10 Buster.

Prerequisites#

Ensure that you are logged in as root or user with sudo privileges.

Step 1 – Install Java#

Gradle requires Java JDK 8 or JRE 8 or higher version on the server to run. To install OpenJDK run the following command:

sudo apt update
sudo apt install default-jdk

Verify installed Java version on your system.

java -version

The output should look something like this:

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode, sharing)

Step 2 – Downloading Gradle#

After the installing Java on your system, download the latest Gradle distribution release binary file from its official download page. At the time of writing this tutorial, the latest version of Gradle is 6.3.

Run the following wget command to download the Gradle binary file:

wget https://services.gradle.org/distributions/gradle-6.3-bin.zip -P /tmp

Once the download is complete, extract the zip file in the /opt/gradle directory:

sudo unzip -d /opt/gradle /tmp/gradle-*.zip

Verify that the Gradle files are extracted:

ls /opt/gradle/gradle-*
bin  init.d  lib  LICENSE  NOTICE  README

The Gradle build tool has been configured on your Debian 10 system.

Setup the Environment Variables#

Now, we will setup Gradle with PATH environment variable to include the Gradle bin directory. Open your text editor and create a new file with name gradle.sh under the /etc/profile.d directory.

sudo nano /etc/profile.d/gradle.sh

Add the following configuration:

export PATH=/opt/gradle/gradle-6.5/bin:$PATH

Save and close the file.

Make the script executable by running the following chmod command:

sudo chmod +x /etc/profile.d/gradle.sh

Now source the script to apply environment for current shell.

source /etc/profile.d/gradle.sh

At this stage, Grandle is installed on Debian 10 Linux system.

Verify Gradle Installation#

Run the below command to verify that Gradle is installed properly by checking it’s version:

gradle -v

It should show something like the following:

Welcome to Gradle 6.3!

Here are the highlights of this release:
 - Java 14 support
 - Improved error messages for unexpected failures

For more details see https://docs.gradle.org/6.3/release-notes.html


------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------

Build time:   2020-03-24 19:52:07 UTC
Revision:     bacd40b727b0130eeac8855ae3f9fd9a0b207c60

Kotlin:       1.3.70
Groovy:       2.5.10
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.6 (Debian 11.0.6+10-post-Debian-1deb10u1)
OS:           Linux 4.19.0-6-amd64 amd64

Conclusion#

You learned how to install Gradle on Debian 10, Buster. To know more about Gradle visit official Gradle Documentation page.

If you have any question or feedback, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article Su Command in Linux (Switch User)
Next Article   How to Install and Use FFmpeg on Debian 10

Related Posts

  • How to Change Hostname Debian 11

    How to Change Hostname on Debian 11

    February 3, 2023
  • How to Install Python 3.11 on Debian 11

    How to Install Python on Debian 11

    January 25, 2023
  • How to Install Mongodb on Debian 11

    How to Install MongoDB on Debian 11 Linux

    January 11, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Jenkins on Debian 11
    How to Install Jenkins on Debian 11 January 5, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook