JAL-3349 Remove processed args from list to send to jalview
[jalview.git] / build.gradle
index 3aa4c45..2effa06 100644 (file)
@@ -594,10 +594,13 @@ task convertBuildingMD(type: Exec) {
     pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
   }
 
-  if (pandoc != null && file(pandoc).exists()) {
-    commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
-  } else {
-    commandLine "true"
+  doFirst {
+    if (pandoc != null && file(pandoc).exists()) {
+        commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
+    } else {
+        println("Cannot find pandoc. Skipping convert building.md to HTML")
+        throw new StopExecutionException()
+    }
   }
 
   ignoreExitValue true
@@ -721,7 +724,7 @@ task compileLinkCheck(type: JavaCompile) {
   outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
 }
 
-def helplinkscheckeroutputfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.out")
+def helplinkscheckertouchfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.touch")
 task linkCheck(type: JavaExec) {
   dependsOn prepare, compileLinkCheck
   classpath = files("$jalviewDir/$utilsDir")
@@ -730,12 +733,12 @@ task linkCheck(type: JavaExec) {
   def help = "$classes/$helpDir"
   args = [ "$classes/$helpDir", "-nointernet" ]
 
-  doFirst {
-    helplinkscheckeroutputfile.createNewFile()
-    standardOutput new FileOutputStream(helplinkscheckeroutputfile, false)
+  doLast {
+    helplinkscheckertouchfile.createNewFile()
   }
 
-  outputs.file(helplinkscheckeroutputfile)
+  inputs.dir("$classes/$helpDir")
+  outputs.file(helplinkscheckertouchfile)
 }
 
 task cleanPackageDir(type: Delete) {
@@ -852,7 +855,7 @@ task getdownWebsite() {
        props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
 
     props.put("getdown_txt_appbase", getdown_app_base)
-    props.each{ prop, val ->
+    props.sort().each{ prop, val ->
       if (prop.startsWith("getdown_txt_") && val != null) {
         if (prop.startsWith("getdown_txt_multi_")) {
           def key = prop.substring(18)
@@ -1139,3 +1142,5 @@ clean {
   delete install4jConf
 }
 
+
+