mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 18:36:21 +03:00
F-Droid: fix the "-dev" issue in version name (#815)
This commit is contained in:
parent
d1699279fe
commit
f5e6b4b857
3 changed files with 24 additions and 5 deletions
|
@ -9,6 +9,8 @@
|
||||||
<w>decryptor</w>
|
<w>decryptor</w>
|
||||||
<w>emoji</w>
|
<w>emoji</w>
|
||||||
<w>emojis</w>
|
<w>emojis</w>
|
||||||
|
<w>fdroid</w>
|
||||||
|
<w>gplay</w>
|
||||||
<w>hmac</w>
|
<w>hmac</w>
|
||||||
<w>ktlint</w>
|
<w>ktlint</w>
|
||||||
<w>linkified</w>
|
<w>linkified</w>
|
||||||
|
|
|
@ -17,7 +17,7 @@ Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
||||||
Build 🧱:
|
Build 🧱:
|
||||||
-
|
- F-Droid: fix the "-dev" issue in version name (#815)
|
||||||
|
|
||||||
Changes in RiotX 0.13.0 (2020-01-17)
|
Changes in RiotX 0.13.0 (2020-01-17)
|
||||||
===================================================
|
===================================================
|
||||||
|
|
|
@ -66,7 +66,8 @@ static def gitBranchName() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static def getVersionSuffix() {
|
// For Google Play build, build on any other branch than master will have a "-dev" suffix
|
||||||
|
static def getGplayVersionSuffix() {
|
||||||
if (gitBranchName() == "master") {
|
if (gitBranchName() == "master") {
|
||||||
return ""
|
return ""
|
||||||
} else {
|
} else {
|
||||||
|
@ -74,6 +75,20 @@ static def getVersionSuffix() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static def gitTag() {
|
||||||
|
def cmd = "git describe --exact-match --tags"
|
||||||
|
return cmd.execute().text.trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
// For F-Droid build, build on a not tagged commit will have a "-dev" suffix
|
||||||
|
static def getFdroidVersionSuffix() {
|
||||||
|
if (gitTag() == "") {
|
||||||
|
return "-dev"
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project.android.buildTypes.all { buildType ->
|
project.android.buildTypes.all { buildType ->
|
||||||
buildType.javaCompileOptions.annotationProcessorOptions.arguments =
|
buildType.javaCompileOptions.annotationProcessorOptions.arguments =
|
||||||
[
|
[
|
||||||
|
@ -102,8 +117,6 @@ android {
|
||||||
// Other branches (master, features, etc.) will have version code based on application version.
|
// Other branches (master, features, etc.) will have version code based on application version.
|
||||||
versionCode project.getVersionCode()
|
versionCode project.getVersionCode()
|
||||||
|
|
||||||
versionName "${versionMajor}.${versionMinor}.${versionPatch}${getVersionSuffix()}"
|
|
||||||
|
|
||||||
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
|
buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
|
||||||
resValue "string", "git_revision", "\"${gitRevision()}\""
|
resValue "string", "git_revision", "\"${gitRevision()}\""
|
||||||
|
|
||||||
|
@ -190,6 +203,8 @@ android {
|
||||||
gplay {
|
gplay {
|
||||||
dimension "store"
|
dimension "store"
|
||||||
|
|
||||||
|
versionName "${versionMajor}.${versionMinor}.${versionPatch}${getGplayVersionSuffix()}"
|
||||||
|
|
||||||
resValue "bool", "isGplay", "true"
|
resValue "bool", "isGplay", "true"
|
||||||
buildConfigField "boolean", "ALLOW_FCM_USE", "true"
|
buildConfigField "boolean", "ALLOW_FCM_USE", "true"
|
||||||
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"G\""
|
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"G\""
|
||||||
|
@ -199,6 +214,8 @@ android {
|
||||||
fdroid {
|
fdroid {
|
||||||
dimension "store"
|
dimension "store"
|
||||||
|
|
||||||
|
versionName "${versionMajor}.${versionMinor}.${versionPatch}${getFdroidVersionSuffix()}"
|
||||||
|
|
||||||
resValue "bool", "isGplay", "false"
|
resValue "bool", "isGplay", "false"
|
||||||
buildConfigField "boolean", "ALLOW_FCM_USE", "false"
|
buildConfigField "boolean", "ALLOW_FCM_USE", "false"
|
||||||
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"F\""
|
buildConfigField "String", "SHORT_FLAVOR_DESCRIPTION", "\"F\""
|
||||||
|
|
Loading…
Reference in a new issue