JacocoReport tasks don't have dependencies on tasks that produce coverage data

I noticed today that the JacocoReport tasks use ‘mustRunAfter’ ordering rules instead of task dependencies for the ‘executionData’ added via a task. Here’s the commit where it was changed.

‘mustRunAfter’ only makes sense when the task can be run in a meaningful way without the other task’s output. What good is a Jacoco report to me if I don’t have any data in it?

1 Like

Please see this issue here, which describes the same problem: http://issues.gradle.org/browse/GRADLE-2764

Andrew,

The idea is that you can generate coverage for a subset of tasks. This means you need to specify which coverage producing tasks to run, and the report task.

How common is that use case? Just from my experience: - Most projects only have one coverage producing task. - I would rarely have a need for an ad-hoc combination of tasks to produce a coverage report.

1 Like

Unsure.

I’m assuming that the current situation is an interim step until we get finalizers. In that case you will just run the coverage producing task(s) that will be finalized by the report task. Finalizers may be in 1.7.