Closed muellerml closed 2 months ago
Thanks for the report.
For the record, here's the error:
./gradlew testCodeCoverageReport
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':testCodeCoverageReport'.
> Could not resolve all task dependencies for configuration ':aggregateCodeCoverageReportResults'.
> The consumer was configured to find a component of category 'verification', as well as attribute 'artifactType' with value 'binary', attribute 'org.gradle.testsuite.type' with value 'unit-test', attribute 'org.gradle.verificationtype' with value 'jacoco-coverage'. However we cannot choose between the following variants of project :subproject-a:
- projectHealthElements
- resolvedDepsElements
All of them match the consumer attributes:
- Variant 'projectHealthElements' capability gradle-jacoco-reproducer:subproject-a:unspecified:
- Unmatched attributes:
- Doesn't say anything about artifactType (required 'binary')
- Doesn't say anything about its component category (required a component of category 'verification')
- Doesn't say anything about org.gradle.testsuite.type (required 'unit-test')
- Doesn't say anything about org.gradle.verificationtype (required 'jacoco-coverage')
- Provides attribute 'dagp.internal.artifacts' with value 'project-health' but the consumer didn't ask for it
- Variant 'resolvedDepsElements' capability gradle-jacoco-reproducer:subproject-a:unspecified:
- Unmatched attributes:
- Doesn't say anything about artifactType (required 'binary')
- Doesn't say anything about its component category (required a component of category 'verification')
- Doesn't say anything about org.gradle.testsuite.type (required 'unit-test')
- Doesn't say anything about org.gradle.verificationtype (required 'jacoco-coverage')
- Provides attribute 'dagp.internal.artifacts' with value 'resolved-deps' but the consumer didn't ask for it
> The consumer was configured to find a component of category 'verification', as well as attribute 'artifactType' with value 'binary', attribute 'org.gradle.testsuite.type' with value 'unit-test', attribute 'org.gradle.verificationtype' with value 'jacoco-coverage'. However we cannot choose between the following variants of project :subproject-b:
- projectHealthElements
- resolvedDepsElements
All of them match the consumer attributes:
- Variant 'projectHealthElements' capability gradle-jacoco-reproducer:subproject-b:unspecified:
- Unmatched attributes:
- Doesn't say anything about artifactType (required 'binary')
- Doesn't say anything about its component category (required a component of category 'verification')
- Doesn't say anything about org.gradle.testsuite.type (required 'unit-test')
- Doesn't say anything about org.gradle.verificationtype (required 'jacoco-coverage')
- Provides attribute 'dagp.internal.artifacts' with value 'project-health' but the consumer didn't ask for it
- Variant 'resolvedDepsElements' capability gradle-jacoco-reproducer:subproject-b:unspecified:
- Unmatched attributes:
- Doesn't say anything about artifactType (required 'binary')
- Doesn't say anything about its component category (required a component of category 'verification')
- Doesn't say anything about org.gradle.testsuite.type (required 'unit-test')
- Doesn't say anything about org.gradle.verificationtype (required 'jacoco-coverage')
- Provides attribute 'dagp.internal.artifacts' with value 'resolved-deps' but the consumer didn't ask for it
And I have confirmed this error does not appear in Gradle 8.6. I wonder if it's a Gradle bug?
Gradle suggests that DAGP could add a custom Category
, and that should be sufficient. They are surprised it hasn't broken before now 🤔
Plugin version 1.31.0
Gradle version 8.7
JDK version 21
(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 1.9.23
Describe the bug Applying the dependency analysis plugin creates an ambiguity variant error if Gradle 8.7 is used together with JVM Test Suite Plugin (https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#jvm_test_suite_plugin) and Jacoco Aggregation Plugin (https://docs.gradle.org/current/userguide/jacoco_report_aggregation_plugin.html)
To Reproduce Steps to reproduce the behavior:
Expected behavior Applying the Plugin does not influence other tasks like the testCodeCoverageReport provided by the Jacoco Aggregation Plugin