Gradle 1.4 有新的测试报告聚合任务: http ://www.gradle.org/docs/current/release-notes#stand-alone-test-report-task
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/all-tests")
reportOn subprojects*.test
}
即使构建失败,有没有办法让这个任务运行?目前,如果我这样做:
taskReport.dependsOn test
build.dependsOn taskReport
它仅在构建成功时执行。