}
+task cloverReportHTML (type: JavaExec) {
+ inputs.dir "${buildDir}/clover"
+ outputs.dir "${reportsDir}/clover"
+
+ classpath configurations.cloverRuntime
+ main = "com.atlassian.clover.reporters.html.HtmlReporter"
+ args "--initstring", "${buildDir}/clover/clover.db",
+ "-o", "${reportsDir}/clover"
+}
+
+task cloverReportXML (type: JavaExec) {
+ inputs.dir "${buildDir}/clover"
+ outputs.dir "${reportsDir}/clover"
+
+ classpath configurations.cloverRuntime
+ main = "com.atlassian.clover.reporters.xml.XMLReporter"
+ args "--initstring", "${buildDir}/clover/clover.db",
+ "-o", "${reportsDir}/clover/clover.xml"
+}
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