mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Gradle: fix deprecations (for Gradle 9).
This commit is contained in:
+2
-20
@@ -18,29 +18,11 @@ allprojects {
|
||||
}
|
||||
|
||||
def getVersionName = { ->
|
||||
try {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'describe', '--tags'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
} catch (ignored) {
|
||||
throw new GradleException('VersionName could not be read:' + ignored.message)
|
||||
}
|
||||
return 'git describe --tags'.execute().text.trim()
|
||||
}
|
||||
|
||||
def getVersionCode = { ->
|
||||
try {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-list', 'HEAD', '--count'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return Integer.valueOf(stdout.toString().trim())
|
||||
} catch (ignored) {
|
||||
throw new GradleException('VersionCode could not be read:' + ignored.message)
|
||||
}
|
||||
return Integer.valueOf('git rev-list HEAD --count'.execute().text.trim())
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
Reference in New Issue
Block a user