Hi all,
I'm setting up cobertura instrumentation (code coverage) on my gradle java
build.
I could do it like suggested by some (copy instrumented classes in place
before test, move them out after test)
but that seems a bit ugly.
What would be easy, is if I could simply place these instrumented class
files ahead of the originals in the classpath;
eg.
dependencies {
testRuntime files("${project.buildDir}/cobertura-instrumentation")
.. the rest
}
However, this doesn't do it. They of course always end up just after the
originals (which are being built, and don't need explicit placement on the
dependencies classpath).
According to the gradle documentation, the SourceSetContainer sourceSets is
read-only
http://www.gradle.org/current/docs/dsl/org.gradle.api.Project.html#org.gradle.api.plugins.JavaPluginConvention:sourceSets
This means I can't modify this to slip my instrumented classes in first.
Is there any other way around this ?
Regards,
Sean