Book Image

Gradle Effective Implementations Guide - Second Edition

By : Hubert Klein Ikkink
Book Image

Gradle Effective Implementations Guide - Second Edition

By: Hubert Klein Ikkink

Overview of this book

Gradle is a project automation tool that has a wide range of applications. The basic aim of Gradle is to automate a wide variety of tasks performed by software developers, including compiling computer source code to binary code, packaging binary codes, running tests, deploying applications to production systems, and creating documentation. The book will start with the fundamentals of Gradle and introduce you to the tools that will be used in further chapters. You will learn to create and work with Gradle scripts and then see how to use Gradle to build your Java Projects. While building Java application, you will find out about other important topics such as dependency management, publishing artifacts, and integrating the application with other JVM languages such as Scala and Groovy. By the end of this book, you will be able to use Gradle in your daily development. Writing tasks, applying plugins, and creating build logic will be your second nature.
Table of Contents (18 chapters)
Gradle Effective Implementations Guide - Second Edition
About the Author
About the Reviewer

Chapter 1. Starting with Gradle

When we develop a software, we write, compile, test, package, and finally, distribute the code. We can automate these steps by using a build system. The big advantage is that we have a repeatable sequence of steps. The build system will always follow the steps that we have defined, so we can concentrate on writing the actual code and don't have to worry about the other steps.

Gradle is one such build system.

In this chapter, we will cover the following topics:

  • Getting started with Gradle

  • Writing our first build script

  • Looking at default tasks

  • Learning about command-line options

  • Discussing the Gradle graphical user interface

Gradle is a tool for build automation. With Gradle, we can automate compiling, testing, packaging, and deployment of our software or any other types of projects. Gradle is flexible, but has sensible defaults for most projects. This means that we can rely on the defaults if we don't want something special, but we can still can use the flexibility to adapt a build to certain custom needs.

Gradle is already used by large open source projects such as Spring, Hibernate, and Grails. Enterprise companies such as LinkedIn and Netflix also use Gradle.

In this chapter, we will explain what Gradle is and how to use it in our development projects.

Let's take a look at some of Gradle's features.