From 89342c35732278d77ee0e34bd2bf1883bd2bc2ac Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Thu, 7 Nov 2019 17:59:29 -0800 Subject: [PATCH] Replace Cobertura with JaCoCo (#891) --- .travis.yml | 2 +- build.gradle | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9cbc3f0eaf1..0b09dbdeab2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/build.gradle b/build.gradle index acc7ccfbf9c..efbfdb5a360 100644 --- a/build.gradle +++ b/build.gradle @@ -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' } @@ -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' }