Incremental Tasks & Up-to-Date Checks
Make custom tasks fast and correct by declaring inputs and outputs so Gradle can skip work that is already up to date.
Why Tasks Get Skipped
Gradle is fast because it does not redo work. If a task ran before and nothing it depends on changed, Gradle marks it UP-TO-DATE and skips it. You enable this by declaring inputs and outputs.
Inputs and Outputs
Every task can declare what it reads (inputs) and what it produces (outputs). Gradle hashes them to decide whether to run.
All lessons in this course
- Defining Custom Tasks
- Task Types & Actions
- Task Properties & Configuration
- Incremental Tasks & Up-to-Date Checks