Slackbot
12/13/2023, 4:50 PMVampire
12/30/2023, 11:54 AMJendrik Johannes
12/30/2023, 12:19 PMattribute(
Category.CATEGORY_ATTRIBUTE,
objects.named(Category::class.java, Category.LIBRARY)
)
LIBRARY_ELEMENTS_ATTRIBUTE is conceptually like a "child" attribute for CATEGORY_ATTRIBUTE = LIBRARY
see: https://docs.gradle.org/current/userguide/variant_attributes.html#ecosystem_independent_standard_attributes
> Indicates the contents of a org.gradle.category=library variant
I say conceptually, because Gradle does not know that and therefore does not give a helpful error message. Right now, technically there is no concept of relationships between attributes - probably something that might be added in the future (I know that it was discussed several times).
Why it works without setting the attribute in Gradle 8, I don't know. Maybe a side effect of some change in this area.Vampire
01/02/2024, 12:28 AMjacoco-report-aggregation plugin which requests exactly only that that attribute in 7.6 and 8.x.
But as soon as I have org.jetbrains.kotlin:kotlin-gradle-plugin as dependency, the report building fails with that ambiguous resolution problem which does work fine in Gradle 8.x.
I just extracted the relevant lines into this stand-alone example.
Requesting the category attribute in my stripped example, or in the actual project on allCodeCoverageReportClassDirectories configuration indeed solves the ambiguity.
But I still think this is hitting some bug that is fixed in 8.0.