2

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.

user2759511
  • 640
  • 7
  • 16

1 Answers1

2

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.

laughedelic
  • 6,230
  • 1
  • 32
  • 41