I had a Play 2.4.2 scala project built with J7 in IntelliJ Idea, then I switched the project to Play 2.5.0 with J8. I changed J7-> J8 everywhere I could think of, but for some reason, when I update a project in a SBT projectswindow in Intellij Idea (and it also updates it automatically when build.sbt changes), it sets the Java version back to 7 (both parameters Project SDKand Project language level:in are Project Structureset back)
I probably missed some option, but I can't find anything else that points to J7. Any idea?
I tried putting this in build.sbt, but this did not fix the problem:
scalacOptions ++= Seq("-target:jvm-1.8")
Sbt compiles the project perfectly if it compiled an SBT terminal, but I prefer to use the IntelliJ Idea launch option.
source
share