I need to set the classpath of the ant xslt task to be the compile classpath of the project. What would be the best way to do it?
Best regards,
Martin
apply plugin: 'checkstyle'
checkstyle {
toolVersion='5.9'
configFile=new File("config/checkstyle", "sun_checks.xml")
ignoreFailures=true
showViolations=false
}
task checkstyleReport << {
if (file("$buildDir/reports/checkstyle/${ext.checkType}.xml").exists()) {
ant.xslt(in: "$buildDir/reports/checkstyle/${ext.checkType}.xml",
style:"config/checkstyle/checkstyle-noframes.xsl",
out:"$buildDir/reports/checkstyle/checkstyle_${ext.checkType}.html"
)
}
}
afterEvaluate {
plugins.withType(CheckstylePlugin) {
checkstyleReport {
sourceSets.each { sourceSet ->
ext.checkType = sourceSet.name.toLowerCase()
checkstyleReport.execute()
}
}
}
}