Thanks Paul In this instance we are looking for simple compilation and runtime compatibility. Advanced features of JDKs after 17 are not being expressly used, the code is mostly unchanged since Java 8 / Groovy 2.
I think from your explanation, in our usage, JDK21 and Groovy 4.0.27 will most probably compile and run harmoniously. Regards Rob ________________________________ From: Paul King <pa...@asert.com.au> Sent: Wednesday, July 16, 2025 4:23 PM To: dev@groovy.apache.org <dev@groovy.apache.org> Subject: Re: Release 4.0.27 and JDK21 compatibility You don't often get email from pa...@asert.com.au. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> The major milestone release notes aren't always kept up to date. A slight simplification but, the most accurate JDK support indication is by looking at the JDK version constants in the CompilerConfiguration class. Currently JDK25 for the Groovy 4 and 5 branches. Slightly simplified because Groovy 3 lists JDK17 as the latest by that count. It is the latest version we write to for Groovy 3, though we can read later class files. And there are some things we've targeted for Groovy 5+ that are specific to later JDK versions - so Groovy 4 may not support those special features. Cheers, Paul. On Wed, Jul 16, 2025 at 3:18 PM Robert Manthey via dev <dev@groovy.apache.org<mailto:dev@groovy.apache.org>> wrote: Hi I'm looking for confirmation about whether the 4.0.27 Groovy release can be compiled and run under, and interoperate with, Java 21 (eg: Temurin 21.0.7+6-LTS) as at 16/7/2025. The Release Notes for 4 and 5 say: * The Apache Groovy programming language - Groovy 4.0 release notes<https://groovy-lang.org/releasenotes/groovy-4.0.html#Groovy4.0-requirements> “Groovy 4 has been tested on JDK versions 8 through 17. … 4.0.2 Preliminary JDK19 support has been added“ * The Apache Groovy programming language - Groovy 5.0 release notes<https://groovy-lang.org/releasenotes/groovy-5.0.html#Groovy5.0-requirements> “Groovy 5 has been tested on JDK versions 11 through 25” However there are a number of patches since 4.0.0 that add > JDK17 support. [GROOVY-10479] Disable Ant tests which don't fork under JDK18 - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-10479> [GROOVY-10573] Support ASM JDK19 constants - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-10573> [GROOVY-10782] Support for java 19 - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-10782> [GROOVY-10986] Add JDK21 constant - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-10986> [GROOVY-11197] Support JDK 22 - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-11197> Fix Version/s: 5.0.0-alpha-3<https://issues.apache.org/jira/issues/?jql=project+%3D+GROOVY+AND+fixVersion+%3D+5.0.0-alpha-3>, 4.0.16<https://issues.apache.org/jira/issues/?jql=project+%3D+GROOVY+AND+fixVersion+%3D+4.0.16> [GROOVY-11347] Support JDK 23 - ASF JIRA<https://issues.apache.org/jira/browse/GROOVY-11347> Fix Version/s: 5.0.0-alpha-8<https://issues.apache.org/jira/issues/?jql=project+%3D+GROOVY+AND+fixVersion+%3D+5.0.0-alpha-8>, 4.0.21<https://issues.apache.org/jira/issues/?jql=project+%3D+GROOVY+AND+fixVersion+%3D+4.0.21> * Is the Release Note correct in saying 4.0.27 it is only tested (for production use) to JDK17, or can we rely on the patch content as verification that 4.0.21+ usably supports up to JDK23 now? Thanks Rob *