jamesfredley opened a new pull request, #15615: URL: https://github.com/apache/grails-core/pull/15615
## Summary - Adds a `-PskipMicronautTests` project property in `settings.gradle` that gates the Grails-Micronaut "island" (`grails-micronaut`, `grails-micronaut-bom`, and the 5 Micronaut-tied test-examples) out of the build graph entirely. - Wires `-PskipMicronautTests` into `.github/workflows/groovy-joint-workflow.yml` so the joint Groovy 4 snapshot build never evaluates the Groovy-5-pinned subgraph. - Documents the new property in `gradle.properties` for discoverability. ## Why The `Swap Groovy Version` step in the joint workflow rewrites **every** `'groovy.version'` line in `dependencies.gradle` - including the override inside the `else if (project.name == 'grails-micronaut-bom')` block - to the locally built `apache/groovy` 4.x snapshot. That BOM still pins Spock to `2.4-groovy-5.0` (intentionally, to match the Micronaut platform's Groovy 5 baseline), so when a test-example that opts into `enforcedPlatform(:grails-micronaut-bom)` tries to compile a Spock spec, Spock's compile-time Groovy major-version check refuses Groovy 4 and the build fails: ``` > Task :grails-test-examples-issue-11767:compileIntegrationTestGroovy FAILED > Task :grails-test-examples-micronaut:compileIntegrationTestGroovy FAILED ``` The architectural intent of `grails-micronaut-bom` (introduced in 2226af99fe) is exactly to give Micronaut its own dependency graph. This change finishes that isolation for the joint build instead of spreading Spock's `iKnowWhatImDoing.disableGroovyVersionCheck` escape hatch into `CompilePlugin` / `gradle/test-config.gradle` / every test-example. ## Modules gated by the flag | Module | Reason | |---|---| | `grails-micronaut` | Plugin that re-exports the Micronaut platform | | `grails-micronaut-bom` | The Groovy 5 / Spock 2.4-groovy-5.0 island | | `grails-test-examples-issue-11767` | `enforcedPlatform(:grails-micronaut-bom)` | | `grails-test-examples-plugins-issue-11767` | `enforcedPlatform(:grails-micronaut-bom)` | | `grails-test-examples-micronaut` | `enforcedPlatform(:grails-micronaut-bom)` | | `grails-test-examples-micronaut-groovy-only` | `enforcedPlatform(:grails-micronaut-bom)` | | `grails-test-examples-plugins-micronaut-singleton` | `enforcedPlatform(:grails-micronaut-bom)` | ## Verification Both flag states verified locally with JDK 21: ```bash # Without flag - includes the Micronaut subgraph (baseline behaviour) ./gradlew projects | grep micronaut +--- Project ':grails-micronaut' +--- Project ':grails-micronaut-bom' +--- Project ':grails-test-examples-issue-11767' +--- Project ':grails-test-examples-plugins-issue-11767' project ':grails-test-examples-micronaut' ... project ':grails-test-examples-micronaut-groovy-only' ... ... # With flag - subgraph disappears entirely (joint build behaviour) ./gradlew projects -PskipMicronautTests | grep -i micronaut (no output) BUILD SUCCESSFUL in 8s ``` `./gradlew codeStyle` -> BUILD SUCCESSFUL. ## Notes - The flag is opt-in. Local builds and the standard `gradle.yml` CI run are unaffected; only `groovy-joint-workflow.yml` opts in. - No changes to `dependencies.gradle`, `CompilePlugin.groovy`, `gradle/test-config.gradle`, or any individual Micronaut module's `build.gradle`. The gating logic lives in exactly one place (`settings.gradle`). - This is a CI-only fix; it does not change the dependency graph or behaviour of any released artifact. Fixes #15613 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
