您的位置:首页 > 其它

Gradle Jacoco插件exclude配置

2015-11-03 21:55 225 查看
官方的exclude配置并不能起作用,参考:
https://issues.gradle.org/browse/GRADLE-2955

http://stackoverflow.com/questions/29887805/filter-jacoco-coverage-reports-with-gradle
apply plugin: 'java'
apply plugin: 'jacoco'

jacocoTestReport {
reports {
xml {
enabled true // coveralls plugin depends on xml format report
}

html {
enabled true
}
}

afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['codeeval/**',
'crackingthecode/part3knowledgebased/**',
'**/Chapter7ObjectOrientedDesign**',
'**/Chapter11Testing**',
'**/Chapter12SystemDesignAndMemoryLimits**',
'projecteuler/**'])
})
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: