Summary

In this chapter, we discussed how to create tasks in a build project. We created tasks with actions in several ways and discussed how to configure tasks.

We skipped tasks by using predicates, throwing StopExecutionException, and enabling or disabling a task. We also discussed how to skip tasks from the command line.

A very powerful feature of Gradle is the incremental build support. If a task is up to date, it isn't executed. We can define the rules to determine the up-to-date state in the tasks definition.

In the next chapter, we will take a more in-depth look at the Gradle Project object. We will see how to work with files and project properties and how to use the Gradle Wrapper.

Get Gradle Effective Implementations Guide - Second Edition 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.