Getting started with Gradle

This tutorial explains about getting started with Gradle, the newest and fast growing build tool. As per the official website, Gradle is explained as,

Gradle is build automation evolved. Gradle can automate the building, testing, publishing, deployment and more of software packages or other types of projects such as generated static websites, generated documentation or indeed anything else.

Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build. Powered by a Groovy DSL and packed with innovation, Gradle provides a declarative way to describe all kinds of builds through sensible defaults. Gradle is quickly becoming the build system of choice for many open source projects, leading edge enterprises and legacy automation challenges.

The official website has detailed documentation  hence we shall jump to the installation and basic usage.

1. Installation

Got to link and download the latest version of Gradle zip and extract it to appropriate folder, next

  1. Create a system property called GRADLE_HOME pointing to the folder of the extracted Gradle zip
  2. Add GRADLE_HOME/bin to PATH variable.

below is the sample bash profile entry.

2. Verification

Once the above steps are complete open a new terminal and verify the installation by executing gradle -version on successful installation you should see the below output, if you don’t see the output then repeat the above steps.

on executing gradle -h  displays all the command options.

I hope this has been useful for you and I’d like to thank you for reading. If you like this article, please leave a helpful comment and share it with your friends.

Leave a Reply

Your email address will not be published. Required fields are marked *