Running jacocoReport

Pavel Bernshtam picture Pavel Bernshtam · Nov 17, 2013 · Viewed 30.6k times · Source

I'm using Gradle 1.7 and Jacoco plugin. My project uses Java and Scala plugins.
When I run gradlew -i clean jacocoTestReport

Report is not created and I see in the log

:bl:jacocoTestReport (Thread[Daemon Thread 13,5,main] - start
:bl:jacocoTestReport
Skipping task ':bl:jacocoTestReport' as task onlyIf is false.
:bl:jacocoTestReport SKIPPED
:bl:jacocoTestReport (Thread[Daemon Thread 13,5,main]) - complete

What does it mean? Why report is not created?

Answer

Peter Niederwieser picture Peter Niederwieser · Nov 17, 2013

The task will only run if coverage data is available. You can make sure of that by also running the test task.