Closed goprayogo closed 7 years ago
In my plugin i setup the dependency on the plugin in the actual module using it - see https://github.com/iwarapter/sonar-puppet/blob/master/sonar-puppet-plugin/build.gradle
I'm assuming your setup is like this:
root
| - module A
| - module B
| - sonar-example-plugin
In which case i would of thought the section in the root build.gradle
:
project (":sonar-example-plugin"){
apply plugin: 'com.iadams.sonar-packaging'
Would of worked as expected, i'll setup some tests for this when I get back from work.
This works fine for me can you just confirm you have a class here:
cat sonar-example-plugin/src/main/java/org/sonarsource/plugins/example/ExamplePlugin.java
package org.sonarsource.plugins.example;
import java.util.Arrays;
import java.util.List;
import org.sonar.api.SonarPlugin;
public class ExamplePlugin extends SonarPlugin {
@Override
public List getExtensions() {
return Arrays.asList();
}
}
Hi, I think this issue can be closed.
The issue is solved by adding the following statement in the build.gradle
of the sub-module.
pluginPackaging.dependsOn 'compileJava'
Full sample project can be viewed here
well, if there's such a dependency the plugin should register it by itself...
@otrosien @goprayogo you don't need to add that as its done automatically.
There is an example project here: https://github.com/iwarapter/gradle-sonar-packaging-plugin-issue-16
I set-up a gradle multi project for sonar plugin, and every time i do
./gradlew clean build
, the build failed onpluginPackaging
task.I need to have the sonar plugin as part of a gradle multiproject set up, and i have the following
gradle.build
The error that I've got when executing build
If I execute
gradle build
in the child directory with thebuild.gradle
as suggested in README.md, all is good.