You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
configurations.all {
resolutionStrategy.capabilitiesResolution {
withCapability("javax.mail:mail") { // Capability for which to make the decision
select("com.sun.mail:jakarta.mail:0") // The component to select
}
}
}
I think we can improve the documentation there. Thanks for making us aware.
The first approach is Gradle core API. If you only use the detection plugin (for whatever reason), you can use that.
The second is the notation added by the resolution plugin that allows for a more compact notation with some tweaks. It's almost equivalent, but the notation also tells the resolution plugin not to register any standard strategy (which it does for most cases) so that you do not run into "weird" Gradle behavior like this one.
Bottom line:
If for some reason you only use the detection plugin, use the first method (the other is not available)
If you take the full package with the resolution plugin, use the second method
The docs both mention
and
syntax. Are they semantically equivalent? Is one syntax preferable over the other?
The text was updated successfully, but these errors were encountered: