I was using:
and I could not get it work. Sonar was displaying the "-" instead of the percentage of covered code.
I found this JIRA which should be fixed in Sonar Groovy Plugin 1.0, if you have the same problem as I had and that the 1.0 is released already, an update may fix the problem.
Or else, there is a workaround discussed in this topic:
- Download the Spantree fork of the Sonar Groovy Plugin
- Unzip and build (
mvn install
in the root of the sonar-groovy-master
project)
- Copy
sonar-groovy-plugin-1.0-spantree-SNAPSHOT.jar
in the extensions/plugins
subdirectory of your Sonar installation directory
- Remove or alter the extension of the old
sonar-groovy-plugin-0.6.jar
- Restart sonar and try
gradle sonarRunner
again