Skip to content

Commit

Permalink
Replace Cobertura with JaCoCo (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Nov 8, 2019
1 parent 1fe663f commit 89342c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -39,7 +39,7 @@ script:
- ./gradlew --version
- ./gradlew clean
- if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ]; then ./gradlew check; fi
- ./gradlew -Djdk.tls.client.protocols="TLSv1.2" cobertura coveralls
- ./gradlew -Djdk.tls.client.protocols="TLSv1.2" jacocoTestReport coveralls

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand Down
15 changes: 10 additions & 5 deletions build.gradle
Expand Up @@ -12,10 +12,10 @@ buildscript {
plugins {
id 'java'
id 'maven'
id 'jacoco'
id 'io.franzbecker.gradle-lombok' version '3.2.0'
id "com.diffplug.gradle.spotless" version "3.24.3"
id "net.ltgt.errorprone" version "0.8.1"
id 'net.saliman.cobertura' version '2.6.1'
id 'com.github.kt3k.coveralls' version '2.8.4'
id 'biz.aQute.bnd.builder' version '4.2.0'
}
Expand Down Expand Up @@ -132,8 +132,13 @@ spotless {
}
}

cobertura {
coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report
coverageIgnoreTrivial = true // ignore getters/setters in coverage report
coverageIgnoreMethodAnnotations = ["java.lang.Deprecated", "lombok.Generated"]
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}

coveralls {
jacocoReportPath 'build/reports/jacoco/test/jacocoTestReport.xml'
}

0 comments on commit 89342c3

Please sign in to comment.