Merge branch 'patch/JAL-3700_JAL-3748_JAL-3763_for_2_11_1_3' into releases/Release_2_...
[jalview.git] / build.gradle
index 8e9dffd..b2e9af1 100644 (file)
@@ -94,7 +94,7 @@ ext {
   }
   ////
   // Set JALVIEW_VERSION if it is not already set
-  if (findProperty(JALVIEW_VERSION)==null || "".equals(JALVIEW_VERSION)) {
+  if (findProperty("JALVIEW_VERSION")==null || "".equals(JALVIEW_VERSION)) {
     JALVIEW_VERSION = releaseProps.get("jalview.version")
   }
   
@@ -139,7 +139,7 @@ ext {
   cloverBuildDir = "${buildDir}/clover"
   cloverInstrDir = file("${cloverBuildDir}/clover-instr")
   cloverClassesDir = file("${cloverBuildDir}/clover-classes")
-  cloverReportDir = file("${buildDir}/reports")
+  cloverReportDir = file("${buildDir}/reports/clover")
   cloverTestInstrDir = file("${cloverBuildDir}/clover-test-instr")
   cloverTestClassesDir = file("${cloverBuildDir}/clover-test-classes")
   //cloverTestClassesDir = cloverClassesDir
@@ -344,6 +344,7 @@ ext {
     //libDir = j8libDir
     libDir = j11libDir
     libDistDir = j8libDir
+    digestonlyDir = j8digestonlyDir
     compile_source_compatibility = 1.8
     compile_target_compatibility = 1.8
     // these are getdown.txt properties defined dependent on the JAVA_VERSION
@@ -357,6 +358,7 @@ ext {
     JAVA_INTEGER_VERSION = string("11")
     libDir = j11libDir
     libDistDir = j11libDir
+    digestonlyDir = j11digestonlyDir
     compile_source_compatibility = 11
     compile_target_compatibility = 11
     getdownAltJavaMinVersion = string(findProperty("getdown_alt_java11_min_version"))
@@ -645,6 +647,7 @@ eclipse {
 task cleanClover {
   doFirst {
     delete cloverBuildDir
+    delete cloverReportDir
   }
 }
 
@@ -767,7 +770,7 @@ task cloverHtmlReport(type: JavaExec) {
     file(cloverDb).exists()
   }
 
-  def cloverHtmlDir = "${cloverReportDir}/clover"
+  def cloverHtmlDir = cloverReportDir
   inputs.dir cloverClassesDir
   outputs.dir cloverHtmlDir
 
@@ -805,7 +808,7 @@ task cloverXmlReport(type: JavaExec) {
     file(cloverDb).exists()
   }
 
-  def cloverXmlFile = "${cloverReportDir}/clover/clover.xml"
+  def cloverXmlFile = "${cloverReportDir}/clover.xml"
   inputs.dir cloverClassesDir
   outputs.file cloverXmlFile
 
@@ -1344,6 +1347,16 @@ task getdownWebsite() {
       }
     }
 
+    fileTree(dir: digestonlyDir, include: ["*"]).getFiles().sort().each{f ->
+      def name = f.getName()
+      def line = "digestonly = ${getdownAppDistDir}/${name}\n"
+      getdownTextString += line
+      copy {
+        from f.getPath()
+        into getdownAppDir
+      }
+    }
+    
     // NOT USING MODULES YET, EVERYTHING SHOULD BE IN dist
     /*
     if (JAVA_VERSION.equals("11")) {
@@ -1363,7 +1376,11 @@ task getdownWebsite() {
     // getdown-launcher.jar should not be in main application class path so the main application can move it when updated.  Listed as a resource so it gets updated.
     //getdownTextString += "class = " + file(getdownLauncher).getName() + "\n"
     getdownTextString += "resource = ${getdown_launcher_new}\n"
-    getdownTextString += "class = ${mainClass}\n"
+    getdownTextString += "class = ${main_class}\n"
+    /* NOT setting these properties so that getdownappbase and getdowndistdir will default to release version
+     * getdownTextString += "jvmarg = -Dgetdowndistdir=${getdownAppDistDir}\n"
+     * getdownTextString += "jvmarg = -Dgetdownappbase=${getdownAppBase}\n"
+     */
 
     def getdown_txt = file("${getdownWebsiteDir}/getdown.txt")
     getdown_txt.write(getdownTextString)
@@ -1390,7 +1407,7 @@ task getdownWebsite() {
       copy {
         from getdown_txt
         from getdownLauncher
-        from "${getdownWebsiteDir}/${getdown_build_properties}"
+        from "${getdownAppDir}/${getdown_build_properties}"
         if (file(getdownLauncher).getName() != getdown_launcher) {
           rename(file(getdownLauncher).getName(), getdown_launcher)
         }