additional_compiler_args = []
// configure classpath/args for j8/j11 compilation
- if (JAVA_VERSION.equals("1.8")) {
- JAVA_INTEGER_VERSION = string("8")
- //libDir = j8libDir
+
+
+ if (JAVA_VERSION in [ "1.8", "8", "11", "17", "21" ]) {
+ if (JAVA_VERSION.equals("8")) {
+ JAVA_VERSION = "1.8"
+ }
+ JAVA_INTEGER_VERSION = JAVA_VERSION.equals("1.8") ? 8 : JAVA_VERSION as Integer
libDir = j11libDir
- libDistDir = j8libDir
- compile_source_compatibility = 1.8
- compile_target_compatibility = 1.8
+ libDistDir = JAVA_INTEGER_VERSION == 8 ? j8libDir : j11libDir
+ compile_source_compatibility = JAVA_VERSION
+ compile_target_compatibility = JAVA_VERSION
// these are getdown.txt properties defined dependent on the JAVA_VERSION
- getdownAltJavaMinVersion = string(findProperty("getdown_alt_java8_min_version"))
- getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java8_max_version"))
+ getdownAltJavaMinVersion = JAVA_INTEGER_VERSION == 8 ? "01080000" : string(JAVA_INTEGER_VERSION * 1000000)
+ getdownAltJavaMaxVersion = JAVA_INTEGER_VERSION == 8 ? "01089999" : string(JAVA_INTEGER_VERSION * 1000000 + 999999)
// this property is assigned below and expanded to multiple lines in the getdown task
- getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java8_txt_multi_java_location"))
+ getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java${JAVA_INTEGER_VERSION}_txt_multi_java_location"))
// this property is for the Java library used in eclipse
- eclipseJavaRuntimeName = string("JavaSE-1.8")
- } else if (JAVA_VERSION.equals("11")) {
- JAVA_INTEGER_VERSION = string("11")
- libDir = j11libDir
- libDistDir = j11libDir
- compile_source_compatibility = 11
- compile_target_compatibility = 11
- 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")
- /* compile without modules -- using classpath libraries
- additional_compiler_args += [
- '--module-path', modules_compileClasspath.asPath,
- '--add-modules', j11modules
- ]
- */
- } else if (JAVA_VERSION.equals("17")) {
- JAVA_INTEGER_VERSION = string("17")
- libDir = j11libDir
- libDistDir = j11libDir
- compile_source_compatibility = 17
- compile_target_compatibility = 17
- getdownAltJavaMinVersion = string(findProperty("getdown_alt_java17_min_version"))
- getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java17_max_version"))
- getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java11_txt_multi_java_location"))
- eclipseJavaRuntimeName = string("JavaSE-17")
+ eclipseJavaRuntimeName = string("JavaSE-${JAVA_VERSION}")
/* compile without modules -- using classpath libraries
additional_compiler_args += [
'--module-path', modules_compileClasspath.asPath,
]
*/
} else {
- throw new GradleException("JAVA_VERSION=${JAVA_VERSION} not currently supported by Jalview")
+ throw new GradleException("JAVA_VERSION=${JAVA_VERSION} not currently supported by Jalview build")
}
getdown_txt_ui.status = 20, 380, 600, 58
getdown_txt_ui.status_text = 000066
getdown_txt_ui.install_error = https://www.jalview.org/faq/getdownerror
-getdown_alt_java8_min_version = 01080000
-getdown_alt_java8_max_version = 01089999
-getdown_alt_java11_min_version = 11000000
-getdown_alt_java11_max_version = 11999999
-getdown_alt_java17_min_version = 17000000
-getdown_alt_java17_max_version = 17999999
#getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/jre-11-windows-x64.zip,[linux-amd64] /getdown/jre/jre-11-linux-x64.zip,[mac os x] /getdown/jre/jre-11-mac-x64.zip
#getdown_alt_java8_txt_multi_java_location = [windows-amd64] /getdown/jre/jre-8-windows-x64.zip,[linux-amd64] /getdown/jre/jre-8-linux-x64.zip,[mac os x] /getdown/jre/jre-8-mac-x64.zip
jre_installs_dir = ~/buildtools/jre