Skip to content
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

Resolve versions in a java-platfom project #350

Closed
anuraaga opened this issue Oct 8, 2019 · 4 comments · Fixed by #351
Closed

Resolve versions in a java-platfom project #350

anuraaga opened this issue Oct 8, 2019 · 4 comments · Fixed by #351

Comments

@anuraaga
Copy link
Collaborator

anuraaga commented Oct 8, 2019

I usually manage dependency versions in a repo with many Gradle projects by having one java-platform project that uses dependencies.constraints to force versions in other projects. Currently, I usually run dependencyUpdates on the entire repo, meaning for all the subprojects, but it would be convenient to be able to just run :project-bom:dependencyUpdates to resolve updates to the constraint dependencies. Is this a feature that's appropriate for this plugin?

@ben-manes
Copy link
Owner

You can apply the plugin only to the bom project if you prefer. Does that work?

@anuraaga
Copy link
Collaborator Author

anuraaga commented Oct 8, 2019

Since enforcing versions in a bom project uses dependencies.constraints instead of dependencies, I don't think the plugin is able to pick up the dependencies to process (it does find transitive bom dependencies, which are specified in the normal dependencies block). I suspect it's a pretty small change to look at constraints when it's present, wanted to confirm it makes sense as a change :)

@jmfayard
Copy link
Collaborator

jmfayard commented Oct 8, 2019

If I remember correctly, the Gradle team suggested to refactor the plug-in to have one dependency task per project and then merge their results at the end? Is that correct @ben-manes
If so, what you propose would be really welcome, but also maybe non trivial

@ben-manes
Copy link
Owner

@jmfayard yes, though I think the ask is to look at another property as well for a configuration to evaluate. The per project task is different in that they are changing best practices from 1.x days to improve parallelism and caching. Here I think it’s just applying to a sub project and evaluating dependencies differently.

@anuraaga you can give it a shot. Gradle changes so much that I don’t know anymore what is good or bad practices. It would seem like a potentially confusing addition in other cases, so I don’t know if it’s a good or bad addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants