Set variable to use in both build.sbt and plugins.sbt


(Per Nyfelt) #1

Hi,

I would like to set the play version i use in one place only.

e.g. in build.sbt
val playVersion = “2.6.20”

so i can use the variable in dependencies e.g.
“com.typesafe.play” %% “play-cache” % playVersion,

but i also want to use the same variable in plugins sbt i.e:
addSbtPlugin(“com.typesafe.play” % “sbt-plugin” % playVersion)

This does not work however so I wonder if it is possible and if so what the right way to do this is?