Templates by BIGtheme NET

Gradle Quick Start

In this article, I will show you How to install Gradle on Windows system.
Write a simple “Hello World” program. How to add simple task, run and test.

How to install Gradle on Windows System :

Simple steps to be followed,

1) Download latest Gradle versions from Gradle. Extract the zip file to C:\ path.

1_Gradle Quick Start

2) Create and environment variable GRADLE_HOME and provide the value C:\gradle-2.11

Right click on computer and go to environment variables.

2_Gradle Quick Start

3) Add the gradle bin path to system path variable, %GRADLE_HOME%\bin

3_Gradle Quick Start

4) How to verify the Gradle installation.

Open a commands prompt and type Gradle or Gradle -v

4_Gradle Quick Start

5) Write a simple hello world program and run.

Create a file name called build.gradle and add a simple task named helloWorld
to print the text “hello world”.

build.gradle

task helloWorld << {
println 'hello world'
}

Command to run this task is gradle -q helloWorld, Here helloWorld is the task name.

5_Gradle Quick Start

*** Venkat – Happy learning ****