Groovy Internals and Version History
48.1 How Groovy Works
GDK: DefaultGroovyMethods, StringGroovyMethods, IOGroovyMethods, ResourceGroovyMethods, NioExtensions, and more: static methods registered as extension methods on JDK classes.
Dynamic dispatch: each call site goes through an indy call site that looks up the MetaClass method and caches it. A metaClass change invalidates the caches.
Source → Antlr4 parser (Parrot, Groovy 3+) → CST → AST → AST transformations (phases)
→ Class generation (ASM bytecode) → .class files / in-memory classes
Runtime: MetaClass system (MOP), call-site caching, invokedynamic bootstrap (Groovy 4: indy-only), GDK (DefaultGroovyMethods)48.2 Version History Highlights
First stable release Java 5 features, AST transformations, command chains, GPars bundled
@TypeChecked, @CompileStatic, invokedynamic support Traits, JSON performance
Android support. Moves to the Apache Software Foundation.
Macros, more AST transforms (@AutoFinal, @NamedVariant, @MapConstructor), JDK 9+ support
Parrot parser: Java syntax compatibility (lambdas, method refs, do-while, try-with-resources, array init), ===, ?=, !in, !instanceof, safe indexing ?[]
org.apache.groovy Maven coordinates, switch expressions, records, sealed types, GINQ, groovy-contracts, groovy-typecheckers, TOML, JPMS-friendly packages, indy-only, removal of legacy packages (groovy.util.XmlSlurper → groovy.xml.XmlSlurper)
JDK 11+ minimum, further JDK 17–24 alignment, many new extension methods, improved type checking, @OperatorRename, enhanced GINQ, more Java-compatible syntax (check the release notes for the full list)
48.3 Community and Contributing
groovy-lang.org (docs), issues.apache.org/jira/browse/GROOVY, mailing lists ([email protected], dev@), GitHub mirror (apache/groovy), the Groovy Slack/Discord communities, and events (Greach, GR8Conf historically, ApacheCon).
Contributing: build with Gradle (./gradlew :test), sign the Apache ICLA for significant contributions, and discuss in JIRA or on the dev list.