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
类型的文档。
属性 | 描述 |
reports | 一个 |
方法 | 描述 |
reports(configureAction) | 允许通过闭包配置报告容器。 |
块 | 描述 |
reports | 允许通过闭包配置报告容器。 |
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"
}
- 委托给
- 来自
reports
的T