jamesfredley commented on PR #15587:
URL: https://github.com/apache/grails-core/pull/15587#issuecomment-4321003945
@jdaugherty pushed an integration commit (6b0fe6a5e2) that wires the project
into the monorepo build per your earlier review comment. Summary below.
## Integration into the monorepo build
**Root wiring**
- `settings.gradle`: included three new modules
- `:grails-data-graphql-core` -> `grails-data-graphql/core` (group
`org.apache.grails.data`)
- `:grails-data-graphql` -> `grails-data-graphql/plugin` (group
`org.apache.grails`, the Grails plugin)
- `:grails-data-graphql-docs` -> `grails-data-graphql/docs` (not published)
- `gradle/publish-root-config.gradle`: added `grails-data-graphql` and
`grails-data-graphql-core` to `publishedProjects` so the
`org.apache.grails.gradle.grails-publish` plugin is applied.
- `gradle.properties`: added `graphqlJavaVersion=24.3`,
`graphqlJavaScalarExtVersion=24.0`, `micronautRxjava2Version=2.9.0`. The other
versions (`micronautHttpClientVersion`, `javassistVersion`,
`hibernate5Version`, etc.) were already present.
**Module build files** (rewritten to match the `grails-data-mongodb` layout)
- `grails-data-graphql/core/build.gradle` - applies `groovy`,
`java-library`, `org.apache.grails.buildsrc.{properties,compile,publish,sbom}`,
`org.apache.grails.gradle.grails-code-style`. Pulls `grails-bom` as a platform;
depends on `:grails-datamapping-core`, `:grails-views-gson`,
`com.graphql-java:graphql-java`,
`com.graphql-java:graphql-java-extended-scalars`, `javaparser-core`,
`javassist`. Tests use `:grails-data-hibernate5-core` +
h2/tomcat-jdbc/byte-buddy from the BOM.
- `grails-data-graphql/plugin/build.gradle` - applies
`org.apache.grails.gradle.grails-plugin`, `grails-gson`, plus the same buildsrc
convention plugins. Replaces the
`project(":grails-plugin-gorm-graphql-plugin")` / `project(":gorm-graphql")`
standalone refs with `project(":grails-data-graphql-core")` and project refs to
`:grails-controllers`, `:grails-databinding`, `:grails-rest-transforms` (with
the `grails-converters` exclude preserved), `:grails-url-mappings`,
`:grails-converters`, `:grails-views-gson`. Drops the standalone `profile
"org.apache.grails.profiles:web-plugin"` (matches
`grails-data-hibernate5/grails-plugin`). Disables `bootRun` / `bootTestRun`
like the mongo plugin.
- `grails-data-graphql/docs/build.gradle` - simplified to use `id
'org.asciidoctor.jvm.convert'` against the existing `src/main/docs/index.adoc`
composite (matches the `grails-data-docs/guide-developer` style).
## Removed
- Top-level standalone `grails-data-graphql/{build.gradle, settings.gradle,
gradle.properties}` are gone - the project no longer has its own composite
build.
- `grails-data-graphql/examples/*` was deleted to keep this PR focused on
the integration. The five demo apps will be re-added under
`grails-test-examples/graphql/` in a follow-up PR (matching the
`grails-test-examples/mongodb/` and `grails-test-examples/hibernate5/` layout).
I avoided introducing `mavenLocal()` anywhere - happy to revisit if you'd
prefer a different approach.
- `README.md` updated to reflect the new layout and to mention the deferred
examples follow-up.
## Source style fixes
The convention plugins enforce `codenarc` and `checkstyle` more strictly
than the standalone build did. I fixed all violations rather than suppress them
- **no behavioural changes**:
- Wildcard imports expanded in `Schema.groovy`,
`DefaultGraphQLTypeManager.groovy`, `AbstractObjectTypeBuilder.groovy`,
`ComplexTyped.groovy`, `CustomOperation.groovy`, `CustomScalars.groovy`,
`MockDataFetchingEnvironment.groovy`.
- Tab characters and incorrect indentation normalised in `Field.groovy`,
`SimpleField.groovy`, `ComplexField.groovy`.
- Blank line after class opening added to `GraphQLOperationType`,
`OperationType`, `ListOperation`, `Application`, `GraphQLRequest`.
- `UnnecessaryGString` violations fixed in `GormGraphqlGrailsPlugin.groovy`
(~35 strings switched from `"..."` to `'...'`) and elsewhere.
- `GormGraphqlGrailsPlugin.doWithSpring()` rewritten to use the standard
`Closure doWithSpring() { { -> ... } }` form to satisfy the brace spacing rules.
- Refactored the anonymous `TypeResolver` inner class in
`AbstractObjectTypeBuilder` to a `Closure` -> `TypeResolver` cast (avoids the
`Indentation` rule confusion with anonymous inner classes inside builder
chains).
- Java import order fixed in `EntityFetchOptions.java`; `java.util.*`
expanded; stray double-blank lines removed.
## Verified locally
`
./gradlew :grails-data-graphql-core:test :grails-data-graphql:test
# BUILD SUCCESSFUL
./gradlew :grails-data-graphql-core:codeStyle :grails-data-graphql:codeStyle
# BUILD SUCCESSFUL
./gradlew :grails-data-graphql-docs:asciidoctor
# BUILD SUCCESSFUL
`
Let me know if you want anything restructured (e.g. examples handled
differently, or the integration commit squashed into the existing migration
commit).
--
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]