Fixes and drone build should work.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
aminecmi
2022-08-17 10:43:56 +02:00
parent 77917dd940
commit 6260c3fc06
13 changed files with 66 additions and 98 deletions

View File

@@ -1,5 +1,7 @@
import java.io.ByteArrayOutputStream
val ignoreGitVersion: String by project
plugins {
id("com.android.application")
kotlin("android")
@@ -32,11 +34,19 @@ fun gitVersion(): String {
}
fun versionCodeFromGit(): Int {
if (ignoreGitVersion == "true") {
// don't care
return 1
}
println("version code " + gitVersion())
return gitVersion().toInt()
}
fun versionNameFromGit(): String {
if (ignoreGitVersion == "true") {
// don't care
return "1"
}
println("version name " + gitVersion())
return gitVersion()
}