I use sbt 0.13.5.
From the sbt console, how can one see a list of all the defined configurations in a project (e.g. Compile
, Test
, etc) and their description?
I don't know if there is a built-in command for that. Unless there is one, you could create a task doing just that:
build.sbt
lazy val showConfigurations = taskKey[Unit]("Shows all configurations")
lazy val inAnyProjectAndConfiguration = ScopeFilter(inAnyProject, inAnyConfiguration)
showConfigurations := {
val configs = configuration.all(inAnyProjectAndConfiguration).value.toSet
configs.filter(_.isPublic).foreach(c => println(s"${c.name} ${c.description}"))
}
You may not see descriptions for some configurations, because it's not mandatory. As a matter of fact, it seems that none of the default ones have it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With