JAL-3548 start an http server for posting gene ids to retrieve from ensembl and displ...
[jalview.git] / build.gradle
index 9dae53a..ca73859 100644 (file)
@@ -569,25 +569,43 @@ task cloverInstr() {
 }
 
 
+task cloverReportHTML (type: JavaExec) {
+    inputs.dir "${buildDir}/clover"
+    outputs.dir "${reportsDir}/clover"
+
+    classpath configurations.cloverRuntime
+    maxHeapSize "${cloverReportJVMHeap}"
+    jvmArgs += "${cloverReportJVMArgs}"
+    main = "com.atlassian.clover.reporters.html.HtmlReporter"
+    args  "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover"
+    "${cloverReportHTMLOptions}".split(",").each {
+      args+= it.trim()
+      }
+}
+
+task cloverReportXML (type: JavaExec) {
+    inputs.dir "${buildDir}/clover"
+    outputs.dir "${reportsDir}/clover"
+    maxHeapSize "${cloverReportJVMHeap}"
+    jvmArgs "${cloverReportJVMArgs}"
+    classpath configurations.cloverRuntime
+    main = "com.atlassian.clover.reporters.xml.XMLReporter"
+    args  "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover/clover.xml"
+    
+    "${cloverReportXMLOptions}".split(",").each {
+      args+= it.trim()
+      }
+}
 task cloverReport {
   group = "Verification"
-    description = "Createst the Clover report"
+    description = "Creates the Clover report"
     inputs.dir "${buildDir}/clover"
     outputs.dir "${reportsDir}/clover"
     onlyIf {
       file("${buildDir}/clover/clover.db").exists()
     }
-  doFirst {
-    def argsList = ["--initstring", "${buildDir}/clover/clover.db",
-    "-o", "${reportsDir}/clover"]
-    String[] args = argsList.toArray()
-    com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
-
-    // and generate ${reportsDir}/clover/clover.xml
-    args = ["--initstring", "${buildDir}/clover/clover.db",
-    "-o", "${reportsDir}/clover/clover.xml"].toArray()
-    com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
-  }
+    dependsOn cloverReportXML
+    dependsOn cloverReportHTML
 }
 // end clover bits
 
@@ -1387,33 +1405,47 @@ task sourceDist(type: Tar) {
   
   into project.name
 
-  def EXCLUDE_FILES=["build/*","bin/*","test-output/","test-reports","tests","clover*/*"
-  ,".*"
-  ,"benchmarking/*"
-  ,"**/.*"
-  ,"*.class"
-  ,"**/*.class","${j11modDir}/**/*.jar","appletlib","**/*locales"
-  ,"*locales/**",
-  ,"utils/InstallAnywhere"] 
-  def PROCESS_FILES=[   "AUTHORS",
-  "CITATION",
-  "FEATURETODO",
-  "JAVA-11-README",
-  "FEATURETODO",
-  "LICENSE",
-  "**/README",
-  "RELEASE",
-  "THIRDPARTYLIBS","TESTNG",
-  "build.gradle",
-  "gradle.properties",
-  "**/*.java",
-  "**/*.html",
-  "**/*.xml",
-  "**/*.gradle",
-  "**/*.groovy",
-  "**/*.properties",
-  "**/*.perl",
-  "**/*.sh"]
+  def EXCLUDE_FILES=[
+    "build/*",
+    "bin/*",
+    "test-output/",
+    "test-reports",
+    "tests",
+    "clover*/*",
+    ".*",
+    "benchmarking/*",
+    "**/.*",
+    "*.class",
+    "**/*.class","$j11modDir/**/*.jar","appletlib","**/*locales",
+    "*locales/**",
+    "utils/InstallAnywhere",
+    "**/*.log",
+  ] 
+  def PROCESS_FILES=[
+    "AUTHORS",
+    "CITATION",
+    "FEATURETODO",
+    "JAVA-11-README",
+    "FEATURETODO",
+    "LICENSE",
+    "**/README",
+    "RELEASE",
+    "THIRDPARTYLIBS",
+    "TESTNG",
+    "build.gradle",
+    "gradle.properties",
+    "**/*.java",
+    "**/*.html",
+    "**/*.xml",
+    "**/*.gradle",
+    "**/*.groovy",
+    "**/*.properties",
+    "**/*.perl",
+    "**/*.sh",
+  ]
+  def INCLUDE_FILES=[
+    ".settings/org.eclipse.jdt.core.jalview.prefs",
+  ]
 
   from(jalviewDir) {
     exclude (EXCLUDE_FILES)
@@ -1439,14 +1471,17 @@ task sourceDist(type: Tar) {
     exclude (getdown_website_dir)
 
     // exluding these as not using jars as modules yet
-    exclude ("${j11modDir}/**/*.jar")
-  }
-  //  from (jalviewDir) {
-  //    // explicit includes for stuff that seemed to not get included
-  //    include(fileTree("test/**/*."))
-  //    exclude(EXCLUDE_FILES)
-  //    exclude(PROCESS_FILES)
-  //  }
+    exclude ("$j11modDir/**/*.jar")
+  }
+  from(jalviewDir) {
+    include(INCLUDE_FILES)
+  }
+//  from (jalviewDir) {
+//    // explicit includes for stuff that seemed to not get included
+//    include(fileTree("test/**/*."))
+//    exclude(EXCLUDE_FILES)
+//    exclude(PROCESS_FILES)
+//  }
 }