Skip to content

Instantly share code, notes, and snippets.

@tunjos tunjos/build.gradle
Created Jul 7, 2015

Embed
What would you like to do?
versionName config
def versionMajor = 3
def versionMinor = 0
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
android {
defaultConfig {
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
}
}
If you have more than 10 patch or minor versions you have other problems. 10 builds? Unlikely, but we've got a whole int32 to work with here so why not...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.