2

I've created a simple Java project which uses Gradle. I've added some unit tests and integrated JaCoCo plugin to see the code coverage. It all works well, however, in the HTML report I can't click on the class name to see exactly which lines and branches are covered. I have another project which uses Maven and JaCoCo where this functionality works. Is it a limitation of Gradle plugin, or am I doing something wrong? Here's my build.gradle:

apply plugin: 'java'
apply plugin: 'jacoco'

repositories {
    mavenCentral()
}

dependencies {
    testCompile 'junit:junit:4.10'
}

And here's what I'm seeing:

Egor
  • 39,695
  • 10
  • 113
  • 130

1 Answers1

1

The problem that you are describing appears to be fixed in Gradle 1.10-rc-2.

Peter Niederwieser
  • 121,412
  • 21
  • 324
  • 259
  • Just fyi Pete. I have used the same situation with Gradle 1.6 and it was working. Just trying to say that may be jacocoTestReport needs correct configuration settings for sourceDirectories, classDirectories, additionalSourceDirs, additionalClassDirs. – AKS Mar 20 '14 at 16:07