xvik / gradle-quality-plugin

Gradle quality plugin for Java and Groovy
http://xvik.github.io/gradle-quality-plugin
MIT License
134 stars 11 forks source link

Reporting enabled property deprecation warning #30

Closed jjathman closed 3 years ago

jjathman commented 3 years ago

With plugin version 4.6.0 and Gradle 7.2 we are seeing a deprecation warning. It appears as though its related to when PMD is enabled. I didn't see any other issues related to this. Sorry if it's already been reported.

The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled for more details.
    at org.gradle.api.reporting.internal.SimpleReport.setEnabled(SimpleReport.java:108)
    at org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport_Decorated.setEnabled(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.gradle.api.reporting.internal.TaskGeneratedSingleFileReport_Decorated.setProperty(Unknown Source)
    at ru.vyarus.gradle.plugin.quality.QualityPlugin$_applyPMD_closure5$_closure26$_closure29$_closure31.doCall(QualityPlugin.groovy:194)
xvik commented 3 years ago

Thank you for the report! It's not a problem if I already know about some problem, please report everything.

Regarding this problem, I'll switch to the new property instead of enabled for gradle 7.x and preserve the old property for older gradle versions (to keep the compatibility). As gradle 8 is not going to release soon, it is not very urgent and I'll do a new release a bit later.