Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gradle Essentials

You're reading from   Gradle Essentials Master the fundamentals of Gradle using real-world projects with this quick and easy-to-read guide

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781783982363
Length 176 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Abhinandan Maheshwari Abhinandan Maheshwari
Author Profile Icon Abhinandan Maheshwari
Abhinandan Maheshwari
Kunal Dabir Kunal Dabir
Author Profile Icon Kunal Dabir
Kunal Dabir
Arrow right icon
View More author details
Toc

What this book covers

This book can be roughly divided into three parts.

Section 1 includes Chapter 1, Running Your First Gradle Task, Chapter 2, Building Java Projects, and Chapter 3, Building a Web Application. This section introduces the basics of Gradle, with very simple examples, which helps readers to create build files for Java projects and Web applications. It gives a gentle start without involving any complex concepts.

Section 2 includes Chapter 4, Demystifying Build Scripts, and Chapter 5, Multiprojects Build. This section helps the reader to understand the underpinning of Gradle in more depth, still maintaining the 'essentials' aspect of this book. It also helps the reader to understand how to interpret and write scripts that conform to Gradle DSL.

Section 3 includes Chapter 6, The Real-world Project with Gradle, Chapter 7, Testing and Reporting with Gradle, Chapter 8, Organizing Build Logic and Plugins, and Chapter 9, Polyglot Projects. This section covers more real-world use cases that Gradle users come across. Some examples include migrating to Gradle from the existing build system, using Gradle on CI servers, maintaining code quality with Gradle, using Gradle to build project languages such as Groovy and Scala, and so on. These concepts mostly revolve around what various plugins have to offer and also allows the reader to create their own custom plugins.

Also, there are multiple places in all chapters where the reader can find tips, references, and other informative notes.

Chapter 1, Running Your First Gradle Task, starts with an introduction to Gradle and its installation, subsequently moving on to exploring the Gradle command-line interface, and finally running the first build file.

Chapter 2, Building Java Projects, explains topics such as building Java applications and libraries, unit testing with JUnit, reading test reports, and creating application distributions.

Chapter 3, Building a Web Application, deals with building and running Web applications. It also briefly introduces concepts such as dependencies, repositories, and configurations.

Chapter 4, Demystifying Build Scripts, starts with a primer to the Groovy syntax in the context of Gradle DSL. Then, it goes on to explain the backbone concepts of a Gradle build such as build phases, project API, and various topics related to Gradle tasks.

Chapter 5, Multiprojects Build, covers a few options to structure multiproject directories. Then, covers organization of a build logic, which is a multiproject build.

Chapter 6, The Real-world Project with Gradle, deals with one of the important problems faced by developers, that is, migrating their existing Ant and Maven scripts to Gradle. This chapter provides different strategies and examples, which guide developers to perform migration in a more simpler and manageable way. This chapter also gives an insight into the different ways of publishing artifacts with the help of Gradle and also how a developer can integrate Gradle with Continuous Integration workflow.

Chapter 7, Testing and Reporting with Gradle, deals with the integration of the TestNG framework with Gradle. Apart from unit testing with TestNG, it also deals with different strategies for integration testing, which the user can follow to execute integration tests separate from unit test cases. It also discusses about integrating Sonar with Gradle, which helps developers to analyze the quality of code on different parameters, and JaCoCo integration for code coverage analysis.

Chapter 8, Organizing Build Logic and Plugins, discusses one of the important building blocks of Gradle plugins, without which you will find this book incomplete. It discusses the needs of the plugin and the different ways in which developers can create a plugin based on the project size and complexities.

Chapter 9, Polyglot Projects, demonstrates how to use Gradle for projects that use languages apart from or in addition to Java; this chapter shows the examples of building Groovy and Scala projects.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime