vaj oja
vaj oja

Reputation: 1161

where to add the scalaVersion in play framework

I encountered the following error messages which suggest to add the scalaVersion.I added ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) } in my build.sbt but this didn't fix it

[warn] Scala version was updated by one of library dependencies:
[warn]  * org.scala-lang:scala-library:(2.10.0, 2.10.3, 2.10.1, 2.10.2) -> 2.10.4
[warn] To force scalaVersion, add the following:
[warn]  ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] Run 'evicted' to see detailed eviction warnings

Upvotes: 3

Views: 897

Answers (1)

Mike Slinn
Mike Slinn

Reputation: 8403

When you run this command:

activator new test play-scala

... this is the build.sbt file which is created:

name := """test"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test
)

resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

The play-scala template adds some inadvisable information to the file, but you can clearly see how scalaVersion is specified.

Upvotes: 1

Related Questions