Compiling and building APKs is something we do many times during the course of an application's development, and other than including various dependencies, we have taken our build automation system, Gradle, pretty much for granted. Despite this, it will not have escaped the reader's attention that what Gradle actually does is really quite sophisticated and complex.
One of the reasons that we can take Gradle for granted is the way that it configures each build using a process known as convention over configuration. This ensures that, in nearly all cases, Gradle selects the most sensible configuration options for each project. It is when we override these settings that Gradle becomes interesting and useful. For example, we can use it to build mobile and tablet versions of an app from the same Studio project.
Producing a compiled APK file is by...