Skip to content

Instantly share code, notes, and snippets.

@trinadhkoya
Created September 10, 2019 08:52
Show Gist options
  • Save trinadhkoya/8769651261762c396c39af91e144d8a7 to your computer and use it in GitHub Desktop.
Save trinadhkoya/8769651261762c396c39af91e144d8a7 to your computer and use it in GitHub Desktop.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "16.0.0"
getVersionCode = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'master'
standardOutput = stdout
}
return Integer.parseInt(stdout.toString().trim())
}
catch (ignored) {
return -1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment