bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

Using plugin with Grails 3 #71

Closed squarepegsys closed 8 years ago

squarepegsys commented 8 years ago

I'm trying to get this plugin to work with Grails 3. I'm sure I'm having a configuration problem, not a bug per se, but I'm lost

apply plugin: 'com.bmuschko.clover'

clover {
   licenseLocation ='license.txt'
   testIncludes = ["**/*Spec.groovy"]
   includes=["**/*.groovy"]
   additionalSourceDirs=["src/main/groovy", "grails-app"]
   additionalTestDirs=["src/integration-tests/groovy", "src/test/groovy"]
   report {
       html = true
       pdf = true
       xml = true
   }
 }

And this is the error I get:

Caused by: groovy.lang.MissingMethodException: No signature of method:    java.lang.String.exists() is applicable for argument types: () values: []
Possible solutions: wait(), next(), expand(), toList(), execute(), equals(java.lang.Object)
    at java_io_File$exists$0.call(Unknown Source)
    at com.bmuschko.gradle.clover.CloverPlugin$_addExistingSourceDirectories_closure51.doCall(CloverPlugin.groovy:356)
    at com.bmuschko.gradle.clover.CloverPlugin.addExistingSourceDirectories(CloverPlugin.groovy:355)
    at com.bmuschko.gradle.clover.CloverPlugin.this$2$addExistingSourceDirectories(CloverPlugin.groovy)

It seems to be additionalSourceDirs but I can't figure out what it really wants.

bmuschko commented 8 years ago

The type of property is Set. At the moment you are passing in a List<String>. It's not documented well. There should be Groovydocs for the plugin API.