Chapter 4. Build script essentials

This chapter covers

  • Gradle’s building blocks and their API representation
  • Declaring new tasks and manipulating existing tasks
  • Advanced task techniques
  • Implementing and using task types
  • Hooking into the build lifecycle

In chapter 3, you implemented a full-fledged Java web application from the ground up and built it with the help of Gradle’s core plugins. You learned that the default conventions introduced by those plugins are customizable and can easily adapt to nonstandard build requirements. Preconfigured tasks function as key components of a plugin by adding executable build logic to your project.

In this chapter, we’ll explore the basic building blocks of a Gradle build, namely projects and tasks, and ...

Get Gradle in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.