-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle task with Jacoco code coverage fails after upgrade to Gradle 7 #16860
Comments
Hi @jan-dolejsi |
Any updates on this issue please? |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Any updates on this issue please? This problem is caused by the Gradle task writing the following to the build.gradle file // build.gradle In Gradle 6.x and later, classDirectories is read-only. In Gradle 5.x, it was possible to write values to classDirectories, so the problem did not occur. |
I am also interested in an update on this. Nice investigation/root cause analysis @kaito-ms |
Thanks @kaito-ms and @jan-dolejsi for highlighting this issue. I am also running into this and interested in a resolution! |
I have the same problem. I'm getting the following error: |
You can add it to build.gradle following Gradles plugin documentation as a workaround. |
I have added the following to my build.gradle
and I still receive the same error. I'm using If I used
I get the following error:
|
I used the following. Agent running Gradle 8.0 plugins { jacocoTestReport { |
Still the same error with 7.6.1
|
I have the same issue with Gradle 8.0.2 and 8.4. |
Hi After upgrading to Gradle 7, it is failing |
Any Update on this issue , I am upgrading my from 6.8 to 7 and getting the following error . They are 6 vulnerabilities reported by the sonar for gradle v6.x Could not set unknown property 'enabled' for Report html of type org.gradle.api.reporting.internal.TaskGeneratedSingleDirectoryReport. |
I'm facing this when upgrading to gradle 8.3. Any update? |
Gradle - 8.4 At local environment all is ok.
|
i have the same error any updates or workarounds |
Hi, the problem is still here. |
Hi, I'm having the same problem, locally it works perfect, the problem is when I use the gradle task on Azure DevOps Gradle 8.2
|
I have disabled the "Code Coverage" functionality from a Gradle Test task. |
Probable reason for this bug The Gradle option 'enabled' on the 'Report' type mentioned here was removed in Gradle v8.0, which was released on Feb 13, 2023, see https://docs.gradle.org/8.0/userguide/upgrading_version_7.html#report_and_testreport_api_cleanup for details. Workaround
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: build/reports/jacoco/test/jacocoTestReport.xml |
Bug
Type: build task fails
Enter Task Name: Gradle,v2
Environment
Azure Pipelines
Gradle+Jacoco:
https://dev.azure.com/slb-swt/ai-planning/_build/results?buildId=4043438&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=ea098990-53e4-52aa-5a84-5ead7c5f17f2&l=167
Agent - Hosted or Private:
Issue Description
Yaml pipeline:
Gradle.properties
Gradle-wrapper.properties
Task logs
The text was updated successfully, but these errors were encountered: