I was having 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 have modified J7->J8 everywhere I could think of, but for some reason, when I refresh project in
SBT projects window in Intellij Idea (and it also refreshes it automatically when I change build.sbt), it sets Java version back to 7 (both options
Project SDK and
Project language level: in
Project Structure window are set back)
I've probably missed some option, but I cannot find anything that still points to J7. Any idea?
I've tried to put this in
build.sbt, but it did not fix the issue:
scalacOptions ++= Seq("-target:jvm-1.8")
Sbt compiles project fine if it is compiled SBT terminal, but I prefer to use IntelliJ Idea run option.