How to Install Gradle on Debian 10

Install Gradle on Debian 10

In this article, we will have explained the necessary steps to install Gradle on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Gradle is a free and open source build automation toolset based on the concepts of Apache Ant and Apache Maven. Unlike its predecessors which use XML for scripting, Gradle uses Groovy, a dynamic, object-oriented programming language for the Java platform to define the project and build scripts.

Install Gradle on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install OpenJDK.

Gradle requires Java to be installed on your system. To install OpenJDK 8 run following command:

Run the following command to verify that Java was successfully installed:

Step 3. Install Gradle on Debian.

First, download Gradle from official Gradle release page. The latest Gradle version available is 6.5:

Next, unzip a downloaded zip file using the following command:

Step 4. Setup environment variables.

Next step is to configure the PATH environment variable to include the Gradle bin directory. To do so, open your text editor and create a new file named inside of the /etc/profile.d/ directory:

Now make script file executable using following command:

Load the environment variables using following command:

Step 5. Verify Installation.

Now verify the installation of Gradle using the following command:

Congratulation, you have learned how to install and configure Gradle on Debian 10 Buster. If you have any question, please leave a comment below.