This message was deleted.
# dependency-management
s
This message was deleted.
n
Does this guide on handling mutually exclusive dependencies answer your question here? https://docs.gradle.org/current/userguide/dependency_capability_conflict.html
b
Thanks for the link. I read through it, and I don’t think it quite addresses this situation. There can be many dependencies in the
tomcatShared
configuration, and also they are not really “conflicting” with mutually exclusive dependencies in the other configurations. I think what I need is a way to get the declared dependencies of a configuration, plus their transitive dependencies. Another way to think of the problem: •
cloud
extends
tomcatShared
tomcatShared
extends
runtimeOnly
• Need resolved versions aligned across all of them (thus the extensions) • Finally, need to exclude all
tomcatShared
deps + transitive deps from the
cloudWar
(since those get provided as shared Tomcat libs at runtime, not bundled into the war file) Is there a way to get only the declared dependencies plus their transitives, for a configuration? Not including the base
runtimeOnly
dependencies? Another way to think of the problem is: configuration
n
Can you subtract the runtimeOnly from the collection?
b
That might work. The examples I found looked hacky and I didn’t find a syntax that worked in my testing. Do you have any examples I might check out?
I also just found Configuration#shouldResolveConsistentlyWith, that looks interesting.