產生 HTML 依賴報告。此報告結合了 ASCII 依賴報告和 ASCII 依賴深入分析報告的功能。對於給定的專案,它會產生每個組態的依賴樹狀結構,並且可以點擊每個依賴項以顯示此依賴項的深入分析。
此任務預設會為任務的包含專案產生報告。但是,它也可以透過設定 projects
屬性的值,為多個專案產生報告。以下是如何為多專案建置的所有專案產生 HTML 依賴報告的範例
htmlDependencyReport { projects = project.allprojects }
報告預設會在 build/reports/project/dependencies
目錄中產生。這也可以透過設定 reports.html.destination
屬性來變更
htmlDependencyReport {
reports.html.outputLocation = file("build/reports/project/dependencies")
}
屬性 | 描述 |
outputFile | 報告將寫入的檔案。當設定為 |
projects | 要為其產生此報告的專案集合。預設情況下,報告是為任務的包含專案產生的。 |
reports |
|
方法 | 描述 |
reports(configureAction) | 允許透過閉包設定報告容器。 |
File
outputFile
報告將寫入的檔案。當設定為 null
時,報告會寫入 System.out
。預設為 null
。
T
reports
(Action
<? super T
>
configureAction)
Action
<? super T
>允許透過閉包設定報告容器。
reports {
html {
required false
}
xml.outputLocation = "build/reports/myReport.xml"
}