Copilot commented on code in PR #15615:
URL: https://github.com/apache/grails-core/pull/15615#discussion_r3171645265


##########
settings.gradle:
##########
@@ -470,6 +465,30 @@ includeBuild('./build-logic') {
     name = 'build-logic-root'
 }
 
+// Grails-Micronaut "island" - kept on its own dependency graph because the 
Micronaut
+// platform pins Groovy 5 / Spock 2.4-groovy-5.0, which is incompatible with 
the
+// Groovy 4 / Spock 2.3-groovy-4.0 stack the rest of grails-core targets. 
Skipping
+// these projects (via -PskipMicronautTests) keeps Micronaut's version 
overrides
+// from leaking into builds where Groovy 4 is in play (notably the joint 
validation
+// build that swaps in an apache/groovy 4.x snapshot).
+if (!skipMicronautTests) {
+    include(
+            'grails-micronaut-bom',
+            'grails-micronaut',
+            'grails-test-examples-issue-11767',
+            'grails-test-examples-micronaut',
+            'grails-test-examples-micronaut-groovy-only',
+            'grails-test-examples-plugins-issue-11767',
+            'grails-test-examples-plugins-micronaut-singleton',
+    )
+    project(':grails-micronaut-bom').projectDir = file('grails-bom/micronaut')
+    project(':grails-test-examples-issue-11767').projectDir = 
file('grails-test-examples/issue-11767')
+    project(':grails-test-examples-micronaut').projectDir = 
file('grails-test-examples/micronaut')
+    project(':grails-test-examples-micronaut-groovy-only').projectDir = 
file('grails-test-examples/micronaut-groovy-only')
+    project(':grails-test-examples-plugins-issue-11767').projectDir = 
file('grails-test-examples/plugins/issue-11767')
+    project(':grails-test-examples-plugins-micronaut-singleton').projectDir = 
file('grails-test-examples/plugins/micronaut-singleton')
+}

Review Comment:
   With `-PskipMicronautTests`, this settings change removes 
`:grails-micronaut-bom` from the build, but other included projects still 
reference it directly at configuration time (e.g. `grails-doc/build.gradle` 
configures `generateBomDocumentation` with `project(':grails-micronaut-bom')`). 
That will cause the build to fail when the flag is enabled. Consider also 
gating those references (use `findProject(...)` checks) or excluding the 
dependent docs task/project when `skipMicronautTests` is set.



##########
settings.gradle:
##########
@@ -73,6 +73,16 @@ buildCache {
 
 rootProject.name = 'grails.core.ROOT'
 
+// When set, the Grails-Micronaut "island" is excluded from the build graph 
entirely:
+//   * grails-micronaut (Grails plugin that re-exports the Micronaut platform)
+//   * grails-micronaut-bom (overrides Groovy/Spock to Groovy 5 / Spock 
2.4-groovy-5.0)
+//   * the five grails-test-examples that consume grails-micronaut-bom
+//
+// Used by .github/workflows/groovy-joint-workflow.yml so the joint Groovy 4 
snapshot
+// build does not try to compile Spock specs against a Groovy-5-only Spock 
artifact.
+// See https://github.com/apache/grails-core/issues/15613.
+def skipMicronautTests = 
providers.gradleProperty('skipMicronautTests').isPresent()

Review Comment:
   `providers.gradleProperty('skipMicronautTests').isPresent()` treats *any* 
value (including `-PskipMicronautTests=false`) as enabled. This also doesn’t 
match the documented `#skipMicronautTests=true` example in `gradle.properties`, 
which implies a boolean value is respected. Suggest parsing the property as a 
boolean (treat empty/no-value as true for `-PskipMicronautTests`) so users can 
explicitly set it to false when needed.
   ```suggestion
   def skipMicronautTests = providers.gradleProperty('skipMicronautTests')
           .map { it.trim().isEmpty() ? true : it.toBoolean() }
           .getOrElse(false)
   ```



-- 
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]

Reply via email to