Gradle is an open-source build automation tool that is used for multi-language software development. It is designed to build and automate the process of software development efficiently. In this guide, we will walk through the steps to install Gradle on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install Java

Gradle requires Java to be installed. You can install OpenJDK 11 with the following command:

sudo apt install openjdk-11-jdk -y

Step 3: Verify Java Installation

Check if Java is installed correctly by running:

java -version

Step 4: Download Gradle

Download the latest version of Gradle from the official website:

wget https://services.gradle.org/distributions/gradle-7.5.1-bin.zip

Replace 7.5.1 with the latest version number if necessary.

Step 5: Install Unzip

Make sure to have the unzip tool installed:

sudo apt install unzip -y

Step 6: Extract the Downloaded Gradle Archive

Extract the downloaded Gradle zip file:

unzip gradle-7.5.1-bin.zip

Step 7: Move Gradle to /opt Directory

Move the extracted Gradle directory to the /opt directory:

sudo mv gradle-7.5.1 /opt/gradle

Step 8: Set Up Environment Variables

Add Gradle to your PATH by editing the ~/.bashrc file:

echo 'export PATH=$PATH:/opt
Hai trovato utile questa risposta? 0 Utenti hanno trovato utile questa risposta (0 Voti)