Taking the example for the gradle book (ant-customtaskuse\build.gradle) we set the output of the ant.pmdtask toConsole=true.
however I do not get the output. I only get it if i invoke gradle with --info option.
what is going wrong here ?
thanks,
Bernhard.
//////////////////////////////////////////////////////////
// PMD example using a configuration and Gradle dependency
// management to control the loading of the Ant Task.
configurations {
myPmd
}
dependencies {
myPmd group: ‘pmd’, name: ‘pmd’, version: ‘4.2.5’
}
repositories {
mavenCentral()
}
task checkThePMD << {
ant.taskdef(name: ‘myPmdTask’, classname: ‘net.sourceforge.pmd.ant.PMDTask’, classpath: configurations.myPmd.asPath)
ant.myPmdTask(shortFilenames: ‘true’, failonruleviolation: ‘true’,
rulesetfiles: file(‘src/tools/pmd-basic-rules.xml’).toURI().toString()) {
formatter(type: ‘text’, toConsole: ‘true’)
fileset(dir: ‘src/main/java’)
}
}