mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Gradle] Fix showing correct app version on debug builds.
This commit is contained in:
parent
23bd9b8e05
commit
113ecc0ef1
@ -56,7 +56,7 @@ android {
|
|||||||
flavorDimensions "platform"
|
flavorDimensions "platform"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
main {
|
main {
|
||||||
versionName gitInfo.versionHuman
|
versionName "${release.versionName}-${gitInfo.versionSuffix}"
|
||||||
}
|
}
|
||||||
official {}
|
official {}
|
||||||
play {}
|
play {}
|
||||||
|
@ -97,7 +97,6 @@ private def buildGitInfo() {
|
|||||||
def tag = getLastTag(repo, git, head)
|
def tag = getLastTag(repo, git, head)
|
||||||
def tagName = tag[1]
|
def tagName = tag[1]
|
||||||
def tagRevCount = tag[2]
|
def tagRevCount = tag[2]
|
||||||
def versionName = tagName.replace("v", "")
|
|
||||||
|
|
||||||
def result = [
|
def result = [
|
||||||
hash : head.objectId.name,
|
hash : head.objectId.name,
|
||||||
@ -108,7 +107,7 @@ private def buildGitInfo() {
|
|||||||
tag : tagName,
|
tag : tagName,
|
||||||
revCount : tagRevCount,
|
revCount : tagRevCount,
|
||||||
version : """$tagName-$tagRevCount-g${head.objectId.name.substring(0, 8)}""" + (dirty ? ".dirty" : ""),
|
version : """$tagName-$tagRevCount-g${head.objectId.name.substring(0, 8)}""" + (dirty ? ".dirty" : ""),
|
||||||
versionHuman: """$versionName-${repo.branch.replace("/", "_")}""" + (dirty ? ".dirty" : "")
|
versionSuffix : """${repo.branch.replace("/", "_")}""" + (dirty ? ".dirty" : "")
|
||||||
]
|
]
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user