I'm working on a Java Spring Boot project using Gradle 7.5
It is organized in multiple modules, which most of them have some tests included.
Today I've tried to enable code coverage reports for my project. Therefore I've added the jacoco plugin to allprojects:
`
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.8.8"
}
`
On subprojects I've the following task:
`
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
` When I try to run the task jacocoTestReport the build fails and following error is shown on the first module:
The value for this file collection is final and cannot be changed
What I'm doing wrong here?
Thanks for your help!
I've already tried different versions of gradle and googled a lot, but unfortunately, none of the proposed soltions worked for me.
I have also encountered this problem, and I still don't know how to solve it.
jdk Version:11
gradle Version:7.5
jacoco.gradle Part of the code is as follows: