You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
All outgoing configurations of Kover don't set the Gradle.USAGE attribute. Without this attribute, Gradles attribute matching algorithm accepts kovers artifacts even if you (as Gradle plugin author) want to resolve artifacts with other attributes.
Use-case: I applied the kover plugin using the settings plugin and have a custom Gradle plugin that wants to resolve a configuration with USAGE but there is no configuration with matching USAGE so Gradle should fail. But Gradles attribute matching algorithm (wrongly) choose a consumable configuration as long as there are no conflicting attributes, and ignores requires/provided attributes. So without USAGE attribute, Gradle simply choose kover artifacts. The Gradle USAGE attribute is the most relevant attribute (Indicates main purpose of variant) and Gradle authors should set it.
Errors
n/a
Expected behavior
A Gradle variant error because I fetch Gradle.USAGE="foo" and kover provides Gradle.USAGE="kover"
Reproducer
n/a
Reports
n/a
Environment
Kover Gradle Plugin version: 0.8.3
Gradle version: 8.10
Kotlin project type: Kotlin/JVM 2.0.20
Coverage Toolset: Kover
Other context important for this bug: n/a
The text was updated successfully, but these errors were encountered:
Describe the bug
All outgoing configurations of Kover don't set the Gradle.USAGE attribute. Without this attribute, Gradles attribute matching algorithm accepts kovers artifacts even if you (as Gradle plugin author) want to resolve artifacts with other attributes.
Use-case: I applied the kover plugin using the settings plugin and have a custom Gradle plugin that wants to resolve a configuration with USAGE but there is no configuration with matching USAGE so Gradle should fail. But Gradles attribute matching algorithm (wrongly) choose a consumable configuration as long as there are no conflicting attributes, and ignores requires/provided attributes. So without USAGE attribute, Gradle simply choose kover artifacts. The Gradle USAGE attribute is the most relevant attribute (
Indicates main purpose of variant
) and Gradle authors should set it.Errors
n/a
Expected behavior
A Gradle variant error because I fetch Gradle.USAGE="foo" and kover provides Gradle.USAGE="kover"
Reproducer
n/a
Reports
n/a
Environment
The text was updated successfully, but these errors were encountered: