grails-8-upgrade

Guides migration of Grails applications from Grails 7.x to Grails 8.

2.9k|973|Updated Feb 10, 2010
One-click install
npx skills add https://github.com/apache/grails-core --skill grails-8-upgrade
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: grails-8-upgrade
Source: https://github.com/apache/grails-core/tree/main/.agents/skills/grails-8-upgrade
Command: npx skills add https://github.com/apache/grails-core --skill grails-8-upgrade

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Upgrading a Grails application from 7.x to Grails 8 involves breaking changes across Spring Boot 4.1, Spring Framework 7, Jackson 3, Hibernate 7, Gradle dependency management, content negotiation, and validation defaults, and missing any of them causes build failures or subtle runtime behavior changes.

Core Features & Use Cases

  • Migration Checklist: Turns the official Grails 8 upgrade guide into an ordered, reversible workflow covering JDK, Gradle, BOM, configuration, and code changes.
  • Breaking Change Reference: Documents Spring Boot 4 starter renames, Jackson 2-to-3 package moves, Hibernate 5 vs Hibernate 7 API replacements, TagLib and test annotation updates, and GORM nullable-default changes.
  • Use Case: When reviewing a Grails 8 upgrade pull request, use this Skill to verify the build uses Gradle platform BOMs instead of the Spring dependency-management plugin, that @MockBean was replaced with @MockitoBean, and that content negotiation behavior was tested with real browser requests.

Quick Start

Ask the assistant to walk through upgrading your Grails 7 application to Grails 8 and flag every breaking change in your build files, configuration, and code.

Frequently Asked Questions about grails-8-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade a Grails 7 application to Grails 8?

Follow an ordered workflow: move to JDK 21+, update the Grails version and Gradle wrapper, boot with the Spring Boot properties migrator, fix dependency management and starter renames, then fix code-level Spring, Jackson, and Hibernate API changes before running tests.

Does Grails 8 require Hibernate 7?

No, Grails 8 supports Hibernate 5 by default. Hibernate 7 is an opt-in via the grails-hibernate7-bom enforced platform, and should only be adopted when the application is ready for Hibernate ORM 7 API removals like session.save and session.delete.

What JDK version does Grails 8 require?

Grails 8 requires JDK 21 or later for ordinary applications. Applications using Micronaut features such as grails-micronaut or micronaut-http-client require JDK 25 or later.

Why did my Grails 8 build fail after removing the Spring dependency-management plugin?

Grails 8 no longer applies the io.spring.dependency-management plugin and instead uses Gradle native platform() with the Grails BOM. Replace pinned versions with direct dependencies or resolutionStrategy.force, and use enforcedPlatform for strict BOM behavior.

Why do my domain objects fail validation after upgrading to Grails 8?

Grails 8 makes unconstrained persistent domain properties nullable by default, reversing the previous behavior. Add nullable: false constraints to required properties or set grails.gorm.default.nullable: false to restore the old application-wide default.

How do Jackson 3 changes affect Grails 8 JSON rendering?

Jackson databind moves to tools.jackson.databind with JsonMapper replacing ObjectMapper, and dates default to ISO-8601 strings. Set spring.jackson.use-jackson2-defaults: true temporarily to keep Jackson 2 behavior during migration.