How to install and run the Gradle Wrapper


To install and run the Gradle Wrapper

mkdir my-project
cd my-project
gradle wrapper
./gradlew build

Install-Gradel-Wrapper

[root@aryan-34252e5f2 ~]# mkdir my-project
[root@aryan-34252e5f2 ~]# cd my-project
[root@aryan-34252e5f2 my-project]# gradle wrapper
Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
[root@aryan-34252e5f2 my-project]# ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-4.7-bin.zip
……………………………………………………………..

> Task :buildEnvironment

————————————————————
Root project
————————————————————

classpath
No dependencies

A web-based, searchable dependency report is available by adding the –scan option.

BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
[root@aryan-34252e5f2 my-project]#

 

How to install Gradle


To install Gradle in CentOS

get -O ~/gradle-4.7-bin.zip https://services.gradle.org/distributions/gradle-4.7-bin.zip
sudo yum -y install unzip java-1.8.0-openjdk
sudo mkdir /opt/gradle
sudo unzip -d /opt/gradle/ ~/gradle-4.7-bin.zip
sudo vi /etc/profile.d/gradle.sh

Open Vi Editor and add this line

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

Then set permissions on gradle.sh:

do chmod 755 /etc/profile.d/gradle.sh

log out of the server and logging back in:

gradle --version

how-to-install-gradle