From: Ben Soares Date: Mon, 4 Apr 2022 11:01:22 +0000 (+0100) Subject: JAL-3989 fix a build date once in build.gradle, not each time getDate() is called. X-Git-Tag: Release_2_11_2_6~64^2~23 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=41e0150abd0df895ce6fd849accde0d7c875bb06 JAL-3989 fix a build date once in build.gradle, not each time getDate() is called. --- diff --git a/build.gradle b/build.gradle index 420d37c..09efce1 100644 --- a/build.gradle +++ b/build.gradle @@ -97,6 +97,7 @@ def overrideProperties(String propsFileName, boolean output = false) { ext { jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath() jalviewDirRelativePath = jalviewDir + date = new Date() getdownChannelName = CHANNEL.toLowerCase() // default to "default". Currently only has different cosmetics for "develop", "release", "default" @@ -1054,7 +1055,6 @@ cleanTest { // format is a string like date.format("dd MMMM yyyy") def getDate(format) { - def date = new Date() return date.format(format) } @@ -2141,7 +2141,7 @@ def writeInstallersJsonFile(File installersOutputTxt, File installersSha256, Fil throw new GradleException("Required input file '${installersSha256.getPath()}' doesn't exist.") return null; } - def hash = [:] + def hash = ["channel":getdownChannelName,"date":getDate("yyyy-MM-dd HH:mm:ss")] def idHash = [:] installersOutputTxt.readLines().each { def line -> if (line.startsWith("#")) { @@ -2169,6 +2169,16 @@ def writeInstallersJsonFile(File installersOutputTxt, File installersSha256, Fil return installersJsonFile.write(new JsonBuilder(hash).toPrettyString()) } + +/* +ALSO COMPILE AND ADD IN TO THE JSON FILE INFO FOR EXECUTABLE JAR, VERSION JVL FILE, SOURCE TAR FILE +*/ + + + + + + task makeInstallersJsonFile { dependsOn installerFiles