I have a custom JacocoReport task in my project. I set reports.xml.enabled = false and reports.csv.enabled = false because I only care for the html report. When I run the task with Gradle 3.0, it complains that
Some problems were found with the configuration of task ‘:combinedJacocoReport’.
No value has been specified for property ‘reports.xml.destination’.
No value has been specified for property ‘reports.csv.destination’.
I cannot reproduce this problem with the standard JaCoCo task.
Can you share details about your customisation such that I can reproduce the problem?
We also increased the default JaCoCo version to 0.7.7.201606060606. You can also check if setting it manually to another version (in previous Gradle versions it was 0.7.6.201602180812) solves the issue.
It seems that this (misleading) error originates from the fact that there are no conventions applied by the JaCoCo Plugin. In fact, there should always be a ‘destination’ for each report type, because there is a default one.
In your case, the JaCoCo plugin is not applied to the root project and therefore the application of conventions is not triggered. The problem is not reported in 2.14.1 because the validation was added in 3.0.
If you add apply plugin: "jacoco" or move the exiting one from subprojects to allprojects it works.
@jendrik I agree with @jochenberger on this one. There are multiple cases when the JacocoReport task can be used without having the plugin applied to the project.
Two examples we’re using in our project:
We dump code coverage from the remote machine and then use JacocoReport to merge severals dumps into one html report
We manually merge an overall report from a bunch of disjoint unit test execution reports
To me it seems that validating that report destinations are provided only makes sense in case the plugin was applied to the project, not in the case when JacocoReport is used as a standalone task with a custom configuration. The only thing to validate in this case would be that at least one report type is configured.