| API 文档 | Reporting |
|---|
| 已知子类型 |
|
|---|
一个提供报告选项的对象。
在执行过程中生成报告的任务通过这些方法公开其报告的配置选项。`Reporting` 接口是参数化的,其中参数表示所公开的报告容器的具体类型。报告容器的具体类型表示可用的不同报告类型。
例如,给定一个任务,例如
class MyTask implements Reporting<MyReportContainer> { // implementation } interface MyReportContainer extends ReportContainer<Report> { Report getHtml(); Report getCsv(); }
此类任务的报告方面可以这样配置
task my(type: MyTask) {
reports {
html.required = true
csv.required = false
}
}
有关报告类型和选项的信息,请参阅该任务特定 `ReportContainer` 类型的文档。
| 属性 | 描述 |
报告 | 一个 |
| 方法 | 描述 |
报告(configureAction) | 允许通过闭包配置报告容器。 |
| 块 | 描述 |
报告 | 允许通过闭包配置报告容器。 |
T reports(Action<? super T> configureAction)
Action<? super T>允许通过闭包配置报告容器。
reports {
html {
required false
}
xml.outputLocation = "build/reports/myReport.xml"
}
允许通过闭包配置报告容器。
reports {
html {
required false
}
xml.outputLocation = "build/reports/myReport.xml"
}
- 委托给
T来自reports