Problems with Scala compiler version 2.12.1

While using SBT for deploying to Google AppEngine in my project I found a problem with scala compiler version 2.12.1. See the problem below. This problem does not occur with version 2.11.x.

java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: /target/webapp/WEB-INF/classes/myapp/DemoServlet.class
Unable to update app: Class file is Java 8 but max supported is Java 7: /target/webapp/WEB-INF/classes/myapp/DemoServlet.class

I have switched back to 2.11.11 without any issues. This post is to keep everyone informed.

I would say the problem is that Google AppEngine restricts you to an outdated Java version.

Scala 2.12 compiles to Java 8. I believe Google App Engine only supports Java 7 natively, but does support Java 8 for some other services. I think the solution is to continue using scala 2.11.x until GAE upgrades.

Use the new GAE “flexible environment.”
https://cloud.google.com/appengine/docs/flexible/