JAL-3553 improve the labels in install4j's output.txt and make a versioned filename...
[jalview.git] / build.gradle
index 17407a9..c09a61e 100644 (file)
@@ -1867,8 +1867,7 @@ clean {
   }
 }
 
-
-task installers(type: com.install4j.gradle.Install4jTask) {
+task installerFiles(type: com.install4j.gradle.Install4jTask) {
   group = "distribution"
   description = "Create the install4j installers"
   dependsOn getdown
@@ -1981,6 +1980,26 @@ task installers(type: com.install4j.gradle.Install4jTask) {
   outputs.dir("${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}")
 }
 
+task copyInstallersOutputTxt {
+  dependsOn installerFiles
+
+  def install4jBuildDir = "${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}"
+  def installersOutputTxt = "${install4jBuildDir}/output.txt"
+  def installersOutputVersionTxt = "${install4jBuildDir}/output-${JALVIEW_VERSION}.txt"
+
+  inputs.file(installersOutputTxt)
+  outputs.file("${install4jBuildDir}/${installersOutputVersionTxt}")
+
+  doFirst {
+    file(installersOutputVersionTxt).write(file(installersOutputTxt).text)
+  }
+}
+
+task installers {
+  dependsOn installerFiles
+  dependsOn copyInstallersOutputTxt
+}
+
 
 spotless {
   java {