I use spock to write test case and jenkins to run and publish my test cases. I was able to get the code coverage reported but sonar shows me only Java Unit
Add the following property in the pom file
<sonar.tests>src/test/groovy,src/test/java</sonar.tests>
If you do this both Spock and JUnit tests are shown correctly! See attached screenshot