gradle-sonar-packaging-plugin
gradle-sonar-packaging-plugin copied to clipboard
Could not get unknown property 'compile'
I'm getting the following error when trying to use the plugin:
org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'com.iadams.sonar-packaging', version: '0.1.3']
By looking at --stacktrace, it seems to come from here:
at com.iadams.gradle.plugins.SonarPackagingPlugin.apply(SonarPackagingPlugin.groovy:56)
at com.iadams.gradle.plugins.SonarPackagingPlugin.apply(SonarPackagingPlugin.groovy)
I tried with Gradle version 7.4.2.
Hi @gyorokpeter i'm not actively maintaining the project anymore - however the last changes only covered tests against gradle 3/4 - https://github.com/iwarapter/gradle-sonar-packaging-plugin/blob/master/src/integTest/groovy/com/iadams/gradle/plugins/GradleCompatabilityIntegSpec.groovy#L63
you don't need this plugin, it's actually as easy as building with the shadowPlugin and some simple pom modifications as described here: https://github.com/iwarapter/gradle-sonar-packaging-plugin/issues/22#issuecomment-451731617
see also https://github.com/sonar-perl/sonar-perl/blob/master/sonar-perl-plugin/build.gradle#L59
Thanks. I looked at this project because of what the official doc suggests: https://docs.sonarqube.org/latest/extend/developing-plugin/ Maybe that doc could use an update on how to build a plugin with Gradle.