I have a Groovy problem as I noticed something odd when upgrading one of our projects from Java 17 to Java 21, using Gradle 8.12.1.
The compiled Java code will be on Java 21 level, but the compiled Groovy code will be fallbacked to Java 8 language level.
If I set the targetCompatibility for GroovyCompile I can make the Groovy code be compiled on Java 17 language level (or any lower), but not any higher.
Is this a know issue, or can I have missed something in my configuration?
I add a small example project for you to see what I mean.