From 11a678ebefffbce96e1373574ac912c4a7bd5785 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 24 Apr 2019 16:44:04 +0100 Subject: [PATCH] JAL-1929 JAL-3224 java 8 and java 11 specific getdown jre sets --- build.gradle | 11 +++++++++-- gradle.properties | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index d28807b..577d616 100644 --- a/build.gradle +++ b/build.gradle @@ -42,19 +42,24 @@ def libDistDir def compile_source_compatibility def compile_target_compatibility def additional_compiler_args = [] +// these are getdown.txt properties defined dependent on the JAVA_VERSION def getdown_alt_java_min_version +// this property is assigned below and expanded to multiple lines in the getdown task +def getdown_alt_multi_java_location if (JAVA_VERSION.equals("1.8")) { libDir = j11libDir libDistDir = j8libDir compile_source_compatibility = 1.8 compile_target_compatibility = 1.8 getdown_alt_java_min_version = getdown_alt_java8_min_version + getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location } else if (JAVA_VERSION.equals("11")) { libDir = j11libDir libDistDir = j11libDir compile_source_compatibility = 11 compile_target_compatibility = 11 getdown_alt_java_min_version = getdown_alt_java11_min_version + getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location additional_compiler_args += [ '--module-path', file("$jalviewDir/$j11modDir").getAbsolutePath(), '--add-modules', j11modules @@ -484,6 +489,8 @@ task getdownWebsite() { // go through properties looking for getdown_txt_... def props = project.properties.sort { it.key } props.put("getdown_txt_java_min_version", getdown_alt_java_min_version) + props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location) + props.put("getdown_txt_appbase", getdown_app_base) props.each{ prop, val -> if (prop.startsWith("getdown_txt_") && val != null) { @@ -664,13 +671,13 @@ task installers(type: com.install4j.gradle.Install4jTask) { projectFile = file(install4jConf) println("Using projectFile "+projectFile) variables = [majorVersion: version.substring(2, 11), build: 001] - destination = "$jalviewDir/$install4jBuildDir" + destination = "$jalviewDir/$install4jBuildDir/$JAVA_VERSION" buildSelected = true inputs.dir(project.ext.getdownWebsiteDir) inputs.file(install4jConf) inputs.dir(macosJavaVMDir) inputs.dir(windowsJavaVMDir) - outputs.dir("$jalviewDir/$install4jBuildDir") + outputs.dir("$jalviewDir/$install4jBuildDir/$JAVA_VERSION") } clean { diff --git a/gradle.properties b/gradle.properties index 690f529..f8da717 100644 --- a/gradle.properties +++ b/gradle.properties @@ -78,7 +78,8 @@ getdown_txt_ui.install_error = http://www.jalview.org/download/error getdown_txt_ui.mac_dock_icon = resources/images/jalview_logos.ico getdown_alt_java8_min_version = 01080000 getdown_alt_java11_min_version = 11000000 -getdown_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.tgz,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz +getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.tgz,[linux-amd64] /getdown/jre/linux-jre11.tgz,[mac os x] /getdown/jre/macos-jre11.tgz +getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre1.8.tgz,[linux-amd64] /getdown/jre/linux-jre1.8.tgz,[mac os x] /getdown/jre/macos-jre1.8.tgz JRE_installs = /Users/bsoares/Java/installs Windows_JRE8 = OpenJDK8U-jdk_x64_windows_hotspot_8u202b08/jdk8u202-b08 Mac_JRE8 = OpenJDK8U-jre_x64_mac_hotspot_8u202b08/jdk8u202-b08-jre/Contents/Home -- 1.7.10.2