API 文档 | HtmlDependencyReportTask |
---|
生成 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"
}