I am using Gradle 4.5.1 and the standard Gradle plugin. I have specifically requested that my build use PMD 6.1.0, like so:
apply plugin: "pmd"
pmd {
toolVersion = "6.1.0"
}
pmdMain {
rulSets = ["java-basic"]
}
Everything passes, but I get a number of deprecation warnings in the console along the lines of this:
Use Rule name
category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop
instead of the deprecated Rule namerulesets/java/basic.xml/AvoidBranchingStatementAsLastInLoop
. PMD 7.0.0 will remove support for this deprecated Rule name usage.
My initial thought was to change the pmdMain
block like so:
pmdMain {
rulSets = ["java-errorprone"]
}
However, I get this error:
Can't find resource 'null' for rule 'java-errorprone'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Here's the current classpath:
~\.gradle\wrapper\dists\gradle-4.5.1-bin\a5vbgfvpwtoqz8v2cdivxz28k\gradle-4.5.1\lib\gradle-launcher-4.5.1.jar
Is there something I'm doing wrong? Is Gradle's PMD plugin incompatible with PMD 6.x?