Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

find sbt plugins versions

Tags:

sbt

sbt-plugin

I am using some sbt plugins on a project and I would like to know which are their versions from sbt console.
I can type plugins which list the plugins but do not present their versions.
I want to do it from the sbt console, I do not want to inspect some plugins.sbt file or similar somewhere.

like image 703
user2759511 Avatar asked Mar 14 '26 04:03

user2759511


1 Answers

When you use plugins command, you see references to the plugins as they are defined in the Scala code. A single artifact can contain many plugins. Those artifacts with plugins have versions and here's how you can see them.

  1. First load the metaproject: reload plugins
  2. Then check dependencies: libraryDependencies
  3. Go back to your project: reload return

You can define an alias for this in your ~/.sbt/<version>/global.sbt:

addCommandAlias("pluginsVersions", "; reload plugins ; libraryDependencies ; reload return")

It's not perfect, the output is noisy and not formatted nicely, but it's something you can get out of the box.

like image 71
laughedelic Avatar answered Mar 16 '26 06:03

laughedelic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!