X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=ca738599cd25ee59041f10aa36b5be9c907e40bb;hb=refs%2Fheads%2Fspike%2FJAL-3548_exampleRestServer;hp=9dae53a8901e33243eaed90a3da9829e67b7675b;hpb=699fe86b373eb59aa5e082ccfe313994204c8e34;p=jalview.git diff --git a/build.gradle b/build.gradle index 9dae53a..ca73859 100644 --- a/build.gradle +++ b/build.gradle @@ -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) +// } }