I tested the embedded jacoco plugin (I was previously using Andrew’s plugin) and now when I want to merge the executionData files from multiple subprojects I get a warning:
Deprecated dynamic property: "destinationFile" on "task ':mergeTestCodeCoverageResults'", value: "D:\projects\myproject...".
This is the old code (using Andrew’s plugin):
task mergeTestCodeCoverageResults(type: JacocoMerge) {
description = 'Merge test code coverage results from all java projects'
destPath = "${buildDir.path}/jacoco/test/office.exec"
doFirst {delete destPath}
executionData fileTree("${buildDir}/jacoco/test")
}
And this is the new code (using the embedded jacoco plugin):
task mergeTestCodeCoverageResults(type: JacocoMerge) {
description = 'Merge test code coverage results from all java projects'
destinationFile = file("${buildDir.path}/jacoco/test/office.exec")
doFirst {delete destinationFile}
executionData fileTree("${buildDir}/jacoco/test")
}
I checked the documentation for gradle 1.6-rc1 but there are no examples of merging jacoco execution data files. I also checked the source code and it seems that I should use:
JacocoMerge.groovy
// ...
/**
* File to write merged execution data to.
*/
@OutputFile
File destinationFile
// ...
Any ideas how can I set the destinationFile? Or should I just leave the default?