I’m trying to set the parameters “maxFailures” or “incrementalAnalysis” of the PMD extension in a kotlin build script, but the values are read only. Please give an example how to set these parameters.
I tried:
tasks {
withType<Pmd>() {
enabled = isPmdEnabled
ignoreFailures = false
reports {
xml.isEnabled = true
html.isEnabled = false
}
isConsoleOutput = true
// the above all work fine!
maxFailures = 150 // <-- this fails!
}
}
and the same in the
pmd {
}
section. None worked.