Cobertura Plugin not seeing Groovy source files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cobertura Plugin not seeing Groovy source files

Scott Hickey-2
I have the following at the top of my build.gradle file:

apply plugin: 'groovy'
apply plugin: 'idea'
apply from: 'https://github.com/valkolovos/gradle_cobertura/raw/master/ivy/gradle_cobertura/gradle_cobertura/1.0-rc4/coberturainit.gradle'


After running  'gradle cobertura', I open the coverage reports and try
to drill down into them. On the all of the pages, I see messages like:

Unable to locate Importer.groovy. Have you specified the source directory?


I tried adding the following to my build.gradle file but still have
the same problem:

cobertura {
  coverageSourceDirs = ["${project.sourceSets.main.groovy.srcDirs}"]
}


My groovy source files are in src/main/groovy.

Thanks,

Scott Hickey

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Cobertura Plugin not seeing Groovy source files

Marek Piechut
Try using:

cobertura {
    coverageSourceDirs = [sourceSets.main.groovy.srcDirs]
}

worked for me when using plugin from net.saliman:gradle-cobertura-plugin:1.1.2