JAL-3553 improve the labels in install4j's output.txt and make a versioned filename...
[jalview.git] / build.gradle
index 8efe39d..c09a61e 100644 (file)
@@ -420,16 +420,16 @@ ext {
     '--add-modules', j11modules
     ]
      */
-  } else if (JAVA_VERSION.equals("12") || JAVA_VERSION.equals("13")) {
-    JAVA_INTEGER_VERSION = JAVA_VERSION
-    libDir = j11libDir
-    libDistDir = j11libDir
-    compile_source_compatibility = JAVA_VERSION
-    compile_target_compatibility = JAVA_VERSION
+  } else if (JAVA_VERSION.equals("17")) {
+    JAVA_INTEGER_VERSION = string("17")
+    libDir = j17libDir
+    libDistDir = j17libDir
+    compile_source_compatibility = 17
+    compile_target_compatibility = 17
     getdownAltJavaMinVersion = string(findProperty("getdown_alt_java11_min_version"))
     getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java11_max_version"))
     getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java11_txt_multi_java_location"))
-    eclipseJavaRuntimeName = string("JavaSE-11")
+    eclipseJavaRuntimeName = string("JavaSE-17")
     /* compile without modules -- using classpath libraries
     additional_compiler_args += [
     '--module-path', modules_compileClasspath.asPath,
@@ -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 {