I have a multi module gradle project having the following structure:
myProject
|
|-module1
|-src
|-main
|-test
|-build.gradle
|-module2
|-src
|-main
|-test
|-build.gradle
|-build.gradle
I have the following configurations to generate checkstyle report:
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'))
}
My aim to generate an aggregated checkstyle report that contains information from both these two modules. When I run "gradle checkstyleMain" the aggregated html report contains only checkstyle report information from module2 and ignores module1 information.
I am new to gradle it will be great if someone can help me out. Please let me know if you need additional information