JAL-3210 adjustment to build.gradle, gradle.properties to look for net.sf.j2s.core...
authorsoares <bsoares@dundee.ac.uk>
Tue, 24 Mar 2020 15:32:14 +0000 (15:32 +0000)
committersoares <bsoares@dundee.ac.uk>
Tue, 24 Mar 2020 15:32:14 +0000 (15:32 +0000)
build.gradle
gradle.properties

index e6a9c34..d72ff43 100644 (file)
@@ -332,10 +332,19 @@ ext {
   jalviewjsJ2sSettingsFileName = string("${jalviewDir}/${jalviewjs_j2s_settings}")
   jalviewjsJ2sProps = null
 
+  eclipseJavaVersion = "55"
+  jalviewjsJ2sPlugin = jalviewjs_j2s_plugin
+  if (IN_ECLIPSE) {
+    def eclipseJavaVersion = System.property["java.class.version"]
+    if (Float.parseFloat(eclipseJavaVersion) >= 55 && file(jalviewjs_j2s_plugin_j11).exists()) { // 55 is Java 11
+      jalviewjsJ2sPlugin = jalviewjs_j2s_plugin_j11
+    }
+  }
   eclipseWorkspace = null
   eclipseBinary = string("")
   eclipseVersion = string("")
   eclipseDebug = false
+  eclipseJavaVersion = string("")
   // ENDEXT
 }
 
@@ -1575,6 +1584,15 @@ task jalviewjsEclipsePaths {
 }
 
 
+task printProperties {
+  group "Debug"
+  description "Output to console all System.properties"
+  doFirst {
+    System.properties.each { key, val -> System.out.println("Property: ${key}=${val}") }
+  }
+}
+
+
 task eclipseSetup {
   dependsOn eclipseProject
   dependsOn eclipseClasspath
@@ -1587,7 +1605,7 @@ task jalviewjsEclipseCopyDropins(type: Copy) {
   dependsOn jalviewjsEclipsePaths
 
   def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_eclipse_dropins_dir}", include: "*.jar")
-  inputFiles += file("${jalviewDir}/${jalviewjs_j2s_plugin}")
+  inputFiles += file("${jalviewDir}/${jalviewjsJ2sPlugin}")
   def outputDir = "${jalviewDir}/${jalviewjsBuildDir}/${jalviewjs_eclipse_tmp_dropins_dir}"
 
   from inputFiles
@@ -2325,7 +2343,7 @@ task jalviewjsIDE_checkJ2sPlugin {
   description "Compare the swingjs/net.sf.j2s.core.jar file with the Eclipse IDE's plugin version (found in the 'dropins' dir)"
 
   doFirst {
-    def j2sPlugin = string("${jalviewDir}/${jalviewjs_j2s_plugin}")
+    def j2sPlugin = string("${jalviewDir}/${jalviewjsJ2sPlugin}")
     def j2sPluginFile = file(j2sPlugin)
     def copyPlugin = jalviewjs_eclipseIDE_auto_copy_j2s_plugin == "true"
     def eclipseHome = System.properties["eclipse.home.location"]
@@ -2349,7 +2367,7 @@ task jalviewjsIDE_checkJ2sPlugin {
     digest.update(j2sPluginFile.text.bytes)
     def j2sPluginMd5 = new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0')
 
-    digest.update(eclipseJ2sPluginFile.text.bytes)
+    //digest.update(eclipseJ2sPluginFile.text.bytes)
     def eclipseJ2sPluginMd5 = new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0')
      
     if (j2sPluginMd5 != eclipseJ2sPluginMd5) {
index 42391fe..5f57910 100644 (file)
@@ -156,6 +156,7 @@ jalviewjs_eclipse_root = ~/buildtools/eclipse/jee-2019-09
 jalviewjs_eclipse_dropins_dir = utils/jalviewjs/eclipse/dropins
 jalviewjs_swingjs_zip = swingjs/SwingJS-site.zip
 jalviewjs_j2s_plugin = swingjs/net.sf.j2s.core.jar
+jalviewjs_j2s_plugin_j11 = swingjs/net.sf.j2s.core-j11.jar
 jalviewjs_libjs_dir = utils/jalviewjs/libjs
 jalviewjs_site_resource_dir = utils/jalviewjs/site-resources
 jalviewjs_classlists_dir = utils/jalviewjs/classlists