我有具有以下結構的多模塊gradle這個項目:搖籃任務聚集的CheckStyle報告在多模塊項目
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新手,如果有人能幫助我,那將會很棒。請讓我知道如果你需要更多的信息