caipivara
12/4/2015 - 9:28 PM

Android / add app version and build number to assembled apk.

Android / add app version and build number to assembled apk.

def appVersionName = "1.0.0"
def appVersionCode = 12

android {
  //...
  defaultConfig {
    //..
    // Add version and build number to apk name
    setProperty("archivesBaseName", "app-${appVersionName}-${appVersionCode}")
  }
}