How to install Gradle 5.5 in Linux Debian?

How to install Gradle 5.5 in Linux Debian?

Gradle is a open source build automation tool. It is very flexible and we can develop any kind of software. Gradle is an open-source build automation tool focused on flexibility and performance. Gradle build scripts are written using a Groovy or Kotlin DSL. Read about Gradle features to learn what is possible with Gradle. From mobile apps to microservices, from small startups to big enterprises, Gradle helps teams build, automate and deliver better software, faster. -by docs.gradle.org

PREREQUISITES

  1. JDK

DOWNLOAD

We can download the latest Gradle from the Gradle official site. The site link has been given below.

https://gradle.org/releases/

wget

By using “wget” command, we can download the Gradle latest version.

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

unzip the gradle file

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

set environment variable and gradle home

To set the Gradle environment variable and Gradle Home in Debian Linux, we can use nano editor. Execute the following command to set the ENV variables.

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

Add the following commands in nano editor and save the editor.

export GRADLE_HOME=/opt/gradle/gradle-5.5.1
export PATH=${GRADLE_HOME}/bin:${PATH}

Provide the permission to that gradle.sh file.

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

load environment variables

To load the Gradle environment variables, execute the following command.

source /etc/profile.d/gradle.sh

gradle version

To check the Gradle version execute the following command.

gradle -version
Gradle version

The Gradle installation on Debian Linux is done.

Advertisements

How to install Gradle 5.5 on Windows 10?

How to install Gradle 5.5 on Windows 10?

Gradle is a open source build automation tool. It is very flexible and we can develop any kind of software. Gradle is an open-source build automation tool focused on flexibility and performance. Gradle build scripts are written using a Groovy or Kotlin DSL. Read about Gradle features to learn what is possible with Gradle. From mobile apps to microservices, from small startups to big enterprises, Gradle helps teams build, automate and deliver better software, faster. -by docs.gradle.org

prerequisites

  1. JDK

download

We can download the latest Gradle from the Gradle official site. The site link has been given below.

https://gradle.org/releases/

I have downloaded the Gradle 5.5.1 version complete setup zip file and saved into my machine.

Gradle Downloaded Zip file

Extract the downloaded zip file now. The extraction may take time depending the file size.

Gradle Extracted file

SET ENVIRONMENT VARIABLE

Follow the below steps to set the environment variable for Gradle. The steps are given below

#1. Go to the My Computer –> Properties

My Computer – Properties

#2. Open the Environment Variable window by clicking the Advanced System Settings –> System Properties –> Environment Variables…

Environment Variables

#3. Select the System variable “Path” and click the “Edit” button.

System Variables

#4. Click the “New” button on the edit environment variable window and the add the Gradle extracted file location up to the bin folder and then click “OK” button. In my system, I have downloaded and extracted the Gradle zip file on the following location up to bin folder.

C:\softwares\gradle-5.5.1\bin
Gradle Environment Path

SET Gradle HOME PATH

To set the Gradle home path environment variable, follow the below steps.

#1. Click “New” button on the System variable window and provide the variable name is “GRADLE_HOME” and variable value is Gradle Zip file extracted path. In my system, I have download and extracted the zip file on the following location.

C:\softwares\gradle-5.5.1
Gradle Home Path

#2. Click “OK” button on all opened windows and open the new command prompt to execute the following command to check the Gradle version. The Gradle version should be 5.5.1.

gradle -version
Gradle version

Gradle installation has been done on Windows 10.