Blog Image

Installing Gradle  

The latest and most recent popular build tool we often hear in Java World is Gradle. This blog covers how to install and configure Gradle build tool, so that we can develop Java Applications using Gradle.

Gradle

Gradle is a build tool that can be used for managing the dependencies, deployment and delivery aspects of an application. Gradle is a combination of Ant and Maven keeping the powerful features of both these two tools together, makes Gradle as flexible and most powerful build tool.

Let us understand how to install and configure Gradle to develop Java Application.

Prerequisite

To install and use Gradle we need Java Jdk being installed on our System.

Installing Gradle

  • Download Gradle

Download the latest version of gradle from the release site. https://gradle.org/releases/
  • Configure Gradle

  1. The latest version of gradle is 4.1 once you downloaded it using the above link you get a file with name gradle-4.1-bin.zip.
  2. copy the above gradle-4.1-bin.zip into the c:\> drive and extract it.
  3. You should see a folder gradle-4.1 directory under the c:\> drive
  4. Delete the zip file after extracting
You should see the below directory structure after extracting the above zip file.



Now configure the windows environment variables as below.
  • Create a Environment Variable JAVA_HOME pointing to Jdk Installation directory for e.g. JAVA_HOME to C:\Program Files\Java\jdk1.8.0_131
  • Add the Jdk directory to the PATH as %JAVA_HOME%\bin
  • Create Environment Variable GRADLE_HOME pointing to the root directory of the Gradle as follows GRADLE_HOME = C:\gradle-4.1
  • Now add the GRADLE_HOME\bin to PATH variable of your system as %GRADLE_HOME%\bin
Post configuration of the above environment variables run on the command prompt a the following command

gradle -version


This should display the gradle version, indicates as successful installation of Gradle.

Attachments

About author

User Image
Sriman

A software developer on JDK and JEE platform. I am passionate about Java technology and always an explorer and learner in new technologies in Java. I have experience on Open Source technologies like Struts, Spring, Jsf etc.. and even strong knowledge on Integration/Distributed world like Ejb, Web Services and Restful Services.

5

-Comments

Be the first person to write a comment for this Blog
  • author image
    by:
      radhareddy
      17-8-2017 01:03:53 PM

    Wow! Ultimate Build Tool Gradle... highly configurable and very flexible model support for multi-language development. Thankyou so much Sriman for sharing.

  • author image
    by:
      sahwan
      13-8-2017 10:27:04 PM

    very nicely explain so I feel very easy to install thank you ...@

  • author image
    by:
      Basant
      13-8-2017 04:01:09 PM

    Yeah it using hugely in industry .Thanks for share

  • author image
    by:
      pnkjSharma
      13-8-2017 02:15:53 PM

    Tnqu for this blog its easy and clear to understand .

  • author image
    by:
      SlrBhogesh
      12-8-2017 10:54:44 PM

    thank U Sriman...it's a crystal cleared explanation

Load More

No More Comments

Leave a Comment

Your comment has been posted and will appear soon.