Packt Publishing published Gradle Essentials, a short and straight forward book about Gradle. This article is a review about this book. Disclosure: I was a technical reviewer for this book.

Review

Gradle Essentials Book

Gradle is a popular build tool in development projects based on the Java Platform.

Gradle Essentials is the book I would have liked to read when I started using Gradle. It gives the reader the necessary guidance to get started without prior knowledge of Gradle. There is no complex topics requiring understanding the internals of Gradle. The authors provide practical information that can immediately be applied in the typical stages of software development lifecycle: development, testing, continuous integration and also deployment.

In addition to tackling key features of Gradle, the book also contains a couple of great tips that are time savers in Java projects.

Some of my Favorites Tidbits

Among many other features described in the book, I found the two following tips very valuable:

  • Gradle Daemon in Chapter 1: Java is known to be slow to start. When compiling, or running tests, it can be frustrating to have to wait for the build tool to warm up before getting some results. The Gradle daemon addresses this problem.
  • Running a Web Application in Chapter 3: If your project is a classic Java web site that typically results in a war file, you probably have to include documentation to explain how to deploy the war file after having installed a web site container, like Tomcat for example. In chapter 3 the author provides a solution that can reduce all the documentation to:
$ git clone your-project
$ cd your-project
$ gradle run

What I Missed

Chapter 7 covers testing and surprisingly uses TestNG. I realized that TestNG was still relevant and found it more refreshing then if it had been JUnit. Nevertheless, I was hoping to read about Spock, thinking it would be more inline with the underlying Groovy language common to both Gradle and Spock.

Conclusion

I would recommend this book to anyone who is new to Gradle, or someone already using Gradle but who did not have a chance yet to explore further what is really possible with this build tool.