12

While there are many questions dealing with unresolved sbt dependencies, there seems to be no general way to update these.

Do you need to check maven central for each one by hand, or is there some nifty tool that can automatically update them to the latest version?

serv-inc
  • 35,772
  • 9
  • 166
  • 188

2 Answers2

12

I've used the sbt-updates plugin for this purpose locally for many years—simply add it to your local sbt user configuration and then run sbt dependencyUpdates in your project directory, and you'll get a list of dependencies that have updates in Maven Central (or whatever other repositories you have configured for that project).

The scala-steward bot builds on sbt-updates to provide GitHub pull requests for dependency updates. You can either add your projects to the main instance's configuration if they're open source (I do this personally for 15-20 projects, and while it's not perfect, it's hugely useful, and getting better all the time), or run your own instance (which I've not tried personally).

Note that neither of these choices verifies that the dependency updates are compatible with each other—just that they're the latest. You'll still need to watch carefully for evictions, etc.

Travis Brown
  • 138,631
  • 12
  • 375
  • 680
2

Try out sbt-dependency-updates sbt plugin. It has dependencyUpgrade task (experimental) to upgrade of project dependencies and plugins that can be updated.

Alexander Shagin
  • 485
  • 5
  • 13