Show Navigation

Grails 7.0.0-M1 - Release Announcement

By James Fredley

December 23, 2024

The Grails Foundation is excited for the release of Grails Framework 7.0.0-M1.
We encourage you to try this pre-release and provide your feedback here.

What's Changed

  • New minimum versions introduced:
    • Gradle 8
    • Groovy 4
    • Java 17
    • Sitemesh 3
    • Spring Boot 3.4 (Spring Framework 6.2)
  • Default integration of the Micronaut Framework has been removed from Grails. Use Micronaut for Spring to add Micronaut support to your Grails application.

With the release of Grails 7.0.0-M1, we have:

  • Added support for:
    • Gradle 8.12
    • Groovy 4.0.24
    • Java 17-23, 17 and 21 are LTS
    • Sitemesh 3
    • Spring Boot 3.4.1 & Spring Framework 6.2.1, including transition from javax to jakarta namespace.
  • Added default support for containerized browser testing using Testcontainers through the Geb Grails Plugin, eliminating web browser version synchronization issues. A container runtime environment is now required for Geb functional and integration tests.
    • This has also been backported for Grails 6.x compatiblility via Geb 4.1.1
  • Testcontainers features are also available on Grails Forge and Grails Forge CLI for MySQL, PostgreSQL, SQL Server and MongoDB.
  • Support for Live Reload via Hotswap Agent: current integration details. This was made possible by the removal of the default Micronaut parent application context.
  • Reintroduced the grails-shell, grails-wrapper and grails-profiles that were removed in Grails 6.
    • Update to the latest wrapper release based on Grails version with ./grailsw update-wrapper
  • Updated the default styling to use Bootstrap 5.3.3. Both Scaffolding and Fields now support Bootstrap classes.
  • Reduced deployment sizes (currently pending, due to Graalvm dependencies required for test and bootRun by asset-pipeline).
  • Enhanced the Grails BOM by adding more versions and extending the Spring Boot BOM for streamlined dependency management. Grails Gradle Plugins apply the BOM by default. If using buildSrc, ensure it is manually applied.
  • Removed the -plain suffix from the JAR artifact output in Grails Plugin projects.
  • Disabled all artifact outputs except the JAR artifact for the assemble task in Grails Plugin projects.
  • Introduced a new tag, g:formActionSubmit, to support submitting forms to different actions. The g:actionSubmit tag is now deprecated and will be removed in a future release.
  • Introduced a new annotation, @Scaffold, for Controllers and Services to eliminate common boilerplate in the Scaffolding Plugin.
  • Resolved multiple issues related to Controller namespace support.
  • Begun the process of discontinuing bean overriding in the core framework by adopting standard Spring Auto-configuration.
  • Enhanced the g:form tag to include CSRF protection when Spring Security CSRF is enabled.
  • Decoupled a significant amount of dependencies in Grails, enabling easier maintenance moving forward.
  • Upgraded external dependencies to the latest available versions.
  • Removed tight coupling with Sitemesh. Sitemesh 3 is now the default version.
  • Default Support for evironment specific logging configuration via Spring Logback Extensions in logback-spring.xml
  • Grails Forge does not generate buildSrc/ or settings.gradle by default, but they are optional features. This simplifies build and Gradle plugin configuration and consolidates version management into one location.

Dependency Upgrades

Staying current with the latest dependencies is essential for the health of any framework. In this release, we've upgraded several dependencies to their latest versions, including but not limited to the following:

  • Asset Pipeline 5.0.5
  • Geb 7.0
  • H2 2.3.232
  • Hibernate 5.6.15.Final (Jakarta version)
  • Jackson 2.18.2
  • Jakarta Servlet 6.0.0
  • JUnit 5.11.4
  • Sitemesh 3.2.2
  • Slf4j 2.0.16
  • Snakeyaml 2.3
  • Spring Boot 3.4.1
  • Spring Framework 6.2.1
  • Tomcat 10.1.34
  • see all on Grails-BOM

As part of the Grails 7.0.0-M1 release we have also released milestones of the following:

  • org.grails.plugins:async:6.0.0-M2
  • org.grails.plugins:audit-logging:6.0.0-M4
  • org.grails.plugins:cache:8.0.0-M2
  • org.grails.plugins:converters:6.0.0-M1
  • org.grails.plugins:database-migration:6.0.0-M1
  • org.grails.plugins:events:6.0.0-M2
  • org.grails.plugins:fields:6.0.0-M1
  • org.grails.plugins:geb:5.0.0-M2
  • org.grails.plugins:grails-redis:5.0.0-M1
  • org.grails.plugins:grails-web-console:7.0.0-M2
  • org.grails.plugins:gsp:7.0.0-M1
  • org.grails.plugins:hibernate5:9.0.0-M2
  • org.grails.plugins:mongodb:9.0.0-M2
  • org.grails.plugins:quartz:4.0.0-M1
  • org.grails.plugins:scaffolding:6.0.0-M1
  • org.grails.plugins:spring-security-core:7.0.0-M1
  • org.grails.plugins:spring-security-ldap:5.0.0-M2
  • org.grails.plugins:spring-security-rest:6.0.0-M1
  • org.grails.plugins:spring-security-rest-gorm:6.0.0-M1
  • org.grails.plugins:spring-security-rest-grailscache:6.0.0-M1
  • org.grails.plugins:spring-security-rest-memcached:6.0.0-M1
  • org.grails.plugins:spring-security-rest-redis:6.0.0-M1
  • org.grails.plugins:spring-security-rest-testapp-profile:6.0.0-M1
  • org.grails.plugins:views-gradle:4.0.0-M1
  • org.grails.plugins:views-json:4.0.0-M1
  • org.grails.plugins:views-json-templates:9.0.0-M2
  • org.grails.plugins:views-markup:4.0.0-M1
  • org.grails.profiles:angular:10.0.1
  • org.grails.profiles:base:7.0.1
  • org.grails.profiles:plugin:7.0.1
  • org.grails.profiles:profile:7.0.1
  • org.grails.profiles:react:7.0.1
  • org.grails.profiles:rest-api:7.0.1
  • org.grails.profiles:rest-api-plugin:7.0.1
  • org.grails.profiles:vue:7.0.1
  • org.grails.profiles:web:7.0.1
  • org.grails.profiles:web-plugin:7.0.1
  • org.grails:grails-async:6.0.0-M2
  • org.grails:grails-async-gpars:6.0.0-M2
  • org.grails:grails-async-rxjava:6.0.0-M2
  • org.grails:grails-async-rxjava2:6.0.0-M2
  • org.grails:grails-bootstrap:7.0.0-M1
  • org.grails:grails-codecs:7.0.0-M1
  • org.grails:grails-console:7.0.0-M1
  • org.grails:grails-core:7.0.0-M1
  • org.grails:grails-databinding:7.0.0-M1
  • org.grails:grails-datastore-async:9.0.0-M2
  • org.grails:grails-datastore-core:9.0.0-M2
  • org.grails:grails-datastore-gorm:9.0.0-M2
  • org.grails:grails-datastore-gorm-async:9.0.0-M2
  • org.grails:grails-datastore-gorm-hibernate5:9.0.0-M2
  • org.grails:grails-datastore-gorm-mongodb:9.0.0-M2
  • org.grails:grails-datastore-gorm-rx:9.0.0-M2
  • org.grails:grails-datastore-gorm-support:9.0.0-M2
  • org.grails:grails-datastore-gorm-tck:9.0.0-M2
  • org.grails:grails-datastore-gorm-test:9.0.0-M2
  • org.grails:grails-datastore-gorm-validation:9.0.0-M2
  • org.grails:grails-datastore-web:9.0.0-M2
  • org.grails:grails-dependencies:7.0.0-M1
  • org.grails:grails-docs:7.0.0-M1
  • org.grails:grails-encoder:7.0.0-M1
  • org.grails:grails-events-gpars:6.0.0-M2
  • org.grails:grails-events-rxjava:6.0.0-M2
  • org.grails:grails-events-rxjava2:6.0.0-M2
  • org.grails:grails-gorm-testing-support:4.0.0-M2
  • org.grails:grails-gradle-model:7.0.0-M1
  • org.grails:grails-gradle-plugin:7.0.0-M3
  • org.grails:grails-gsp:7.0.0-M1
  • org.grails:grails-logging:7.0.0-M1
  • org.grails:grails-plugin-codecs:7.0.0-M1
  • org.grails:grails-plugin-controllers:7.0.0-M1
  • org.grails:grails-plugin-databinding:7.0.0-M1
  • org.grails:grails-plugin-datasource:7.0.0-M1
  • org.grails:grails-plugin-domain-class:7.0.0-M1
  • org.grails:grails-plugin-i18n:7.0.0-M1
  • org.grails:grails-plugin-interceptors:7.0.0-M1
  • org.grails:grails-plugin-mimetypes:7.0.0-M1
  • org.grails:grails-plugin-rest:7.0.0-M1
  • org.grails:grails-plugin-services:7.0.0-M1
  • org.grails:grails-plugin-url-mappings:7.0.0-M1
  • org.grails:grails-plugin-validation:7.0.0-M1
  • org.grails:grails-shell:7.0.0-M1
  • org.grails:grails-spring:7.0.0-M1
  • org.grails:grails-test:7.0.0-M1
  • org.grails:grails-testing-support:4.0.0-M2
  • org.grails:grails-test-suite-base:7.0.0-M1
  • org.grails:grails-test-suite-persistence:7.0.0-M1
  • org.grails:grails-test-suite-uber:7.0.0-M1
  • org.grails:grails-test-suite-web:7.0.0-M1
  • org.grails:grails-web:7.0.0-M1
  • org.grails:grails-web-boot:7.0.0-M1
  • org.grails:grails-web-common:7.0.0-M1
  • org.grails:grails-web-databinding:7.0.0-M1
  • org.grails:grails-web-gsp:7.0.0-M1
  • org.grails:grails-web-mvc:7.0.0-M1
  • org.grails:grails-web-taglib:7.0.0-M1
  • org.grails:grails-web-testing-support:4.0.0-M2
  • org.grails:grails-web-url-mappings:7.0.0-M1
  • org.grails:grails7-wrapper:6.0.0
  • org.grails:views-json-testing-support:4.0.0-M1

Installing Grails 7.0.0-M1

Try out Grails 7.0.0-M1 today by visiting the online app creator - Grails Forge. Alternatively, you can quickly install Grails 7.0.0-M1 using the SDKMan.

  1. If you don't have SDKMan installed, follow the instructions at SDKMan Installation Guide to set it up.

  2. Once SDKMan is installed, open your terminal and run the following command to install Grails 7.0.0-M1:

    sdk install grails 7.0.0-M1
    
  3. You're all set! To verify the installation, run:

    grails --version
    

Upgrading Your Existing Applications to Grails 7.0.0-M1

If you already have a Grails application and want to upgrade to the latest version, follow these steps:

  1. Open the project in your favorite IDE (preferably JetBrains' IntelliJ IDEA).

  2. Update your application's gradle.properties file to specify Grails 7.0.0-M1 as the desired version.

    grailsVersion=7.0.0-M1
    grailsGradlePluginVersion=7.0.0-M3
    
  3. Make any necessary adjustments to your application code, configuration, and dependencies to ensure compatibility with the new version. See https://docs.grails.org/7.0.0-M1/guide/single.html#upgrading60x.

Normally, Grails Core dependencies are automatically updated using the Grails Bill of Materials (BOM). However, if you have specific versions defined in your build configuration, you may need to manually update them to align with Grails 7.0.0-M1.

By following these steps, you can smoothly transition your existing Grails application to the exciting Grails 7.0.0-M1.

Exploring Alternative Approaches

If manual dependency updates seem daunting, or you want a more streamlined approach, consider the following alternatives:

1. Use Grails Forge Website

Visit Grails Forge and generate a new Grails application with Grails 7.0.0-M1. Compare the versions in the newly generated application with your existing one to identify any discrepancies. This can serve as a reference point for your update.

2. Automated Dependency Update Bots

Configure automated dependency update bots like Renovate or Dependabot with your source control platform (e.g., GitHub). These bots can automatically detect and update outdated dependencies in your project, including Grails dependencies, saving you time and effort in manual updates.

With these steps and alternative approaches, you should be well on your way to enjoying the exciting features and improvements in Grails 7.0.0-M1. Happy coding!

Why should you try out Grails 7.0.0-M1?

  • Help us test this major upgrade of the Grails Framework and provide feedback.
  • Be ready for when Grails 7 is released.

Grails 7 Release Schedule

  • We will continue to work on updating and fixing issues over the next few weeks.
  • Grails 7 M2 will be released thereafter.
  • Based on feedback, a Grails GA or RC release is targeted for March 2025.

Thank you!

Big thanks to our wonderful community of users for your continued support of the Grails Framework over the past 19 years! With a hopeful outlook towards the future and a deep sense of gratitude, we eagerly anticipate the path that lies ahead, embracing the invaluable chance to develop and pioneer new advancements within this framework.

Contributors

We would like to extend our heartfelt thanks to all the contributors who made Grails 7.0.0-M1 possible. Special thanks to:

Their dedication and hard work have significantly contributed to the release of Grails 7.0.0-M1.

Join the Grails Slack Community, share your feedback, and contribute to making Grails Framework even better in the future. Happy coding!

You might also like ...