Gradle构建+ JaCoCo覆盖率报告。
build.gradle
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'jacoco' //code coverage
repositories {
mavenLocal()
mavenCentral()
}
jacoco {
toolVersion = "0.7.5+"
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
PS已通过Gradle 2.10进行了测试
1.问题
1.1运行jacocoTestReport
任务,并出现以下错误消息:
$ gradle jacocoTestReport
输出量
* What went wrong: Execution failed for task ':jacocoTest