Gradle Tutorial Series

Romin Irani
Romin Irani’s Blog
3 min readJul 28, 2014
img2

Welcome to a new blog series where I aim to cover the basics of Gradle, the build tool that not just everyone is talking about and adopting widely. Companies, small and large have adopted this tool and while you might be familiar with Ant and Maven, it is time to take a look at Gradle.

December 27, 2017 : UPDATE: The series has been updated for latest Gradle version (4.4.1)

The need for writing this series has come about primarily due to my work with a few Google related technologies/frameworks. I use the Google Cloud Platform widely for my projects (both professional and hobby) and have primarily used Eclipse as my IDE for both Cloud Projects (running on Google App Engine) and front-end mobile applications (Android). With Google putting its weight behind Android Studio, one of the things that hit me immediately when I tried to use Android Studio was the fact that it used Gradle as its build tool.

My first experience with Android Studio and Gradle was one that cannot be described. I do not want to digress from the topic at hand, but let’s say that it was a difficult time to understand the exceptions, what Gradle is doing in the background and how to correctly set up dependencies of already existing projects. If you have been trying to play with Gradle, you know exactly what I mean. This series is my attempt to explain just about enough of Gradle so that you can get going with minimum fuss and save loads of time. In fact, I am confident that the more you use Gradle, the more you will appreciate the reasons for using it and which was not very apparent to me, the first time I experienced all those problems.

The series will be more task focused with just enough explanation for you to understand what is going on behind the scenes. I will spend less time on marketing Gradle. I will not go deep into reasons on why it works in a certain way. I will reference articles at the right places for those who wish to take a deeper dive. For the rest of us, who are interested in using Android Studio + Google Cloud Platform , we want to be as comfortable with the toolset, so that we can continue to build great applications and let Gradle do the heavy work of the mechanics that eventually result in binaries that we can give to the world.

This tutorial series will take you to a journey that covers the following:

  • Part 1 : Installation of Gradle and setting it up correctly on your system
  • Part 2 : Your first Java Project Build with Gradle
  • Part 3 : Multiple Java Projects with Gradle
  • Part 4 : Java Web Applications with Gradle

Some of these parts could go over into multiple parts, but at a high level, this is what I plan to cover. If you notice, the first 4 parts will focus on Gradle basics without getting into any specific Google stuff ( Google App Engine , Android, Android Studio IDE, etc).

To all Java Developers out there, lets rock the Gradle !

--

--

Romin Irani
Romin Irani’s Blog

My passion is to help developers succeed. ¯\_(ツ)_/¯