How to set GWT facet's language level to 1.8
Answered
Hello,
We have a GWT 2.8.2 project with Java language level 1.8 (set by Maven).
Everything works correctly, the code compiles, runs, etc.
But Idea Ultimate 2020.3.2 keeps giving errors like: "Lambda expressions are not supported at language level '6' (configured by GWT facet)"
Although these errors are displayed only in the editor when a GWT Java class is opened (as I wrote, everything works as expected), they are very annoying when we edit GWT Java code.
Is there a way to let the GWT facet know that Java 1.8 features are safe to use even in GWT sources?
Thanks.
Please sign in to leave a comment.
See https://youtrack.jetbrains.com/issue/IDEA-210699#focus=Comments-27-3502477.0-0
Setting
<sourceLevel>x</sourceLevel>works for applications, thanks.But it's not a solution for GWT library projects (where the gwt-maven-plugin is not applied on the project).
I removed the GWT facet from the problematic GWT library project...
Just add `-sourceLevel 1.8` into the compiler parameters of the GWT facet.