Added cache module to code coverage reports.

Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
Yahor Berdnikau 2018-03-11 11:52:24 +01:00
parent c49e447240
commit 1e806e3658
2 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,7 @@ jobs:
- run:
name: unit-tests
command: |
./gradlew :subsonic-api:test :ultrasonic:testDebugUnitTest
./gradlew :subsonic-api:test :cache:test :ultrasonic:testDebugUnitTest
./gradlew jacocoFullReport
bash <(curl -s https://codecov.io/bash)
- run:

View File

@ -6,9 +6,11 @@ task jacocoMergeReports(type: JacocoMerge) {
def subsonicApi = project.findProject("subsonic-api")
def ultrasonicApp = project.findProject("ultrasonic")
def cache = project.findProject("cache")
executionData(
"${subsonicApi.buildDir}/jacoco/test.exec",
"${ultrasonicApp.buildDir}/jacoco/testDebugUnitTest.exec",
"${cache.buildDir}/jacoco/test.exec"
)
destinationFile(file("${project.buildDir}/jacoco/jacoco.exec"))
}
@ -20,6 +22,7 @@ def createJacocoFullReportTask() {
def subsonicApi = project.findProject("subsonic-api")
def ultrasonicApp = project.findProject("ultrasonic")
def cache = project.findProject("cache")
classDirectories = files(
fileTree(
@ -29,6 +32,10 @@ def createJacocoFullReportTask() {
fileTree(
dir: "${ultrasonicApp.buildDir}/intermediates/classes/debug/org",
excludes: ultrasonicApp.jacocoExclude
),
fileTree(
dir: "${cache.buildDir}/classes/kotlin/main",
excludes: cache.jacocoExclude
)
)
sourceDirectories = files(subsonicApi.sourceSets.main.getAllSource(),