I am trying to configure the LSP4J build config in a way that the JDK that runs Gradle is decoupled from the JDK that is used to compile and run tests using toolchains. LSP4J targets JDK11 and I'd like to use JDK21 to run Gradle.
However when doing so, the XText compiler emits Java source code with List.getLast() instructions. getLast() is not available in JDK11 thus the compilation fails. I saw that for the XText Gradle Builder Plugin one can specify the Java Source Level via xtext { generator { javaSourceLevel = 11 }} but I cannot find such setting for the Xtend Compiler https://xtext.github.io/xtext-gradle-plugin/xtend.html
How can I instruct the Xtend Compiler not to use Java Features newer than Java 11 in Gradle if I want to run gradle with a newer JDK?
I am trying to configure the LSP4J build config in a way that the JDK that runs Gradle is decoupled from the JDK that is used to compile and run tests using toolchains. LSP4J targets JDK11 and I'd like to use JDK21 to run Gradle.
However when doing so, the XText compiler emits Java source code with List.getLast() instructions.
getLast()is not available in JDK11 thus the compilation fails. I saw that for the XText Gradle Builder Plugin one can specify the Java Source Level viaxtext { generator { javaSourceLevel = 11 }}but I cannot find such setting for the Xtend Compiler https://xtext.github.io/xtext-gradle-plugin/xtend.htmlHow can I instruct the Xtend Compiler not to use Java Features newer than Java 11 in Gradle if I want to run gradle with a newer JDK?