Using Java 8 features in a play project causes the following error:
$ gradle runPlayBinary :createPlayBinaryAssetsJar :routesCompileRoutesSourcesPlayBinary :twirlCompileTwirlTemplatesPlayBinary :scalaCompilePlayBinary FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':scalaCompilePlayBinary'. > Unknown constant: 18 * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
To reproduce, clone the repo at https://github.com/khernyo/gradle-play-java8-bug (I’m not allowed to upload a file here…) and run:
Please note that there is no such problem in an ordinary java/scala mixed project, so I’m guessing that an old sbt is used for compiling play projects.
I’m using Gradle version 2.5