Created
December 23, 2016 14:11
-
-
Save apacha/f9fa79a60d3531ce6f093154bfa745fe to your computer and use it in GitHub Desktop.
Automatic Versioning for gradle-based Android applications on Bitrise CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When running on the Bitrise-CI, this will return the build-number. Otherwise use 0 | |
def buildNumber = System.getenv("BITRISE_BUILD_NUMBER") as Integer ?: 0 | |
// Use your own current version number | |
def versionNumber = "1.0." | |
android { | |
... | |
defaultConfig { | |
... | |
versionCode buildNumber | |
versionName versionNumber + buildNumber | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment