mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 11:27:57 +01:00
Add jacoco
This commit is contained in:
parent
528048e4df
commit
9b68ee67d9
1 changed files with 28 additions and 0 deletions
28
build.gradle
28
build.gradle
|
@ -22,6 +22,7 @@ allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
apply plugin: 'jacoco'
|
||||||
apply plugin: 'checkstyle'
|
apply plugin: 'checkstyle'
|
||||||
|
|
||||||
// animalsniffer
|
// animalsniffer
|
||||||
|
@ -75,6 +76,19 @@ allprojects {
|
||||||
'git tag --points-at HEAD'.execute().text.trim())
|
'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 {
|
subprojects {
|
||||||
|
@ -199,6 +213,20 @@ def getGitCommit() {
|
||||||
gitCommit
|
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) {
|
task javadocAll(type: Javadoc) {
|
||||||
source subprojects.collect {project ->
|
source subprojects.collect {project ->
|
||||||
project.sourceSets.main.allJava }
|
project.sourceSets.main.allJava }
|
||||||
|
|
Loading…
Reference in a new issue