Use for central versionnumberbuildconfigurations

suggest change

You can define central config info’s in

or do it with root file

the project structure

  +- module1/
  |     build.gradle
  +- module2/
  |     build.gradle
  +- build.gradle

global setting for all submodules in

# used for manifest
# todo increment for every release

# android tools settings

usage in a submodule

apply plugin: ''
android {
    // appXXX are defined in
    compileSdkVersion = Integer.valueOf(appCompileSdkVersion)
    buildToolsVersion = appBuildToolsVersion

    defaultConfig {
        // appXXX are defined in
        versionCode = Long.valueOf(appVersionCode)
        versionName = appVersionName

dependencies {

Note: If you want to publish your app in the F-Droid app store you have to use magic numbers in the gradle file because else f-droid robot cannot read current versionnumner to detect/verify version changes.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents