JAL-3130 This commit concentrates on the Mac OS X DMG app bundle, ensuring only one...
[jalview.git] / build.gradle
index ec8267a..4a63af9 100644 (file)
@@ -42,7 +42,10 @@ sourceSets {
 
     compileClasspath = files(sourceSets.main.java.outputDir)
     compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
-    //compileClasspath += fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"])
+    if (JAVA_VERSION.equals("1.8")) {
+      print("ADDING J11LIBS TO CLASSPATH")
+      compileClasspath += fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"])
+    }
 
     runtimeClasspath = compileClasspath
   }
@@ -87,6 +90,7 @@ compileJava {
         '--add-modules', j11modules
       ]
     }
+    print ("Setting target compatibility to "+targetCompatibility+"\n")
   }
 
 }
@@ -176,6 +180,7 @@ task syncLib(type: Sync) {
 task syncResources(type: Sync) {
   from "$jalviewDir/$resourceDir"
   include "**/*.*"
+  exclude "install4j"
   into "$jalviewDir/$classesDir"
   preserve {
     include "**"
@@ -340,24 +345,32 @@ task getdownWebsite() {
     }
     props.each{ prop, val ->
       if (prop.startsWith("getdown_txt_") && val != null) {
-        // file values rationalised
-        if (val.indexOf('/') > -1) {
-          def r = null
-          if (val.indexOf('/') == 0) {
-            // absolute path
-            r = file(val)
-          } else if (val.indexOf('/') > 0) {
-            // relative path (relative to jalviewDir)
-            r = file( jalviewDir + '/' + val )
+        if (prop.startsWith("getdown_txt_multi_")) {
+          def key = prop.substring(18)
+          val.split(",").each{ v ->
+            def line = key + " = " + v + "\n"
+            getdownTextString += line
           }
-          if (r.exists()) {
-            val = getdown_resource_dir + '/' + r.getName()
-            getdownWebsiteResourceFilenames += val
-            getdownResourceFilenames += r.getPath()
+        } else {
+          // file values rationalised
+          if (val.indexOf('/') > -1) {
+            def r = null
+            if (val.indexOf('/') == 0) {
+              // absolute path
+              r = file(val)
+            } else if (val.indexOf('/') > 0) {
+              // relative path (relative to jalviewDir)
+              r = file( jalviewDir + '/' + val )
+            }
+            if (r.exists()) {
+              val = getdown_resource_dir + '/' + r.getName()
+              getdownWebsiteResourceFilenames += val
+              getdownResourceFilenames += r.getPath()
+            }
           }
+          def line = prop.substring(12) + " = " + val + "\n"
+          getdownTextString += line
         }
-        def line = prop.substring(12) + " = " + val + "\n"
-        getdownTextString += line
       }
     }