-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version rejectAll()
documentation is basically non-existant
#30350
Comments
This is a valid documentation issue. Documentation is indeed lacking, especially as this value is the only @toadzky Can you try the above, adapted to your needs? Could you also share the snippet and the stacktrace at the origin of your issue? |
I have defined some
It's unclear in the documentation how to use the rejected dependency. It's relatively clear how to define a rejected dependency, but not how to use it. |
Oh, you asked for some snippets.... My catalog is kotlin-defined: library("aws-sdk-client-reject-apache", "software.amazon.awssdk", "apache-client").version {
rejectAll()
} the generated toml look like this: aws-sdk-client-reject-apache = {group = "software.amazon.awssdk", name = "apache-client", version = { rejectAll = true } } and the usage i have is implementation(libs.aws.sdk.client.reject.apache) i'm not sure what stacktrace you would like me to send you, i don't see one in the gradle output. |
Ok, so this is also about the usage of It makes little sense for a dependency since all of its versions will be rejected. However, it can help blacklist a specific set of coordinates with a dependency constraint though. Since constraints are activated only if a real dependency enters the graph, you can add the constraint and have it only trigger if that blacklisted dependency shows up in an unexpected way. |
yeah, i don't really understand what you mean by doing it as a constraint. it's literally a version setting for dependencies, but you are saying it doesn't make sense to use it in the dependency section. this is basically the problem: it's completely unclear how this functionality is supposed to be used, the docs just show how to set the dependency version to be rejected. |
Sorry, should have added a link to the documentation: https://docs.gradle.org/current/userguide/dependency_constraints.html#sec:adding-constraints-transitive-deps |
Gotcha. Yeah, if the docs for rejecting dependencies linked to that and clearly said it was for constraints only, that would help a lot I think. |
Issue type
Missing information
Problem description
I'm trying to write a catalog that allows a consumer to opt-in to a
rejectAll
version but it fails with aCould not resolve group:artifact:{reject all versions}.
There's no documentation on how to correctly userejectAll
and how it interacts with other things.Context (optional)
No response
Page with the problem
https://docs.gradle.org/current/userguide/platforms.html
The text was updated successfully, but these errors were encountered: