Automatically increasing versionCode with Gradle

Continuous Integration means, above all, automatization. The user should not be in charge of the distribution or deployment process. Everything should be scripted!

While deploying new versions in Android, one of the common tasks is to increase the versionCode to identify a particular build. Using the new Gradle system, this can also be automatized.

In our defaultConfig, we will need to specify that the versionCode must be read from the newly added function:

Tags: , ,

Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.