BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Grails 5.0 Updates Underlying Frameworks and Consolidates Features

Grails 5.0 Updates Underlying Frameworks and Consolidates Features

This item in japanese

Bookmarks

The Grails Foundation has released Grails 5.0 featuring deprecation of the "dot"-Based Navigation to configuration; default autowire by type in Data Services; the decoupling of Grails Gradle Plugin from the grails-core; and the removal of the Grails Gradle Publish plugin from the grails-plugin applications. This release also includes dependency upgrades of Apache Groovy 3, Micronaut Framework 3, Gradle 7, Spring Boot 2.5, Spring Framework 5.3 and Spock 2.0.

Grails promises high productivity by combining, in one pot as it were, all the ingredients: "Convention-over-configuration, sensible defaults, opinionated APIs, and the Groovy language" with a clear purpose: making "Grails framework easy to learn for Java developers".

Grails 5 will take advantage of the new features and capabilities offered by Apache Groovy 3, including the new Parrot parser. It supports additional syntax and language features, such as lambda expressions, default methods with interfaces and several extension methods to existing Java classes. The minimal Java version was increased to JDK 8 as Grails 5 was built with Groovy 3.0.7 being tested up to JDK 14.

Another noteworthy change is the dependency upgrades to Spring Framework 5.3.10 and Spring Boot 2.5.5.

Starting with this version, the "dot"-based navigation to Grails configuration is deprecated, hence it will be removed in the future. The recommendation is for developers to update their plugin configuration to use the @ConfigurationProperties or @Value annotations in their Grails projects. The alternative is accessing configuration settings by using grailsApplication.config.getProperty('a.b.c', String) instead of grailsApplication.config.a.b.c.

A new default autowire by type replaces the existing autowiring by name mechanism. Developers may still use the Spring @Qualifier annotation to autowire by name.

There are also changes with the Gradle plugins: the Grails Gradle Plugin will no longer be a part of the grails-core and it could get a separate versioning in the future, so developers should decouple the grailsVersion Gradle property from grailsGradlePluginVersion in existing applications. When JFrog shut down Bintray earlier this year, the Grails Gradle Publish Plugin stopped working as it used Bintray API to publish artifacts. As a result, this plugin is not part of the new Grails plugin applications anymore.

The improvements on the Grails Framework will continue over the upcoming months with changes in Grails CLI, Grails Guides, and the Grails documentation around integration with Micronaut.

Grails, originally named Groovy on Rails, was co-founded in July 2005 by Graeme Rocher, Guillaume LaForge, Steven Devijver and Dierk König. Thirteen years after its initial release, Grails has reached its fifth major milestone, continuing on its journey of increasing development productivity. Inspired by Ruby on Rails, it tried to achieve improved productivity by following the "code-by-convention" paradigm, thus hiding the configuration complexity from the developer and providing a ready-to-use development environment. The seamless integration with Java allowed it to take advantage of the rich ecosystem that was built over the years.

Under the auspices of the recently-established Grails Foundation, the future of Grails will be determined with the guidance of the Technical Advisory Board, composed of:

  • Jeff Scott Brown - Grails Foundation, co-founder and director; Grails practice lead at OCI
  • Graeme Rocher - Grails co-founder; architect at Oracle
  • Puneet Behl - Grails product development lead at OCI
  • David Estes - Co-founder and VP of engineering at Morpheus Data; creator of the Grails Asset-Pipeline
  • James Kleeh - Micronaut product development lead at OCI

Developers should expect a smooth upgrade from Grails Framework 4, as there are not many API changes in Grails Framework 5. The plugins should work without many hurdles, except if they are using specific Spring, Spring Boot or Groovy APIs that have been altered in any way.

Rate this Article

Adoption
Style

BT