This message was deleted.
# dependency-management
s
This message was deleted.
l
This is a variant resolution problem. The rest of the message should indicate the attributes looked at and why both variants match. It should also indicate which extra attributes do exist. Unfortunately the Kotlin dependencies have a rich model that sometimes does not have a sane default in non Kotlin plugins enhanced projects. Your solution will most likely require adding a specific attribute to that dependency or to the configuration resolving it. A capability fix does not seem like the right solution. See https://docs.gradle.org/current/userguide/variant_model.html#sec:variant-select-errors Adding an attribute to a dependency is similar to what’s done on a configuration, except that you do it inside the dependency block:
Copy code
implementation("foo:bar:1.0") {
    attributes {
        // ...
    }
}
j
Thanks, that was the actual reason. Both had exactly the same attributes except one named
ui
. Weirdly, only the skiko variant for android has the UI attribute set to "android", but the skiko variant for awt did not have that attribute. That's why I searched how to ask for an attribute to not be present, but I couldn't find a solution for that. Then I found out that if I ask for a value of this attribute which does not even exist, Gradle uses the variant which does not have the attribute set, which in my case was the correct one. So I got it to work now, but it is just a workaround at the moment.