【发布时间】:2017-09-07 14:01:46
【问题描述】:
我有一个具有以下结构的多模块 gradle 项目:
myProject
|
|-module1
|-src
|-main
|-test
|-build.gradle
|-module2
|-src
|-main
|-test
|-build.gradle
|-build.gradle
我有以下配置来生成 checkstyle 报告:
checkstyle {
toolVersion = '6.4.1'
configFile = rootProject.file("config/checkstyle/checkstyle.xml");
showViolations = true
ignoreFailures = true
reportsDir = file("$project.rootDir/reports/checkstyle/$project.name")
tasks.withType(Checkstyle) {
reports {
xml.enabled true
html.enabled true
}
}
}
checkstyleMain << {
ant.xslt(in: file("$project.rootDir/reports/checkstyle/$project.name/main.xml"),
style: rootProject.file('config/checkstyle-noframes-sorted.xsl'),
out: rootProject.file('config/aggregated.html'))
}
我的目标是生成一份汇总的 checkstyle 报告,其中包含来自这两个模块的信息。当我运行 "gradle checkstyleMain" 时,聚合的 html 报告仅包含来自 module2 的 checkstyle 报告信息,而忽略了 module1 信息。
我是 gradle 新手,如果有人可以帮助我,那就太好了。如果您需要更多信息,请告诉我
【问题讨论】:
标签: gradle checkstyle