Understanding Gradle basics
In order for an Android project to be built using Gradle, you need to set up a build script. This will always be called build.gradle
, by convention. You will notice, as we go through the basics, that Gradle favors convention over configuration and generally provides default values for settings and properties. This makes it a lot easier to get started with a lot less configuration than that found in systems such as Ant or Maven, which have been the de facto build systems for Android projects for a long time. You do not need to absolutely comply with these conventions though, as it is usually possible to override them if needed.
Gradle build scripts are not written in the traditional XML, but in a domain-specific language ...
Get Gradle for Android 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.