Using the new Gradle-based Android build system: a new example

A while ago I wrote a long post about the way I was using Gradle to build AVélib[0] & AVélov[1], some personal projects of mine. If you don't remember this post and are interested in the new Gradle-based Android build system, I highly encourage you to have a look at it here:

The main purpose of this post at that time has a) to show you the new build system was ready to be used in production in some cases and b) to give you some tips and tricks to overcome some of the issues related to ContentProvider authorities and/or Google Maps API keys when having several flavors/build types.

With the release of the new Gradle plugin 0.7, I've updated my applications and I'd like to show you some of the improvements you can use to make the configuration cleaner and simpler to write. For example, I've finally been able to switch to flavors and I've removed most constants duplication between the Java code, the XML files and the Gradle configuration file.

You can obviously have a look at the new file hierarchy as well as the Gist I've made with all of the relevant parts.

Shared publiclyView activity