JAL-3111 report time when Jalview was built (consider making this a conditional)
authorJim Procter <jprocter@issues.jalview.org>
Fri, 14 Jun 2019 15:43:21 +0000 (16:43 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 14 Jun 2019 15:43:21 +0000 (16:43 +0100)
build.gradle

index 3876753..9f00d2b 100644 (file)
@@ -419,9 +419,9 @@ cleanTest {
   delete cloverInstrDir
 }
 
+// format is a string like date.format("dd MMMM yyyy")
 def getDate(format) {
   def date = new Date()
-  //return date.format("dd MMMM yyyy")
   return date.format(format)
 }
 
@@ -453,9 +453,9 @@ task createBuildProperties(type: WriteProperties) {
   inputs.dir("$jalviewDir/$resourceDir")
   outputFile "$classes/$buildPropertiesFile"
   // taking time specific comment out to allow better incremental builds
-  //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
-  comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
-  property "BUILD_DATE", getDate("dd MMMM yyyy")
+  comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
+  //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
+  property "BUILD_DATE", getDate("HH:mm:ss dd MMMM yyyy")
   property "VERSION", JALVIEW_VERSION
   property "INSTALLATION", INSTALLATION+" git-commit:"+project.ext.gitHash+" ["+project.ext.gitBranch+"]"
   outputs.file(outputFile)