task<TestReport>("testReport") {
destinationDir = file("$buildDir/reports/allTests")
}这显然是不可取的,但在这种情况下,反对意见的信息对我来说没有意义。我现在应该怎么设置这个值呢?
/**
* Sets the directory to write the HTML report to.
*
* <strong>This method will be {@code @Deprecated} soon, please use {@link #getTestResults()} instead to access the new collection property.</strong>
*/
public void setDestinationDir(File destinationDir) {
DeprecationLogger.deprecateProperty(TestReport.class, "destinationDir").replaceWith("destinationDirectory")
.willBeRemovedInGradle8()
.withDslReference()
.nagUser();
getDestinationDirectory().set(destinationDir);
}发布于 2022-07-20 18:56:11
请像这样试试。
旧版本:
destinationDir = file("$buildDir/reports/tests/test")最新版本:
getDestinationDirectory().set(file("$buildDir/reports/tests/test"))对我起作用了。希望它对你有用。谢谢
https://stackoverflow.com/questions/71754131
复制相似问题