1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2025-07-04 22:16:26 +00:00

Version now automatically gets set by gradle.

This commit is contained in:
2016-07-13 06:06:26 +02:00
parent 1d28470563
commit ee16af7d3c
2 changed files with 27 additions and 1 deletions

View File

@ -23,6 +23,19 @@ run {
standardInput = System.in
}
def getVersionName= { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--dirty'
standardOutput = stdout
}
return stdout.toString().trim()
}
ant.propertyfile(file: "$project.rootDir/build/resources/main/build.properties") {
entry(key: "version", value: getVersionName())
}
jar {
manifest {
attributes "Main-Class": "$mainClassName"