// in ext the values are cast to Object. Ensure string values are cast as String (and not GStringImpl) for later use
def string(Object o) {
- return o.toString()
+ return o == null ? "" : o.toString()
}
compile_source_compatibility = 1.8
compile_target_compatibility = 1.8
// these are getdown.txt properties defined dependent on the JAVA_VERSION
- getdown_alt_java_min_version = getdown_alt_java8_min_version
- getdown_alt_java_max_version = getdown_alt_java8_max_version
+ getdownAltJavaMinVersion = string(findProperty("getdown_alt_java8_min_version"))
+ getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java8_max_version"))
// this property is assigned below and expanded to multiple lines in the getdown task
- getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
+ getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java8_txt_multi_java_location"))
// this property is for the Java library used in eclipse
- eclipse_java_runtime_name = string("JavaSE-1.8")
+ 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
- getdown_alt_java_min_version = getdown_alt_java11_min_version
- getdown_alt_java_max_version = getdown_alt_java11_max_version
- getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
- eclipse_java_runtime_name = string("JavaSE-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,
libDistDir = j11libDir
compile_source_compatibility = JAVA_VERSION
compile_target_compatibility = JAVA_VERSION
- getdown_alt_java_min_version = getdown_alt_java11_min_version
- getdown_alt_java_max_version = getdown_alt_java11_max_version
- getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
- eclipse_java_runtime_name = string("JavaSE-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,
// for the IDE, use java 11 compatibility
sourceCompatibility = compile_source_compatibility
targetCompatibility = compile_target_compatibility
- javaRuntimeName = eclipse_java_runtime_name
+ javaRuntimeName = eclipseJavaRuntimeName
// add in jalview project specific properties/preferences into eclipse core preferences
file {
// go through properties looking for getdown_txt_...
def props = project.properties.sort { it.key }
- if (getdown_alt_java_min_version.length() > 0) {
- props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
+ if (getdownAltJavaMinVersion != null && getdownAltJavaMinVersion.length() > 0) {
+ props.put("getdown_txt_java_min_version", getdownAltJavaMinVersion)
}
- if (getdown_alt_java_max_version.length() > 0) {
- props.put("getdown_txt_java_max_version", getdown_alt_java_max_version)
+ if (getdownAltJavaMaxVersion != null && getdownAltJavaMaxVersion.length() > 0) {
+ props.put("getdown_txt_java_max_version", getdownAltJavaMaxVersion)
+ }
+ if (getdownAltMultiJavaLocation != null && getdownAltMultiJavaLocation.length() > 0) {
+ props.put("getdown_txt_multi_java_location", getdownAltMultiJavaLocation)
}
- props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
props.put("getdown_txt_appbase", getdown_app_base)
props.each{ prop, val ->
getdown_alt_java8_max_version = 01089999
getdown_alt_java11_min_version = 11000000
getdown_alt_java11_max_version =
-getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[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
+#getdown_alt_java11_txt_multi_java_location = [windows-amd64] /getdown/jre/windows-jre11.jar,[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