In an older Play app (v 2.2.x) I have the following in my Build.scala
import play.Project._
In v.2.3 this is not compiling
Is there any reason for this based on the version?
In an older Play app (v 2.2.x) I have the following in my Build.scala
import play.Project._
In v.2.3 this is not compiling
Is there any reason for this based on the version?
See the migration guide
https://www.playframework.com/documentation/2.3.x/Migration23 - scroll down to
Build Changes
Near: "If you were previously using play.Project, for example a Scala project [...] then you can continue to use a similar approach via native sbt"
Need to take care while migrating - in Build.scala
In Play 2.2
Migrate to Play 2.3, add the followings
Remove
import PlayProject._
Add also
If Java Project
val main = Project(appName, file(".")).enablePlugins(play.PlayJava).settings( version := appVersion, libraryDependencies ++= appDependencies )
If Scala Project
val main = Project(appName, file(".")).enablePlugins(play.PlayScala).settings( version := appVersion, libraryDependencies ++= appDependencies )
Instead of
val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings()
Don't need to add the
scalaVersion := "2.11.1"
inBuild.scala
orbuild.sbt
file as suggested in the Play 2.3 Migration Guide. In Play 2.2 theBuild.scala
orbuild.sbt
file structure is different.