Gradle 指定渐变报告目录

Gradle 指定渐变报告目录,gradle,Gradle,我有几个文件夹试图将我的测试分为单元测试、集成测试、第三方测试和数据库测试。通过这种方式,我可以将测试分为多个部分,以使TDD更容易/更快。这是我正在尝试使用的任务 task integrationTest(type: Test) { testClassesDir = sourceSets.integration.output.classesDir classpath = sourceSets.integration.runtimeClasspath maxParalle

我有几个文件夹试图将我的测试分为单元测试、集成测试、第三方测试和数据库测试。通过这种方式,我可以将测试分为多个部分,以使TDD更容易/更快。这是我正在尝试使用的任务

task integrationTest(type: Test) {
    testClassesDir = sourceSets.integration.output.classesDir
    classpath = sourceSets.integration.runtimeClasspath
    maxParallelForks 8
    maxHeapSize = "4048m"
}
我知道有,但它已经被弃用了。我希望能够使用新方法

我尝试了以下关闭:

reports {
    html = file("$buildDir/reports/intTests")
}

reports {
    setDestination = file("$buildDir/reports/intTests")
}

reports {
    destinationDir = file("$buildDir/reports/intTests")
}

destinationDir = file("$buildDir/reports/intTests")

也许您可以实现类似于的类型的自己的任务。请注意,该功能正在酝酿中。

我想您需要

integrationTest.reports.html.destination = file("$buildDir/reports/intTests")
您可能需要查阅for
TestTaskReports
,它显示html报告是一个扩展的
configurableport
目录报告,并且提供了上面一行中提到的访问器