Skip to content

Commit f3d6459

Browse files
author
huxaiphaer
committed
- add test coverage to the project.
1 parent e1c49f7 commit f3d6459

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

owncloudApp/build.gradle

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'jacoco'
4+
5+
jacoco {
6+
toolVersion = "0.7.6.201602180812"
7+
}
8+
9+
tasks.withType(Test) {
10+
jacoco.includeNoLocationClasses = true
11+
}
12+
13+
14+
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
15+
16+
reports {
17+
xml.enabled = true
18+
html.enabled = true
19+
}
20+
21+
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
22+
def debugTree = fileTree(dir: "$project.buildDir/intermediates/classes/debug", excludes: fileFilter)
23+
def mainSrc = "$project.projectDir/src/main/java"
24+
25+
sourceDirectories = files([mainSrc])
26+
classDirectories = files([debugTree])
27+
28+
}
329

430
def commitSHA1 = 'COMMIT_SHA1'
531
def gitRemote = 'GIT_REMOTE'

0 commit comments

Comments
 (0)