Vampire
11/04/2023, 1:08 AMconfigurations.create("foo") {
val runtimeAttributes = configurations.runtimeClasspath.get().attributes
runtimeAttributes.keySet().forEach { key ->
attributes.attribute(key, runtimeAttributes.getAttribute(key))
}
}
I know that key
and runtimeAttributes.getAttribute(key)
are compatible, but the Kotlin compiler does not.
The method is declared attribute(Attribute<T> key, T value)
ephemient
11/04/2023, 1:14 AM.attribute(key as Attribute<Any>, runtimeAttributes.getAttribute(key))
unchecked cast would probably bypass itVampire
11/04/2023, 1:15 AMVampire
11/04/2023, 1:16 AM