Open Vampire opened 3 months ago
I assumed that the legacy configurations are scheduled for removal so this warning would go away? It must still be there assuming someone uses it, so if so then it should be resolved for them. I'd rather skip if something obvious, like no declared dependencies. Would that skip these naturally?
In the meantime, if annoying you, you can use filterConfigurations.
I assumed that the legacy configurations are scheduled for removal so this warning would go away?
Yeah, hopefully one day. :-D
I'd rather skip if something obvious, like no declared dependencies. Would that skip these naturally?
Those legacy configurations can be used in a multitude of variations. And that they are still there is just for backwards compatibility. The "no declared dependencies" could indeed be a good marker. If someone is aware how to properly define the configurations, no legacies should be created by him. If someone is half-aware of how to do it properly, separating "dependencyScope" from "resolvable" configuration but does not set the properties properly, he probably does it wrong for both and the "dependencyScope" one would be left to be checked by the plugin. On the other hand, the "resolvable" one would probably have the necessary attributes. But currently it would check both and then also have a problem with missing attributes. On the other hand focussing on the ones without dependencies would also not be right, as another common bad pattern is to have one dependency that is used for "dependencyScope" and "resolvable" at the same time. So the question is how much or which legacy patterns one wants to support.
In the meantime, if annoying you, you can use filterConfigurations
Ah, perfect, forgot about that, thanks. This works perfectly fine:
tasks.dependencyUpdates {
filterConfigurations = Spec {
!it.isCanBeConsumed
}
}
Givne this trivial build:
If you execute the dependency updates task, it fails to resolve
javafx-base
. The reason is, that the legacy (consumable and resolvable) configurationdefault
is checked which extendsruntimeElements
. It has thejavafx-base
dependency, but it does not have the necessary attributes set to properly select one of the variants, as those are only set on the proper resolvable configurations, i.e. runtime classpath and compile classpath for all source sets.The plugin should probably better ignore those legacy configurations and only consider those that are resolvable but not consumable.