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:
13
build.gradle
13
build.gradle
@ -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"
|
||||
|
Reference in New Issue
Block a user