Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails5 update #109

Merged
merged 23 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9628b69
update to grails5, micronaut 3, groovy 3, and more
Emrichardsone Sep 20, 2023
2c4be48
Fix integration test compilation issue with example app
Sep 26, 2023
2776cce
updated dependencies, build success
Emrichardsone Sep 27, 2023
8cd1a0a
re-add compile static annotation, change signature method to specify …
Emrichardsone Oct 4, 2023
49a1f78
remove sdkman file
Emrichardsone Oct 4, 2023
c818931
remove sdkman file
Emrichardsone Oct 4, 2023
b2e8524
static checking compile errors
Emrichardsone Oct 9, 2023
05cd142
Fix compile errors
puneetbehl Oct 11, 2023
7c32876
dependency updates to run integration tests
Emrichardsone Oct 11, 2023
79f508f
Configure Gradle Enterpise & Update Java CI Workflow
puneetbehl Oct 11, 2023
40d98e3
integration test changes
Emrichardsone Oct 11, 2023
199ef3a
Merge branch 'grails5-update' of https://github.com/grails/gorm-graph…
Emrichardsone Oct 11, 2023
e0e6222
Update logback.xml
puneetbehl Oct 11, 2023
7a4ee30
Add test property `Artist.paintings` as output only
guillermocalvo Oct 23, 2023
df6745a
Update tests (error message checks)
guillermocalvo Oct 23, 2023
ca7680b
Merge branch '3.0.x' into grails5-update
guillermocalvo Nov 22, 2023
d65f482
Merge branch 'grails5-update' of github.com:grails/gorm-graphql into …
puneetbehl Nov 23, 2023
2e9bce0
Correct dependency scopes
puneetbehl Nov 23, 2023
30a0d7f
Apply Java Library Gradle Plugin
puneetbehl Nov 23, 2023
f2ab6c9
Correct more dependency scopes
guillermocalvo Nov 24, 2023
82b1787
Upgrade Gradle wrapper to version 6.9.4
guillermocalvo Nov 24, 2023
8f4de34
Clean up build scripts
guillermocalvo Nov 27, 2023
9cf375c
Add CompileStatic to ComplexOperation
puneetbehl Nov 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
**/.gradle/
**/build
**/out
*.sdkmanrc
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath "org.grails:grails-docs:${project.ext.properties.grailsDocsVersion ?: grailsVersion}"
classpath "io.github.gradle-nexus:publish-plugin:1.1.0"
}
Expand Down Expand Up @@ -68,7 +68,11 @@ subprojects {
}

dependencies {
testCompile "org.codehaus.groovy:groovy-test:$groovyVersion"
implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
testImplementation "org.codehaus.groovy:groovy-test:$groovyVersion"
testImplementation "io.projectreactor:reactor-test:3.5.5"
testImplementation("org.spockframework:spock-core:$spockVersion")
implementation 'org.grails:grails-datastore-gorm:7.3.4'
}
}

Expand Down
27 changes: 17 additions & 10 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
apply plugin: 'codenarc'

dependencies {
documentation "org.codehaus.groovy:groovy-cli-picocli:$groovyVersion"

compile "org.grails:grails-datastore-gorm:${gormVersion}"
compile "com.graphql-java:graphql-java:$graphqlJavaVersion"
compile "com.graphql-java:graphql-java-extended-scalars:$graphqlJavaScalarExtVersion"
implementation "org.grails:grails-datastore-gorm:${gormVersion}"
implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
implementation "com.graphql-java:graphql-java-extended-scalars:$graphqlJavaScalarExtVersion"
implementation 'com.github.javaparser:javaparser-core:3.25.5'
implementation "org.grails.plugins:views-json:2.3.2"
implementation 'org.javassist:javassist:3.29.2-GA'

codenarc "org.codenarc:CodeNarc:$codenarcVersion"

testCompile "org.grails:grails-datastore-gorm-hibernate5:${gormHibernateVersion}"
testCompile "org.grails:grails-datastore-gorm-mongodb:${gormMongoDbVersion}"
testCompile 'com.github.fakemongo:fongo:2.1.1'
testRuntime "com.h2database:h2:1.4.192"
testRuntime "org.apache.tomcat:tomcat-jdbc:8.5.85"
testRuntime "org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.5.2"
testRuntime "org.slf4j:slf4j-api:$slf4jVersion"
testImplementation "org.grails:grails-datastore-gorm-hibernate5:${gormHibernateVersion}"
testImplementation "org.grails:grails-datastore-gorm-mongodb:${gormMongoDbVersion}"
testImplementation 'com.github.fakemongo:fongo:2.1.1'
testImplementation 'com.h2database:h2:2.2.224'
testImplementation "org.apache.tomcat:tomcat-jdbc:8.5.85"
testImplementation "org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.5.2"
testImplementation "org.slf4j:slf4j-api:$slf4jVersion"
}

targetCompatibility = 1.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.grails.gorm.graphql.entity.dsl.helpers.Deprecatable
import org.grails.gorm.graphql.entity.dsl.helpers.Describable
import org.grails.gorm.graphql.entity.dsl.helpers.ExecutesClosures
import org.grails.gorm.graphql.entity.dsl.helpers.Named

@CompileStatic
/**
* Builder to provide GraphQL specific data for a GORM entity property
*
Expand Down Expand Up @@ -37,7 +37,6 @@ import org.grails.gorm.graphql.entity.dsl.helpers.Named
* @since 1.0.0
*/
@Builder(builderStrategy = SimpleStrategy, prefix = '')
@CompileStatic
class GraphQLPropertyMapping implements Describable<GraphQLPropertyMapping>, Deprecatable<GraphQLPropertyMapping>, Named<GraphQLPropertyMapping>, ExecutesClosures {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import groovy.transform.CompileStatic
@CompileStatic
trait ExecutesClosures {

static void withDelegate(Closure closure, Object delegate) {
static void withDelegate(@DelegatesTo(strategy = Closure.DELEGATE_ONLY) Closure closure, Object delegate) {
if (closure != null) {
closure.resolveStrategy = Closure.DELEGATE_ONLY
closure.delegate = delegate
Expand All @@ -25,3 +25,4 @@ trait ExecutesClosures {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.grails.gorm.graphql.entity.operations

import graphql.schema.GraphQLOutputType
import groovy.transform.CompileStatic
import org.grails.datastore.mapping.model.MappingContext
import org.grails.gorm.graphql.entity.dsl.helpers.ComplexTyped
import org.grails.gorm.graphql.entity.dsl.helpers.ExecutesClosures
Expand All @@ -13,7 +12,7 @@ import org.grails.gorm.graphql.types.GraphQLTypeManager
* @author James Kleeh
* @since 1.0.0
*/
@CompileStatic

class ComplexOperation extends CustomOperation<ComplexOperation> implements ExecutesClosures {

String typeName
Expand Down
55 changes: 28 additions & 27 deletions examples/grails-docs-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-codecs"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-datasource"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:views-json"
compile "org.grails.plugins:views-json-templates"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-codecs"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-datasource"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
implementation "org.grails.plugins:views-json"
implementation "org.grails.plugins:views-json-templates"
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
console "org.grails:grails-console"
profile "org.grails.profiles:rest-api"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails:grails-web-testing-support"
runtimeOnly "org.glassfish.web:el-impl:2.1.2-b03"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"

compile project(":grails-plugin-gorm-graphql-plugin")
implementation project(":grails-plugin-gorm-graphql-plugin")
}

bootRun {
Expand Down
73 changes: 42 additions & 31 deletions examples/grails-multi-datastore-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
repositories {
mavenCentral()
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-codecs"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-datasource"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:mongodb"
compile "org.grails.plugins:views-json"
compile "org.grails.plugins:views-json-templates"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core:5.3.2"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-codecs"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-datasource"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
implementation "org.grails.plugins:mongodb"
implementation "org.grails.plugins:views-json"
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
implementation "org.grails.plugins:views-json-templates"
implementation "com.graphql-java:graphql-java:$graphqlJavaVersion"
console "org.grails:grails-console"
profile "org.grails.profiles:rest-api"
provided "org.grails.plugins:embedded-mongodb:1.0.2"
compile "org.apache.commons:commons-compress:1.10"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-web-testing-support"
compileOnly 'org.grails.plugins:embedded-mongodb:2.0.1'
implementation "org.apache.commons:commons-compress:1.10"
implementation "org.glassfish.web:el-impl:2.1.2-b03"
implementation "com.h2database:h2"
implementation "org.apache.tomcat:tomcat-jdbc"
compileOnly "org.grails:grails-gorm-testing-support"
compileOnly "org.grails.plugins:geb"
compileOnly "org.grails:grails-web-testing-support"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"

compile project(":grails-plugin-gorm-graphql-plugin")
testImplementation "org.grails:grails-test-mixins:3.3.0"
testImplementation "org.grails:grails-gorm-testing-support"
implementation project(":grails-plugin-gorm-graphql-plugin")
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
sourceResources sourceSets.main
}

tasks.withType(Test) {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ dataSource:
driverClassName: org.h2.Driver
username: sa
password: ''
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE

environments:
development:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package myapp

import grails.testing.mixin.integration.Integration
import grails.test.mixin.integration.Integration
import org.bson.types.ObjectId
import org.grails.datastore.gorm.GormEnhancer
import org.grails.datastore.mapping.mongo.MongoDatastore
import org.grails.gorm.graphql.plugin.testing.GraphQLSpec
import org.grails.web.json.JSONObject
import spock.lang.Specification


@Integration
class BarIntegrationSpec extends Specification implements GraphQLSpec {
class BarIntegrationSpec implements GraphQLSpec {

void "test a bar can be created"() {
when:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package myapp

import grails.testing.mixin.integration.Integration
import grails.test.mixin.integration.Integration
import org.grails.datastore.gorm.GormEnhancer
import org.grails.gorm.graphql.plugin.testing.GraphQLSpec
import org.grails.orm.hibernate.HibernateDatastore
import org.grails.web.json.JSONObject
import spock.lang.Specification

@Integration
class FooIntegrationSpec extends Specification implements GraphQLSpec {
class FooIntegrationSpec implements GraphQLSpec {

void "test a foo can be created"() {
when:
Expand Down
57 changes: 30 additions & 27 deletions examples/grails-tenant-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-codecs"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-datasource"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:$hibernateCoreVersion"
compile "org.grails.plugins:views-json"
compile "org.grails.plugins:views-json-templates"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-codecs"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-datasource"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:hibernate5"
implementation "org.hibernate:hibernate-core:$hibernateCoreVersion"
implementation "org.grails.plugins:views-json"
implementation "org.grails.plugins:views-json-templates"
implementation 'io.micronaut.rxjava2:micronaut-rxjava2-http-client:1.2.0'
console "org.grails:grails-console"
profile "org.grails.profiles:rest-api"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-web-testing-support"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails.plugins:geb"
testImplementation "org.grails:grails-web-testing-support"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
testImplementation "org.grails:grails-test-mixins:3.3.0"

compile project(":grails-plugin-gorm-graphql-plugin")

implementation project(":grails-plugin-gorm-graphql-plugin")
}

bootRun {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package grails.tenant.app
import grails.testing.mixin.integration.Integration
import org.grails.datastore.mapping.multitenancy.resolvers.SystemPropertyTenantResolver
import org.grails.gorm.graphql.plugin.testing.GraphQLSpec
import org.grails.web.json.JSONArray
import org.grails.web.json.JSONObject
import spock.lang.Specification
import spock.lang.Stepwise

Expand Down
Loading
Loading