Micronaut island is excluded from Groovy 6 builds, making Groovy 6 snapshots incomplete
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
The Micronaut island is excluded from any build whose root Groovy version is not Groovy 5. On a Groovy 6 build - such as the Grails 9 / Groovy 6 canary (#15558) and any Groovy 6 snapshot produced from it - the following are silently dropped from the build and therefore absent from published artifacts:
- `grails-micronaut-bom`
- the Micronaut-dependent modules in the island
- the `grails-test-examples` that consume `grails-micronaut-bom`
## Why
`settings.gradle` gates the island on both the build JDK and the Groovy major version:
```groovy
def buildGroovyVersionLine = file('dependencies.gradle').readLines().find { it.contains("'groovy.version'") }
def buildGroovySupportsMicronaut = buildGroovyVersionLine?.contains("'5.") ?: false
def skipMicronautProjects = explicitlySkipMicronaut ||
((!buildJdkSupportsMicronaut || !buildGroovySupportsMicronaut) && !explicitlyIncludeMicronaut)
```
The island builds against the Micronaut 5 platform, which pins Groovy 5 and Spock `2.4-groovy-5.0`, so it cannot participate in the same build graph as a different root Groovy major. It also targets JVM 25 bytecode, which is the separate pre-existing reason it is excluded on a sub-25 JDK.
The gate is deliberate and correct as a stopgap: without it, a Groovy 6 build fails outright on the island's Groovy 5 constraints. But it means a Groovy 6 build is quietly incomplete rather than failing loudly.
## What needs to happen
Someone needs to work out how the Micronaut island can participate in a Groovy 6 build, or how Grails should ship without it on that line. Open questions:
1. Does the Micronaut 5 platform work on Groovy 6 at all, or does it need a Micronaut release built against Groovy 6?
2. If the island cannot move, should `grails-micronaut-bom` and the Micronaut modules be published from a separate Groovy 5 build so Groovy 6 snapshots are still complete?
3. Should a Groovy 6 build FAIL loudly when the island is skipped, instead of silently excluding it, so the incompleteness is not discovered downstream?
4. The island also pins Spock `2.4-groovy-5.0`, which is incompatible with Groovy 6 independently of Micronaut - see #16157 for the Spock situation.
## Workaround
`-PincludeMicronautProjects` force-includes the island on any JDK and any Groovy version. It is expected to fail on a Groovy 6 build; it exists for deliberate experimentation.
## Context
Raised while preparing #15558 (Grails 9 on Groovy 6.0.0-beta-2). Groovy 6 RC1 is expected shortly, so Grails 9 needs a position on this. Accepting the exclusion is a conscious decision for now, and this issue records what was deferred rather than leaving it implicit in a `settings.gradle` predicate.
Contributor guide
Research direction
Start with the Micronaut gating predicate in settings.gradle and the Groovy version definition in dependencies.gradle; compare the Groovy 6 canary context in #15558 and the Spock constraint in #16157. Determine whether the island can join Groovy 6 builds or requires a separate publishing path, and define how builds should report or account for its exclusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100