bmuschko/gradle-clover-plugin — Issue #1: clover plugin not finding my customized sourceSet locations
Author: dlethin
Created: 2011-12-09 05:03:44+00:00
State: open

Hi. I'm trying out your plugin but unfortunately its not working out of the box in my build, and I'm not sure if its the plugin or how I have my build set up. I tried to download and look at the source for this plugin, but I'm unfamiliar with the Gradle "Actions" class, so the logic was not immediately obvious to me.

I'm trying to run this in a multimodule buld. The first error I get is:

The specified source directory '/Users/dlethin/bld/perforce/psd/dlethin_gp_gradle/IMS/gopayment/server/src/main/java' does not exist. It won't be included in Clover instrumentation.
The specified source directory '/Users/dlethin/bld/perforce/psd/dlethin_gp_gradle/IMS/gopayment/server/src/test/java' does not exist. It won't be included in Clover instrumentation.

The thing is, that is not where my source location is defined.

In my root project I have the following code snip --

def leafProjects = subprojects.findAll {
it.childProjects.size() == 0
}

configure(leafProjects) {

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'clover'

repositories { ... }

clover {
licenseFile = rootProject.file('clover.license')
}

dependencies {
testRuntime 'com.cenqua.clover:clover:3.1.0@jar'
}
}

Essentially defining closures common to all my subprojects.

Then in my leaf projects, I define things specific to that project. In the case of the above project which is failing to be instrumented, I have:

sourceSets {
main {
java {
srcDir 'src/java'
}
test {
java {
srcDir 'test/java'
}
}

Note the setup is due to conforming my build.grade to a legacy codebase.

Any advice on how to get the clover plugin working with my build? Thanks. (And thanks for sharing your plugin on github..)