Micronaut Framework 4.0, to be released in 2023, supports Apache Groovy 4.0. Apache Groovy 4.0 adds new features such as:
- Switch expressions
- Supports using a
sealed
keyword or a@Sealed
annotation when writing a sealed type. - Records and record-like classes
- Built-in type checkers
- Built-in macro methods
- JavaShell
- POJO Annotation
- Groovy Contracts
- GINQ
- TOML Support
- GString performance improvements
- Enhanced Ranges
- JSR308 improvements
FYI:
sealed
wasn't previously a keyword, so that might break existing code. That was the case in one of our modules where a test/example class had a field named 'sealed'. I fixed that in a PR some time ago.