From 41e0150abd0df895ce6fd849accde0d7c875bb06 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 4 Apr 2022 12:01:22 +0100 Subject: [PATCH] JAL-3989 fix a build date once in build.gradle, not each time getDate() is called. --- build.gradle | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 -- 1.7.10.2