borinquenkid commented on code in PR #16725: URL: https://github.com/apache/grails-core/pull/16725#discussion_r4365057665
########## grails-gradle/AGENTS.md: ########## @@ -0,0 +1,55 @@ +<!-- +SPDX-License-Identifier: Apache-2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Agent Guide for grails-gradle + +> **IMPORTANT**: `grails-gradle` holds the Grails Gradle plugins that applications apply. It has its own +> `settings.gradle` and its own CI jobs, but it shares the root's dependency management: `build.gradle` applies the +> root's `dependencies.gradle`, so versions are managed there. It is build tooling, not Grails application code, so +> two of the root rules do not apply here (see below). Root [`AGENTS.md`](../AGENTS.md) still governs PR, branch and +> review conventions and repository-wide policy. + +## Quick Reference + +Run from inside `grails-gradle/`: + +```bash +./gradlew build --continue +./gradlew build -PskipTests -PskipCodeStyle +./gradlew validateDependencyVersions --continue +``` + +## Rules That Differ From Root + +1. **Use plain `@CompileStatic`, not `@GrailsCompileStatic`.** The plugins are Gradle code, not Grails artefacts; the only `@GrailsCompileStatic` mentions in this build are documentation of what a plugin configures for an application. +2. **`javax.inject.Inject` and `javax.xml.*` are correct here.** They are JSR-330 and JDK APIs, not Jakarta EE packages. The `jakarta.*` references in this build configure a downstream application's dependencies. +3. **Versions are not pinned here.** `gradle.properties` holds daemon and cache settings only; `build.gradle` applies the root's `dependencies.gradle`. Bump versions in the root file. +4. **Tests are Gradle TestKit tests.** Plugin specs extend `GradleSpecification` (`plugins/src/test/groovy/org/grails/gradle/plugin/core/GradleSpecification.groovy`) and run a real Gradle build against a generated project, not a mocked Grails application. Review Comment: Fixed in e08436b6ad: rewritten as you suggested (23 `GradleSpecification` specs under TestKit, the rest plain Spock). I did not repeat the 38 count; I count 37 plain specs, so the line gives no number for them. ########## grails-gradle/AGENTS.md: ########## @@ -0,0 +1,55 @@ +<!-- +SPDX-License-Identifier: Apache-2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Agent Guide for grails-gradle + +> **IMPORTANT**: `grails-gradle` holds the Grails Gradle plugins that applications apply. It has its own +> `settings.gradle` and its own CI jobs, but it shares the root's dependency management: `build.gradle` applies the +> root's `dependencies.gradle`, so versions are managed there. It is build tooling, not Grails application code, so +> two of the root rules do not apply here (see below). Root [`AGENTS.md`](../AGENTS.md) still governs PR, branch and +> review conventions and repository-wide policy. + +## Quick Reference + +Run from inside `grails-gradle/`: + +```bash +./gradlew build --continue +./gradlew build -PskipTests -PskipCodeStyle +./gradlew validateDependencyVersions --continue +``` + +## Rules That Differ From Root + +1. **Use plain `@CompileStatic`, not `@GrailsCompileStatic`.** The plugins are Gradle code, not Grails artefacts; the only `@GrailsCompileStatic` mentions in this build are documentation of what a plugin configures for an application. +2. **`javax.inject.Inject` and `javax.xml.*` are correct here.** They are JSR-330 and JDK APIs, not Jakarta EE packages. The `jakarta.*` references in this build configure a downstream application's dependencies. +3. **Versions are not pinned here.** `gradle.properties` holds daemon and cache settings only; `build.gradle` applies the root's `dependencies.gradle`. Bump versions in the root file. +4. **Tests are Gradle TestKit tests.** Plugin specs extend `GradleSpecification` (`plugins/src/test/groovy/org/grails/gradle/plugin/core/GradleSpecification.groovy`) and run a real Gradle build against a generated project, not a mocked Grails application. + +## Project Structure + +| Directory | Gradle project | Role | +|---|---|---| +| `bom/` | `:grails-gradle-bom` | A `java-platform` constraining the sibling projects | +| `common/` | `:grails-gradle-common` | Shared utilities | +| `model/` | `:grails-gradle-model` | The subset of Grails runtime classes the plugins need at build time, before the framework is on the classpath | +| `plugins/` | `:grails-gradle-plugins` | The `Plugin<Project>` implementations | +| `tasks/` | `:grails-gradle-tasks` | The task classes | + +## CI + +The build-health, code-style, code-analysis, coverage and release workflows under `.github/workflows` each have a job Review Comment: Fixed in e08436b6ad: `gradle.yml` comes first with `buildGradle` (JDK 21 and 25, `--rerun-tasks` or `-PskipTests`), the two validate jobs and `publishGradle`. `end-to-end.yml` does not include the build: it publishes `grails-gradle` to a local repository its tests resolve from, and the line says that. ########## grails-gradle/AGENTS.md: ########## @@ -0,0 +1,55 @@ +<!-- +SPDX-License-Identifier: Apache-2.0 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Agent Guide for grails-gradle + +> **IMPORTANT**: `grails-gradle` holds the Grails Gradle plugins that applications apply. It has its own +> `settings.gradle` and its own CI jobs, but it shares the root's dependency management: `build.gradle` applies the +> root's `dependencies.gradle`, so versions are managed there. It is build tooling, not Grails application code, so +> two of the root rules do not apply here (see below). Root [`AGENTS.md`](../AGENTS.md) still governs PR, branch and +> review conventions and repository-wide policy. + +## Quick Reference + +Run from inside `grails-gradle/`: + +```bash +./gradlew build --continue +./gradlew build -PskipTests -PskipCodeStyle +./gradlew validateDependencyVersions --continue +``` + +## Rules That Differ From Root + +1. **Use plain `@CompileStatic`, not `@GrailsCompileStatic`.** The plugins are Gradle code, not Grails artefacts; the only `@GrailsCompileStatic` mentions in this build are documentation of what a plugin configures for an application. +2. **`javax.inject.Inject` and `javax.xml.*` are correct here.** They are JSR-330 and JDK APIs, not Jakarta EE packages. The `jakarta.*` references in this build configure a downstream application's dependencies. +3. **Versions are not pinned here.** `gradle.properties` holds daemon and cache settings only; `build.gradle` applies the root's `dependencies.gradle`. Bump versions in the root file. +4. **Tests are Gradle TestKit tests.** Plugin specs extend `GradleSpecification` (`plugins/src/test/groovy/org/grails/gradle/plugin/core/GradleSpecification.groovy`) and run a real Gradle build against a generated project, not a mocked Grails application. + +## Project Structure + +| Directory | Gradle project | Role | +|---|---|---| +| `bom/` | `:grails-gradle-bom` | A `java-platform` constraining the sibling projects | +| `common/` | `:grails-gradle-common` | Shared utilities | +| `model/` | `:grails-gradle-model` | The subset of Grails runtime classes the plugins need at build time, before the framework is on the classpath | +| `plugins/` | `:grails-gradle-plugins` | The `Plugin<Project>` implementations | +| `tasks/` | `:grails-gradle-tasks` | The task classes | Review Comment: Fixed in e08436b6ad: `buildSrc/` is in the table, with the note that it is the one part of the build that is not an included project. -- 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]
