Grails framework 5 GA Released
October 11, 2021
The Grails Foundation™ is excited to announce the GA release of Grails framework 5!
Overview
This release includes Apache Groovy 3, Micronaut framework 3, Gradle 7, Spring Boot 2.5, Spring framework 5.3, and Spock 2.0.
Apache Groovy 3
Apache Groovy 3 is a major highlight of this release. It comes with a brand new Parrot parser and a bunch of new features and capabilities.
The Parrot parser supports additional syntax and language features, such as lambda expressions, default methods with interfaces, and a lot more. In addition, several new extension methods are added to existing Java classes. See the release notes for Groovy 3.0 for details.
Grails framework 5 is built with Groovy 3.0.7, which requires JDK 8 as the minimum version of JRE. We have tested most Grails projects up to JDK 14.
Spring Upgrade
Grails framework 5 updates to Spring 5.3.10 and Spring Boot 2.5.5. We strongly recommend checking the following Spring technologies release notes for more information.
Important Changes
Deprecating ‘dot’-Based Navigation
The ‘dot’-based navigation to Grails config is deprecated and will be removed in future.
We request that you update your plugins to use configuration beans @ConfigurationProperties
or @Value
, or access configuration settings using grailsApplication.config.getProperty(‘a.b.c’, String)
instead of grailsApplication.config.a.b.c
.
Default Autowire By Type in Data Services
In previous versions, the beans inside the Grails DataService were autowire by name, but this is changed to autowire by type in Grails framework 5. Use the Spring @Qualifier
annotation to autowire by name. For details, see the Spring documentation for Fine-tuning Annotation Based Autowiring with Qualifiers.
Grails Gradle Plugin
The Grails Gradle Plugin is moved out of grails-core and may follow separate versioning, so you should decouple the grailsVersion
Gradle property from grailsGradlePluginVersion
in existing applications.
Grails Gradle Publish Plugin Removed
The Grails Gradle Publish plugin used the Bintray API to publish artifacts. However, after the JFrog shutdown of Bintray, this stopped working. We have removed this plugin from the new Grails Plugin applications.
Get Started with Grails Framework 5
Download
The easiest way to get started is to use SDKMAN! (The Software Development Kit Manager) to download Grails framework 5.0.0. Alternatively, you can download the Grails binary directly from grails.org.
Upgrade
For applications on Grails framework 4, it should be an easy upgrade, as there are not many API changes in Grails framework 5. Also, most Grails framework 4 plugins should work just fine, unless they are using specific Spring, Spring Boot, or Groovy APIs that have been changed or removed.
For members of the Grails plugin community, now is the time to upgrade your plugins and verify they continue to work.
The Road Ahead
In the upcoming months, we will be working on improvements in the Grails CLI, Grails Guides, and the Grails documentation around Micronaut integration.
Thank You
Community involvement is vital for the success of Grails framework. We appreciate the Grails community for the support and feedback throughout this journey. We are excited about this latest release. Please, upgrade your applications to Grails framework 5. We would love to hear about your experience, and if you need any help with your upgrade, we are here to support you.