Could not get unknown property 'groovy' for source set 'main' of type org.gradle.api.internal.tasks.DefaultSourceSet.
groovy.lang.MissingPropertyException: Could not get unknown property 'groovy' for source set 'main' of type org.gradle.api.internal.tasks.DefaultSourceSet.
at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:83)
at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:61)
at org.gradle.api.internal.tasks.DefaultSourceSet_Decorated.getProperty(Unknown Source)
at ru.vyarus.gradle.plugin.quality.report.ReportUtils.extractJavaPackage(ReportUtils.groovy:33)
at ru.vyarus.gradle.plugin.quality.report.ReportUtils$extractJavaPackage$0.call(Unknown Source)
at ru.vyarus.gradle.plugin.quality.report.PmdReporter$_report_closure1$_closure2.doCall(PmdReporter.groovy:33)
at ru.vyarus.gradle.plugin.quality.report.PmdReporter$_report_closure1.doCall(PmdReporter.groovy:30)
at ru.vyarus.gradle.plugin.quality.report.PmdReporter.report(PmdReporter.groovy:19)
at ru.vyarus.gradle.plugin.quality.QualityPlugin$_applyReporter_closure10.doCall(QualityPlugin.groovy:321)
It seems to be related to this project. And it's correct that there is no groovy source set.
I'm getting the following error in our project:
It seems to be related to this project. And it's correct that there is no
groovy
source set.I'm guessing with a simple check, if
groovy
exists, on this line would fix the bug: https://github.com/xvik/gradle-quality-plugin/blob/9376bd7134d6f33b211297f6626a6d2f4961b221/src/main/groovy/ru/vyarus/gradle/plugin/quality/report/ReportUtils.groovy#L33