Something like this should yield a deprecation warning:
val legacy by configurations.creating // resolvable configuration without attributes (!)
tasks.register("legacyResolve") {
doLast { legacy.files.forEach { println(it.name) } }
}
There are many builds/plugins out there doing this. Many from the time where attributes did not even exist. We should inform that this is problematic. While it still works in many cases, thanks to disambiguation rules, the more attributes are used, the more problematic it may become in particular if libraries from different ecosystems (Java, Kotlin, Kotlin Multiplatform, Android, ...) are combined.
~With #13650 we now also offer an API to create resolvable configurations with initial attributes set.~
Something like this should yield a deprecation warning:
There are many builds/plugins out there doing this. Many from the time where attributes did not even exist. We should inform that this is problematic. While it still works in many cases, thanks to disambiguation rules, the more attributes are used, the more problematic it may become in particular if libraries from different ecosystems (Java, Kotlin, Kotlin Multiplatform, Android, ...) are combined.
~With #13650 we now also offer an API to create resolvable configurations with initial attributes set.~