Chapter 8. Extending Gradle
This chapter covers
- Gradle’s extension mechanisms by example
- Writing and using script and object plugins
- Testing custom tasks and plugins
- Obtaining configuration from the build script through extension objects
In the previous chapters, we covered a lot of ground discussing how to build a self-contained sample project with Gradle. You added custom logic by declaring simple tasks and custom task classes within your build script. Often, a task becomes so useful that you’ll want to share it among multiple projects. Gradle provides various approaches for reusing code, each with its own unique advantages and drawbacks. Plugins take the concept of reusability and extensibility even further. They enhance your project with ...
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.