mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 07:44:00 +01:00
Automatic "-dev" version suffix on non master branch
This commit is contained in:
parent
347dcb469a
commit
3f792c7a84
@ -47,6 +47,14 @@ static def gitBranchName() {
|
||||
return cmd.execute().text.trim()
|
||||
}
|
||||
|
||||
static def getVersionSuffix() {
|
||||
if (gitBranchName() == "master") {
|
||||
return ""
|
||||
} else {
|
||||
return "-dev"
|
||||
}
|
||||
}
|
||||
|
||||
project.android.buildTypes.all { buildType ->
|
||||
buildType.javaCompileOptions.annotationProcessorOptions.arguments =
|
||||
[
|
||||
@ -73,7 +81,7 @@ android {
|
||||
|
||||
// Note: versionCode is depending on the build variant
|
||||
|
||||
versionName "${versionMajor}.${versionMinor}.${versionPatch}-dev"
|
||||
versionName "${versionMajor}.${versionMinor}.${versionPatch}${getVersionSuffix()}"
|
||||
|
||||
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
|
||||
resValue "string", "git_revision", "\"${gitRevision()}\""
|
||||
|
Loading…
Reference in New Issue
Block a user