libgdx/gdx-liftoff

Set java version in tandem

dbder opened this issue · 1 comments

dbder commented

When i select java 17 i would like to have subprojects be java 17 as well, or get a warning.

When i created a java17 project with only LWJGL 3 lwjgl was java 8. that combination did not work.

Right now the behavior Liftoff uses is to allow desktop and server Java versions to be different from other versions (since Android, iOS, and GWT usually are limited to language level 8, or possibly 11 in specific cases). This has been confusing in the past and I'd like to change the default, as long as there's some way to still set the language level for server and desktop modules. Server modules in particular don't often share much code with the rest of the project, and can easily use a more recent Java version.

I believe the simplest fix for your use case is to set the desktop Java version (on the advanced tab) when you set the main Java version (on the same tab), since in this case they should be the same. I probably should make the desktop Java version use the higher of its setting and the main Java version, which would set both to 17 if I implement that and reproduce this condition.