The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
Gradle is very extensible, from Groovy scripting code in your
file all the way up to dedicated Gradle plugins. The more you want
to reuse a particular piece of functionality, or the more sophistication
you want in your custom builds, the more likely it is that a Gradle plugin
will be the right solution.
Sometimes, a Gradle plugin will be focused mostly on tailoring the build process itself. However, a Gradle plugin could be simply an integration point for a tool that could be used in other ways (e.g., command-line API) that would not otherwise require Gradle. This is particularly true for tools that work across IDEs, where you put most of the core logic into a core set of tool code and have thin build system plugins that bridge between the build system or IDE and the tool itself.
In this chapter, we will look at the basics of setting up a Gradle plugin. The plugin that we develop in this chapter will not do much of anything. The next chapter, however, creates a Gradle plugin that generates Java code, building on what we explore here.
This chapter will make the most sense if you have read the preceding chapters on Gradle, particularly the chapter on Gradle tasks.
The preview of this section is being chased by zombies.
The preview of this section is sleeping in.
The preview of this section was the victim of a MITM ('Martian in the middle') attack.
The preview of this section is [REDACTED].
The preview of this section left for Hollywood to appear in a reality TV show.
The preview of this section is en route to Mars.