DEV Community

Cover image for Introduction
Nico
Nico

Posted on

Introduction

Preface

Gradle's documentation is more than only hard to read - oftentimes it feels like an information deadlock, where one document refers to another, which in turn refers back to the document you came from. In addition, parts of the descriptions, examples and practices are completely or partially outdated. All in all, despite the richness of the docs, it's uncleanly written and apparently does not receive any maintenance and care. Even Thehe company provides free trainings on the powerful build tool, however, a proper guide would make Gradle far more accessible to developers. That's the reason this guide exists.

The goal of this guide

The goal of this guide is not to introduce you to every feature of Gradle. Gradle is extensive and full of functionality. But I think, the purpose of a guide isn't explaining everything in detail anyway. It rather aims to cover the basic and some advanced concepts together with the fundamental mechanisms, giving you the knowledge to go on with your own research about the Gradle build tool. With that said, let's start!


What is Gradle and how does it work?

Gradle is an open-source build automation tool that is designed to be flexible enough to build almost any type of software. It's extremely extensible and customizable. In fact, the actual building tool is nothing more than a framework which needs to be filled with custom logic.

Gradle is based on Java, hence running inside the JVM. To instruct Gradle to build a project, we have to provide it information about what and how that should be accomplished. So the logic (e.g. compiling source files) has first to be added to Gradle - it does not do that out of the box! Fortunately, those things are already implemented by other developers and packaged for use, so there is (in most cases) no need for us to reinvent the wheel. Instead, we can just take that package and say that this task should be executed for us. Those tasks and "packaged logic" (spoiler: those are called plugins) are some of the basic concepts you learn about soon.

Installing Gradle

To be able to run Gradle and experiment alongside reading this guide (I highly recommend you to experiment), first of all you need to install Gradle. As the whole process of how to do that is well-documented by the Gradle documentation itself, I just refer to it here.
Now as you have Gradle installed, you can run a lot of commands. An overview you can find here.


If you have any questions or constructive criticism on the articles, post them in the discussion section below!

Top comments (1)

Collapse
 
nxcco profile image
Nico • Edited

The whole guide is going to be published piece by piece over the course of the next weeks. So there is a high probability, then when you read this comment, the whole article series is already available. Wish you fun reading!