forked from hidroh/materialistic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jacoco.gradle
30 lines (26 loc) · 1020 Bytes
/
jacoco.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
task jacocoTestReport(type: JacocoReport) {
reports {
xml.enabled true
csv.enabled false
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
html.destination file("${buildDir}/reports/coverage")
}
classDirectories.from = fileTree(
dir: "${buildDir}",
include: [
'**/intermediates/javac/debug/classes/**/*.class',
'**/tmp/kotlin-classes/debug/**/*.class'
])
sourceDirectories.from = files android.sourceSets.main.java.srcDirs
executionData.from = files "${buildDir}/jacoco/testDebugUnitTest.exec"
doLast {
println "coveralls report has been generated to file://${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
println "jacoco report has been generated to file://${reports.html.destination}/index.html"
}
}
coveralls {
saveAsFile = true
sendToCoveralls = false
}