We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef870d commit 08f6badCopy full SHA for 08f6bad
build.gradle
@@ -104,5 +104,10 @@ ext.getGitLastCommitMessage = providers.exec {
104
static String getBuildDate() {
105
final SimpleDateFormat RFC3339_LIKE = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
106
RFC3339_LIKE.setTimeZone(TimeZone.getTimeZone("UTC"))
107
- return RFC3339_LIKE.format(new Date())
+ Date buildDate = new Date()
108
+
109
+ // https://reproducible-builds.org/docs/source-date-epoch/
110
+ try { buildDate = new Date(Long.parseLong(System.getenv('SOURCE_DATE_EPOCH')) * 1000) } catch(Exception ignore) {}
111
112
+ return RFC3339_LIKE.format(buildDate)
113
}
0 commit comments