Summary

In this chapter, we have discussed Gradle task in detail. We learned how to create simple tasks in Gradle and add actions to it. Along with it, we looked into task dependencies. We also looked into strict ordering of tasks if needed, using mustRunAfter and FinalyzedBy. We also discussed incremental build feature in Gradle, which improves build execution time. One of the important extensions is the custom task. We also saw how to create custom tasks and reuse the same task across different projects.

As mentioned, a task could fulfill a simple build requirement. However, requirements keep growing and we need more number of tasks. It is also required to group certain related tasks to perform a specific behavior. This grouping of tasks is done ...

Get Mastering Gradle 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.