1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-23 03:54:49 +02:00

Add jacoco

This commit is contained in:
Paul Schaub 2018-07-24 13:00:57 +02:00
parent 528048e4df
commit 9b68ee67d9
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -22,6 +22,7 @@ allprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
// animalsniffer
@ -75,6 +76,19 @@ allprojects {
'git tag --points-at HEAD'.execute().text.trim())
}
jacoco {
toolVersion = "0.8.1"
}
jacocoTestReport {
dependsOn test
sourceDirectories = project.files(sourceSets.main.allSource.srcDirs)
classDirectories = project.files(sourceSets.main.output)
reports {
xml.enabled true
}
}
}
subprojects {
@ -199,6 +213,20 @@ def getGitCommit() {
gitCommit
}
/*
task jacocoRootReport(type: JacocoReport) {
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
// We could remove the following setOnlyIf line, but then
// jacocoRootReport would silently be SKIPPED if something with
// the projectsWithUnitTests is wrong (e.g. a project is missing
// in there).
setOnlyIf { true }
}
*/
task javadocAll(type: Javadoc) {
source subprojects.collect {project ->
project.sourceSets.main.allJava }