All snippets tagged with gradle

Page 1 of 1
 

Publish a library to MavenCentral

Building debug libraries in debug app modules

The following combination of snippets allows you to use different debug and release functionality in a library module depending on the debug/release build type of the parent app module.

Read more…

Getting the active flavor and build type at build-time

This is usually not relevant, but when getting creative with your Gralde scripts it might be handy to know which flavor is being built. Simply putting code inside a productFlavor block is not enough to exclude code from running, e.g. when including code from other scripts.

Read more…

Automatically update the build number on every release build

This example uses a properties file that holds the build number. On every release build, the version number is increased. By adding the file to version control the build number will consistently increase regardless of which team member builds the release.

Read more…