jamesfredley commented on code in PR #15587:
URL: https://github.com/apache/grails-core/pull/15587#discussion_r3144288827


##########
grails-test-examples/graphql/grails-test-app/build.gradle:
##########
@@ -0,0 +1,82 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ */
+plugins {
+    id 'org.apache.grails.buildsrc.properties'
+    id 'org.apache.grails.buildsrc.compile'
+}
+
+version = projectVersion
+group = 'examples'
+
+apply plugin: 'groovy'
+apply plugin: 'org.apache.grails.gradle.grails-web'
+apply plugin: 'org.apache.grails.gradle.grails-gson'
+
+dependencies {
+    implementation platform(project(':grails-bom'))
+
+    implementation 'org.springframework.boot:spring-boot-starter-logging'
+    implementation 'org.springframework.boot:spring-boot-autoconfigure'
+    implementation 'org.springframework.boot:spring-boot-starter-actuator'
+    implementation 'org.springframework.boot:spring-boot-starter-tomcat'
+
+    implementation 'org.apache.grails:grails-core'
+    implementation 'org.apache.grails:grails-url-mappings'
+    implementation 'org.apache.grails:grails-rest-transforms'
+    implementation 'org.apache.grails:grails-codecs'
+    implementation 'org.apache.grails:grails-interceptors'
+    implementation 'org.apache.grails:grails-services'
+    implementation 'org.apache.grails:grails-datasource'
+    implementation 'org.apache.grails:grails-databinding'
+    implementation 'org.apache.grails:grails-web-boot'
+    implementation 'org.apache.grails:grails-logging'
+    implementation 'org.apache.grails:grails-cache'
+    implementation 'org.apache.grails:grails-async'
+    implementation 'org.apache.grails:grails-events'
+    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-views-gson'
+    implementation 'org.apache.grails:grails-data-mongodb-gson-templates'
+
+    implementation "org.hibernate:hibernate-core-jakarta:$hibernate5Version"
+    implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
+    implementation 
"io.micronaut.rxjava2:micronaut-rxjava2-http-client:$micronautRxjava2Version"
+    // JSON mapper for the micronaut HTTP client used by the GraphQLSpec trait.
+    implementation 
"io.micronaut.serde:micronaut-serde-jackson:$micronautSerdeJacksonVersion"
+
+    implementation project(':grails-data-graphql')
+
+    console 'org.apache.grails:grails-console'
+    profile 'org.apache.grails.profiles:rest-api'
+
+    runtimeOnly 'com.h2database:h2'
+    runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
+
+    testImplementation 'org.apache.grails:grails-testing-support-datamapping'
+    testImplementation 'org.apache.grails:grails-testing-support-web'
+}
+
+bootRun {
+    jvmArgs('-Dspring.output.ansi.enabled=always')

Review Comment:
   ootRun {} block removed in d695a96152. Resolving.



##########
grails-data-graphql/plugin/src/main/groovy/org/grails/gorm/graphql/plugin/GormGraphqlGrailsPlugin.groovy:
##########
@@ -38,65 +38,73 @@ import 
org.grails.gorm.graphql.types.DefaultGraphQLTypeManager
 
 class GormGraphqlGrailsPlugin extends Plugin {
 
-    def grailsVersion = "4.0.0 > *"
-    def title = "Gorm GraphQL"
-    def author = "James Kleeh"
-    def authorEmail = "[email protected]"
+    def grailsVersion = '7.1.0 > *'
+    def title = 'Gorm GraphQL'
+    def author = 'James Kleeh'
+    def authorEmail = '[email protected]'
     def profiles = ['web']
-    def documentation = 
"https://grails.github.io/grails-data-graphql/3.0.x/hibernate/guide/index.html";
-    def license = "APACHE"
-    def developers = [ [ name: "Puneet Behl", email: 
"[email protected]" ]]
-    def issueManagement = [ system: "GitHub", url: 
"https://github.com/apache/grails-core/issues"; ]
-    def scm = [ url: "https://github.com/apache/grails-core/"; ]
+    def documentation = 
'https://grails.github.io/grails-data-graphql/3.0.x/hibernate/guide/index.html'

Review Comment:
   Fixed in d695a96152. def documentation now points at 
https://grails.apache.org/docs/latest/grails-data/graphql/manual/ (matches the 
README and the sibling mongodb plugin). Resolving.



##########
gradle.properties:
##########
@@ -55,6 +57,7 @@ gradleCycloneDxPluginVersion=2.4.1
 
 # micronaut libraries not in the bom due to the potential for spring mismatches
 micronautPlatformVersion=4.9.2
+micronautRxjava2Version=2.9.0

Review Comment:
   Same answer as above - waiting on the BOM restructure (#15605). Leaving open 
as a tracker so we don't lose the cleanup.



##########
gradle.properties:
##########
@@ -35,6 +35,8 @@ gparsVersion=1.2.1
 # Keep gradle version synced with .sdkmanrc, all gradle-wrapper.properties 
files,
 # and 
grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw
 gradleToolingApiVersion=8.14.4
+graphqlJavaVersion=24.3

Review Comment:
   Acknowledged. These versions can move into the BOM once the BOM-restructure 
backport in #15605 lands on 7.2.x. Until then they live in gradle.properties to 
keep this PR self-contained. Leaving this thread open as a tracker for the 
post-#15605 follow-up.



##########
grails-data-graphql/plugin/build.gradle:
##########
@@ -17,37 +17,98 @@
  *  under the License.
  */
 
-
 plugins {
-    id "org.apache.grails.gradle.grails-plugin"
-    id "org.apache.grails.gradle.grails-gson"
+    id 'org.apache.grails.buildsrc.properties'
+    id 'org.apache.grails.gradle.grails-plugin'
+    id 'org.apache.grails.gradle.grails-gson'
+    id 'org.apache.grails.buildsrc.compile'
+    id 'org.apache.grails.buildsrc.publish'
+    id 'org.apache.grails.buildsrc.sbom'
+    id 'org.apache.grails.gradle.grails-code-style'
+}
+
+version = projectVersion
+group = 'org.apache.grails'
+
+ext {
+    gormApiDocs = true
+    pomTitle = 'GORM for GraphQL'
+    pomDescription = 'Generates a GraphQL schema based on entities in GORM'
 }
 
 dependencies {
-    api "org.apache.grails:grails-controllers"
-    api "org.apache.grails:grails-databinding"
-    api("org.apache.grails:grails-rest-transforms") {
+
+    implementation platform(project(':grails-bom'))
+
+    api project(':grails-data-graphql-core'), {
+        // api: GraphQLEntityNamingConvention, Schema, GraphQLSchema generation
+    }
+    api project(':grails-controllers'), {
+        // api: GraphqlController extends from grails controller infrastructure
+    }
+    api project(':grails-databinding'), {
+        // api: data binding for GraphQL request payloads
+    }
+    api project(':grails-rest-transforms'), {
+        // api: REST transforms used for JSON marshalling
         exclude group: 'org.apache.grails', module: 'grails-converters'
     }
-    api "org.apache.grails:grails-url-mappings"
-    api "org.apache.grails:grails-views-gson:$viewsJsonVersion"
-    api 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.3.0'
-    api "javax.servlet:javax.servlet-api:$servletApiVersion"
-    api "io.micronaut:micronaut-http-client:$micronautVersion"
-    api "org.apache.grails:grails-converters:3.3.1"
-    api 'com.github.javaparser:javaparser-core:3.25.7'
-    api "com.graphql-java:graphql-java:$graphqlJavaVersion"
-    testImplementation "org.apache.grails:grails-testing-support-web"
-    testImplementation "cglib:cglib-nodep:3.3.0"
-    profile "org.apache.grails.profiles:web-plugin"
+    api project(':grails-url-mappings'), {
+        // api: URL mappings for /graphql endpoint
+    }
+    api project(':grails-converters'), {
+        // api: JSON converters used by the controller
+    }
+    api project(':grails-views-gson'), {
+        // api: GSON view rendering for GraphQL responses
+    }
+    api 'com.github.javaparser:javaparser-core', {
+        // api: parsing of GORM entity sources for schema introspection
+    }
+    api "com.graphql-java:graphql-java:$graphqlJavaVersion", {
+        // api: GraphQL execution and schema types
+    }
+    api 'jakarta.servlet:jakarta.servlet-api', {
+        // api: HttpServletRequest/Response in GraphqlController
+    }
+    api "io.micronaut:micronaut-http-client:$micronautHttpClientVersion", {
+        // api: HTTP client used by integration tests / playground
+    }
+    api 
"io.micronaut.rxjava2:micronaut-rxjava2-http-client:$micronautRxjava2Version", {
+        // api: RxJava2 variant of micronaut-http-client used by integration 
tests
+    }
 
-    api project(":gorm-graphql")
+    testImplementation project(':grails-testing-support-web')
+    // Spock 2.3 on Groovy 4 / JDK 17 uses net.bytebuddy for class mocking;
+    // cglib-nodep no longer works on JDK 17+.
+    testImplementation 'net.bytebuddy:byte-buddy'
+    testImplementation 'org.spockframework:spock-core'
 }
 
 compileGsonViews {
-    packageName = "gorm-graphql"
+    packageName = 'gorm-graphql'
+}
+
+// compileGsonViews writes compiled GSON view classes into 
build/gson-classes/main,
+// which the Groovy plugin treats as part of the main source-set output. 
Without an
+// explicit dependency the groovydoc task implicitly consumes that output, 
which
+// Gradle 8.x rejects as an undeclared task input.
+tasks.named('groovydoc').configure {
+    dependsOn tasks.named('compileGsonViews')
 }
 
-tasks.withType(Test) {
+def disabledTasks = ['bootRun', 'bootTestRun']
+disabledTasks.each { taskName ->
+    tasks.named(taskName) {
+        enabled = false
+    }
+}
+
+apply {
+    from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
+    from 
rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
+}
+
+tasks.withType(Test).configureEach {

Review Comment:
   Done in d695a96152. The inline       asks.withType(Test).configureEach { 
useJUnitPlatform() } block is gone; both :grails-data-graphql-core and 
:grails-data-graphql now pply from: 
rootProject.layout.projectDirectory.file('gradle/test-config.gradle'). 
Resolving.



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