Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Generate code coverage report and submit to coveralls (#1851)
Browse files Browse the repository at this point in the history
* Updade build.gradle to use com.github.kt3k.coveralls plugin to submit the jacoco report to coveralls.
* In .travis.yml, run coveralls task after success.
  • Loading branch information
pasin committed Feb 2, 2019
1 parent ed0e072 commit cb2709b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ before_script:
- adb shell input keyevent 82 &
script:
- cd android && touch local.properties
- ./gradlew connectedAndroidTest --console=plain --info --full-stacktrace
- ./gradlew connectedAndroidTest --console=plain --info
after_success:
- ./gradlew coveralls
10 changes: 10 additions & 0 deletions android/CouchbaseLite/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'com.github.kt3k.coveralls'

// NOTE: moved from project build.gradle to make CBL compilable as sub-module of application
buildscript {
Expand All @@ -31,6 +32,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
}
}

Expand Down Expand Up @@ -196,6 +198,14 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}

// ----------------------------------------------------------------
// Coveralls
// ----------------------------------------------------------------

coveralls {
jacocoReportPath = "${buildDir}/reports/coverage/debug/report.xml"
}

// ----------------------------------------------------------------
// Deployment
// ----------------------------------------------------------------
Expand Down

0 comments on commit cb2709b

Please sign in to comment.