mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +01:00
Add getDatestamp() to build.gradle
This commit is contained in:
parent
59527d320d
commit
494f7d5b34
1 changed files with 9 additions and 1 deletions
10
build.gradle
10
build.gradle
|
@ -37,7 +37,7 @@ allprojects {
|
|||
// For example 4.0.0-rc1 becomes 4.0.0.rc1, but
|
||||
// 4.0.0-SNAPSHOT-2014-05-01 becomes 4.0.0.SNAPSHOT-2014-05-01
|
||||
'Bundle-Version': version.replaceFirst("-", "."),
|
||||
'Built-Date': new Date(),
|
||||
'Built-Date': getDatestamp(),
|
||||
'Built-JDK': System.getProperty('java.version'),
|
||||
'Built-Gradle': gradle.gradleVersion,
|
||||
'Built-By': System.getProperty('user.name')
|
||||
|
@ -237,3 +237,11 @@ def getGitCommit() {
|
|||
assert !gitCommit.isEmpty()
|
||||
gitCommit
|
||||
}
|
||||
|
||||
// Returns only the date in yyyy-MM-dd format, as otherwise, with
|
||||
// hh:mm:ss information, the manifest files would change with every
|
||||
// build, causing unnecessary rebuilds.
|
||||
def getDatestamp() {
|
||||
def date = new Date()
|
||||
return date.format('yyyy-MM-dd')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue