-
Notifications
You must be signed in to change notification settings - Fork 40
Description
The gradle 9 support updates in this plugin introduced an issue that is marked as deprecated in gradle 8.14.3 and errors out in gradle 9.+.
Simple MCVE:
New gradle project with the following contents:
build.gradle.kts
plugins {
java
`jacoco-report-aggregation`
id("io.qameta.allure") version "3.0.0"
}
repositories {
mavenCentral()
}settings.gradle.kts
rootProject.name = "test-allure"
pluginManagement {
repositories {
gradlePluginPortal()
}
}Run ./gradlew :testCodeCoverageReport --dry-run
gradle 8 deprecation warning:
Mutating a configuration after it has been resolved, consumed as a variant, or used for generating published metadata. This behavior has been deprecated. This will fail with an error in Gradle 9.0. The artifacts of configuration ':allureRawResultElements' were mutated after the configuration was consumed as a variant. After a configuration has been observed, it should not be modified. Consult the upgrading guide for further information: https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#mutate_configuration_after_locking
gradle 9 error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':testCodeCoverageReport'.
> Could not resolve all dependencies for configuration ':aggregateCodeCoverageReportResults'.
> Could not create task ':test'.
> Cannot mutate the artifacts of configuration ':allureRawResultElements' after the configuration was consumed as a variant. After a configuration has been observed, it should not be modified.
I believe the issue is caused by the following change:
https://github.com/allure-framework/allure-gradle/pull/125/files#diff-53c49873e630c9f00ea220d4fcb00986813315a201e075aff2411e8fa6b780b0R100-R106