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: - run:
name: unit-tests name: unit-tests
command: | command: |
./gradlew :subsonic-api:test :ultrasonic:testDebugUnitTest ./gradlew :subsonic-api:test :cache:test :ultrasonic:testDebugUnitTest
./gradlew jacocoFullReport ./gradlew jacocoFullReport
bash <(curl -s https://codecov.io/bash) bash <(curl -s https://codecov.io/bash)
- run: - run:

View File

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