Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
apply plugin: 'jacoco'
ext {
coverageSourceDirs = 'src/test/java'
}
jacoco {
toolVersion = "0.7.5.201505241946"
reportsDir = file("$buildDir/reports")
}
task jacocoTestReport(type:JacocoReport, dependsOn: "testDebugUnitTest") {
group = "Reporting"
description = "Generate Jacoco coverage reports for Debug build"
classDirectories = fileTree(
dir: "$buildDir/intermediates/classes/debug",
excludes: ['**/R.class',
'**/R$*.class',
'**/*$ViewBinder*.*',
'**/*$InjectAdapter*.*',
'**/*Injector*.*',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'**/*Activity*.*',
'**/CiMattersApplication*.*',
'android/**/*.*']
)
if (project.hasProperty("teamcity")) {
println '##teamcity[jacocoReport dataPath=\'app/build/jacoco/testDebugUnitTest.exec\' includes=\'com.vgaidarji.cimatters.*\' excludes=\'com.vgaidarji.cimatters.test.* **/*R*.* **/*Injector*.* **/*Activity*.* .*R .*CiMattersApplication .*BuildConfig .*Activity .*Test \']'
}
reports {
xml.enabled = true
html.enabled = true
}
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files("$buildDir/jacoco/testDebugUnitTest.exec")
}
tasks.withType(Test) {
testLogging {
events "passed", "skipped", "failed"
}
}