kordamp / kordamp-gradle-plugins

A collection of Gradle plugins
https://kordamp.org/kordamp-gradle-plugins/
Apache License 2.0
138 stars 25 forks source link

Problem with pmd #491

Closed tijanssen closed 1 year ago

tijanssen commented 2 years ago

I get the following error:

A problem occurred configuring project ':tresty-collections'.

Could not set unknown property 'rulePriority' for task ':tresty-collections:allPmd' of type org.gradle.api.plugins.quality.Pmd.

I have added the org.kordamp.gradle.pmd plugin and have the pmd.xml in the config/pmd/ directory. I have no congig qulity pmd block in the build.gradle.kts file. I was just trying to add the plugin without configuring it for my needs. DId I do something wrong?

aalmiray commented 2 years ago

@tijanssen the org.kordamp.gradle.pmd plugin is applied recursively to all plugins and becomes active by default if the given configuration is found at the right location, in other words, you don't have to use the DSL to activated it, this is why you're seeing it run.

It may be the case that a recent version of PMD no longer supports the rulePriority field, I'll have to check of this is true.

tijanssen commented 2 years ago

I used the dsl to set the ToolVersion to the newest version available explicitly.

tijanssen commented 2 years ago

I tried it without setting the toolversion. In this case I get still the same error. I get the error even if I set enabled = false. I have to remove the org.kordamp.gradle.pmd plugin completely before i can continue to build my projects. So I can't currently use the kordamp pmd plugin.

aalmiray commented 2 years ago

Could you give more details on your current setup, such as Gradle version, Java version, et al. The output of gradlew --version should be enough

tijanssen commented 2 years ago

gradle 7.2 java 16