From 522580dd0ebe108991362450bd440e9003295dfa Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 7 Aug 2015 18:02:31 -0700 Subject: [PATCH] Add coveralls support --- .travis.yml | 3 +++ all/build.gradle | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.travis.yml b/.travis.yml index fa3c759993..ef2fd49353 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,9 @@ before_install: before_script: - test -z "$(git status --porcelain)" || (git status && echo Error Working directory is not clean. Forget to commit generated files? && false) +after_success: + - ./gradlew :grpc-all:coveralls + jdk: - oraclejdk8 diff --git a/all/build.gradle b/all/build.gradle index 289e18d6ba..f955e2643b 100644 --- a/all/build.gradle +++ b/all/build.gradle @@ -1,5 +1,16 @@ +apply plugin: 'com.github.kt3k.coveralls' + description = "gRPC: All" +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' + } +} + // Make sure that no transitive dependencies are included. configurations.compile.transitive = false @@ -55,8 +66,20 @@ task jacocoMerge(type: JacocoMerge) { jacocoTestReport { dependsOn(jacocoMerge) + reports { + xml.enabled = true + html.enabled = true + } additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs) sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs) classDirectories = files(subprojects.sourceSets.main.output) } + +coveralls { + sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten() +} + +tasks.coveralls { + dependsOn(jacocoTestReport) +}