Skip to content

Commit

Permalink
Fixed coveralls build, see spotbugs#308
Browse files Browse the repository at this point in the history
The coverage was executed also on test code, and tests contained
duplicated classes (which is OK), but this shoked jacoco build. We
should not run coverage on test code, it does not make any sense.
  • Loading branch information
iloveeclipse authored and KengoTODA committed Aug 9, 2017
1 parent 7e8aa8f commit da05d9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ task jacocoRootReport(type: JacocoReport) {

executionData project(':spotbugs').file('build/jacoco/test.exec')
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)

// Only enable class directories related to non-test project
classDirectories = files(subprojects.sourceSets.main.output).filter {
!it.toString().contains("test") && !it.toString().contains("Test") && !it.toString().contains("junit")
}

reports {
xml.enabled = true
Expand Down
2 changes: 1 addition & 1 deletion gradle/jacoco.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: "jacoco"

jacoco {
toolVersion = "0.7.8"
toolVersion = "0.7.9"
}

jacocoTestReport {
Expand Down

0 comments on commit da05d9f

Please sign in to comment.