forked from upstream-mirrors/OpenTracks
Gradle: fix deprecations (for Gradle 9).
This commit is contained in:
+2
-20
@@ -18,29 +18,11 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def getVersionName = { ->
|
def getVersionName = { ->
|
||||||
try {
|
return 'git describe --tags'.execute().text.trim()
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def getVersionCode = { ->
|
def getVersionCode = { ->
|
||||||
try {
|
return Integer.valueOf('git rev-list HEAD --count'.execute().text.trim())
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|||||||
Reference in New Issue
Block a user