API 文件 | 報告 |
---|
提供報告選項的物件。
作為執行一部分產生報告的任務,會透過這些方法公開這些報告的組態選項。`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"
}
- 委派至
T
,來自reports