Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/7.0.x' into 7.0.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	UPGRADE7.md
  • Loading branch information
jdaugherty committed Feb 9, 2025
2 parents 651bf5a + f56513b commit dc4296b
Show file tree
Hide file tree
Showing 27 changed files with 219 additions and 232 deletions.
4 changes: 2 additions & 2 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
java=17.0.13-librca
gradle=8.12
java=17.0.14-librca
gradle=8.12.1

2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grails Core Release Process

1. Perform the release of any other dependent library and update the version in `gradle.properties`/`grails-bom/plugins.properties`/`grails-bom/profiles.properties`
1. Perform the release of any other dependent library and update the version in `gradle.properties`/`grails-bom/plugins.properties`
1. Ensure you have the latest changes locally `git pull`
1. Ensure all changes from previous branches are merged up `git merge ...`
1. Ensure there are no snapshot dependencies
Expand Down
2 changes: 1 addition & 1 deletion UPGRADE7.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Experienced while upgrading modules for Grails 7
}
- The `jakarta` package switch means that older libraries using `javax` will need to be updated to use the correct namespace. The side effect of this change is most grails plugins will likely need updated to be compatible with Grails 7.
- When migrating a new project to Grails 7, it's advised to generate a stock 7.0 app from [start.grails.org](https://start.grails.org) and compare the project with a grails app generated from the same grails version that your application uses. This helps catch the dependency clean up that has occurred. Including the additions of new dependencies. Note: due to an issue with project resolution the `grails-bom` will need explicitly imported in buildSrc or any project that does not apply the grails gradle plugins (grails-plugin, grails-web, or grails-gsp). By default, the grails gradle plugins (grails-plugin, grails-web, grails-gsp) will apply the bom automatically.
- Since groovy comes from the Spring bom, we have removed the gradle property 'groovyVersion' and adopted the upstream property 'groovy.version' instead.
- the gradle property `groovyVersion` is being replaced with the upstream spring property name `groovy.version`. Please update your projects accordingly.

## NOTE: This document is a draft and the explanations are only highlights and will be expanded further prior to release of 7.0.

Expand Down
43 changes: 24 additions & 19 deletions dependabot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated on Fri Nov 22 09:58:56 CET 2024 by: ./gradlew :grails-bom:dependabotBuild
// Generated on Wed Feb 05 18:23:24 EST 2025 by: ./gradlew :grails-bom:dependabotBuild
plugins {
id 'java-library'
}
Expand All @@ -9,14 +9,13 @@ dependencies {
api "org.asciidoctor:asciidoctorj:${project['asciidoctorj.version']}"
api "com.bertramlabs.plugins:asset-pipeline-gradle:${project['asset-pipeline-gradle.version']}"
api "com.bertramlabs.plugins:asset-pipeline-grails:${project['asset-pipeline-grails.version']}"
api "org.webjars.npm:bootstrap-icons:${project['bootstrap-icons.version']}"
api "org.webjars.npm:bootstrap:${project['bootstrap.version']}"
api "net.bytebuddy:byte-buddy:${project['byte-buddy.version']}"
api "commons-codec:commons-codec:${project['commons-codec.version']}"
api "org.apache.commons:commons-text:${project['commons-text.version']}"
api "io.methvin:directory-watcher:${project['directory-watcher.version']}"
api "org.xhtmlrenderer:flying-saucer-pdf-openpdf:${project['flying-saucer-pdf-openpdf.version']}"
api "org.webjars.npm:bootstrap:${project['bootstrap.version']}"
api "org.webjars.npm:bootstrap-icons:${project['bootstrap-icons.version']}"
api "org.webjars.npm:jquery:${project['jquery.version']}"
api "org.gebish:geb-spock:${project['geb-spock.version']}"
api "org.grails:grails-datastore-gorm-hibernate5:${project['grails-datastore-gorm-hibernate5.version']}"
api "org.grails:grails-datastore-gorm-mongodb:${project['grails-datastore-gorm-mongodb.version']}"
Expand All @@ -26,26 +25,30 @@ dependencies {
api "org.grails:grails-datastore-gorm-async:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-rx:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-support:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-tck:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-test:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-validation:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-gorm-tck:${project['grails-datastore.version']}"
api "org.grails:grails-datastore-web:${project['grails-datastore.version']}"
api "org.grails:grails-gorm-testing-support:${project['grails-datastore.version']}"
api "org.grails:grails-gdoc-engine:${project['grails-gdoc-engine.version']}"
api "org.grails:grails-gradle-plugin:${project['grails-gradle-plugin.version']}"
api "org.grails:grails-gorm-testing-support:${project['grails-testing-support.version']}"
api "org.grails:grails-web-testing-support:${project['grails-testing-support.version']}"
api "org.apache.groovy:groovy-bom:${project['groovy.version']}"
api "org.grails:grails-gsp:${project['gsp.version']}"
api "org.grails:grails-web-gsp:${project['gsp.version']}"
api "org.grails:grails-web-taglib:${project['gsp.version']}"
api "org.grails:grails-web-testing-support:${project['gsp.version']}"
api "org.grails.plugins:gsp:${project['gsp.version']}"
api "com.h2database:h2:${project['h2.version']}"
api "com.fasterxml.jackson:jackson-bom:${project['jackson.version']}"
api "org.fusesource.jansi:jansi:${project['jansi.version']}"
api "com.github.javaparser:javaparser-core:${project['javaparser-core.version']}"
api "jline:jline:${project['jline.version']}"
api "net.java.dev.jna:jna:${project['jna.version']}"
api "org.webjars.npm:jquery:${project['jquery.version']}"
api "org.jsoup:jsoup:${project['jsoup.version']}"
api "org.liquibase:liquibase-cdi:${project['liquibase.version']}"
api "org.liquibase:liquibase-core:${project['liquibase.version']}"
api "org.liquibase.ext:liquibase-hibernate5:${project['liquibase.version']}"
api "org.mongodb:bson:${project['mongodb.version']}"
api "org.mongodb:bson-record-codec:${project['mongodb.version']}"
api "org.mongodb:mongodb-driver-core:${project['mongodb.version']}"
Expand All @@ -58,22 +61,24 @@ dependencies {
api "org.grails.plugins:hibernate5:${project['plugins-hibernate5.version']}"
api "org.grails.plugins:mongodb:${project['plugins-mongodb.version']}"
api "org.grails.plugins:neo4j:${project['plugins-neo4j.version']}"
api "org.grails.plugins:rxjava2:${project['plugins-rxjava2.version']}"
api "org.grails.plugins:rxjava:${project['plugins-rxjava.version']}"
api "org.grails.plugins:scaffolding:${project['plugins-scaffolding.version']}"
api "org.grails.plugins:views-gradle:${project['plugins-views-gradle.version']}"
api "org.grails.plugins:views-json-templates:${project['plugins-views-json-templates.version']}"
api "org.grails.plugins:views-json:${project['plugins-views-json.version']}"
api "org.grails.plugins:views-markup:${project['plugins-views-markup.version']}"
api "org.grails.profiles:angular:${project['profiles-angular.version']}"
api "org.grails.profiles:base:${project['profiles-base.version']}"
api "org.grails.profiles:plugin:${project['profiles-plugin.version']}"
api "org.grails.profiles:profile:${project['profiles-profile.version']}"
api "org.grails.profiles:react:${project['profiles-react.version']}"
api "org.grails.profiles:rest-api-plugin:${project['profiles-rest-api-plugin.version']}"
api "org.grails.profiles:rest-api:${project['profiles-rest-api.version']}"
api "org.grails.profiles:vue:${project['profiles-vue.version']}"
api "org.grails.profiles:web-plugin:${project['profiles-web-plugin.version']}"
api "org.grails.profiles:web:${project['profiles-web.version']}"
api "org.grails.profiles:angular:${project['profiles.version']}"
api "org.grails.profiles:base:${project['profiles.version']}"
api "org.grails.profiles:plugin:${project['profiles.version']}"
api "org.grails.profiles:profile:${project['profiles.version']}"
api "org.grails.profiles:react:${project['profiles.version']}"
api "org.grails.profiles:rest-api:${project['profiles.version']}"
api "org.grails.profiles:rest-api-plugin:${project['profiles.version']}"
api "org.grails.profiles:vue:${project['profiles.version']}"
api "org.grails.profiles:web:${project['profiles.version']}"
api "org.grails.profiles:web-plugin:${project['profiles.version']}"
api "io.reactivex.rxjava2:rxjava:${project['rxjava2.version']}"
api "io.reactivex.rxjava3:rxjava:${project['rxjava3.version']}"
api "io.reactivex:rxjava:${project['rxjava.version']}"
api "org.spockframework:spock-core:${project['spock.version']}"
api "org.spockframework:spock-spring:${project['spock.version']}"
api "org.springframework.boot:spring-boot-cli:${project['spring-boot.version']}"
Expand Down
26 changes: 9 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ gradleNexusPluginVersion=2.3.1
gradleNexusPublishPluginVersion=2.0.0
gradleExtraConfigurationsPluginVersion=10.0.1
gradleLicensePluginVersion=0.16.1
gradleToolingApiVersion=8.12
groovyVersion=4.0.24
gradleToolingApiVersion=8.12.1
groovyVersion=4.0.25
joptSimpleVersion=5.0.4
plexusComponentApiVersion=1.0-alpha-33
plexusSecDispatcherVersion=1.4
Expand All @@ -35,7 +35,7 @@ preventSnapshotPublish=false
# https://github.com/grails/grails-gradle-plugin/issues/222
slf4jPreventExclusion=true

# Generated on Thu Jan 16 10:23:54 EST 2025 by: ./gradlew :grails-bom:syncProps
# Generated on Wed Feb 05 18:23:13 EST 2025 by: ./gradlew :grails-bom:syncProps
# Only version value modifications allowed after this point. Do not insert or change version names.
ant.version=1.10.15
asciidoctorj.version=3.0.0
Expand All @@ -54,17 +54,18 @@ grails-datastore-gorm-hibernate5.version=9.0.0-SNAPSHOT
grails-datastore-gorm-mongodb.version=9.0.0-SNAPSHOT
grails-gdoc-engine.version=1.0.1
grails-gradle-plugin.version=7.0.0-SNAPSHOT
groovy.version=4.0.24
groovy.version=4.0.25
gsp.version=7.0.0-SNAPSHOT
h2.version=2.3.232
jackson.version=2.18.2
jansi.version=1.18
javaparser-core.version=3.26.2
jline.version=2.14.6
jna.version=5.15.0
jna.version=5.16.0
jquery.version=3.7.1
jsoup.version=1.18.3
mongodb.version=5.3.0
liquibase.version=4.27.0
mongodb.version=5.3.1
objenesis.version=3.4
plugins-cache.version=8.0.0-SNAPSHOT
plugins-database-migration.version=6.0.0-SNAPSHOT
Expand All @@ -78,20 +79,11 @@ plugins-views-gradle.version=4.0.0-SNAPSHOT
plugins-views-json.version=4.0.0-SNAPSHOT
plugins-views-json-templates.version=9.0.0-SNAPSHOT
plugins-views-markup.version=4.0.0-SNAPSHOT
profiles-angular.version=10.0.1
profiles-base.version=7.0.1
profiles-plugin.version=7.0.1
profiles-profile.version=7.0.1
profiles-react.version=7.0.1
profiles-rest-api.version=7.0.1
profiles-rest-api-plugin.version=7.0.1
profiles-vue.version=7.0.1
profiles-web.version=7.0.1
profiles-web-plugin.version=7.0.1
profiles.version=10.0.2-SNAPSHOT
rxjava.version=1.3.8
rxjava2.version=2.2.21
rxjava3.version=3.1.10
spock.version=2.3-groovy-4.0
spring-boot.version=3.4.1
spring-boot.version=3.4.2
springloaded.version=1.2.8.RELEASE
views-json-testing-support.version=4.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ class FutureTaskPromiseFactorySpec extends Specification {
list.onComplete { List l -> result = l }

then: 'the result is correct'
new PollingConditions(timeout: 5).eventually {
result
result == [2, 4]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result
assert result == [2, 4]
}

when: 'a promise list is created from two closures'
list = Promises.createPromise({ 2 + 2 }, { 4 + 4 })
list.onComplete { result = it }

then: 'the result is correct'
new PollingConditions(timeout: 5).eventually {
result == [4, 8]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [4, 8]
}
}

Expand Down Expand Up @@ -92,9 +92,9 @@ class FutureTaskPromiseFactorySpec extends Specification {

then: 'the onComplete handler is invoked and the onError handler is ignored'
thrown(ExecutionException)
new PollingConditions(timeout: 5).eventually {
!result
error
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert !result
assert error
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class PromiseListSpec extends Specification {
list.onComplete { result = it }

then: 'then the result from onComplete is correct'
new PollingConditions(timeout: 5).eventually {
result == [1, 2, 3]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [1, 2, 3]
}
}

Expand All @@ -53,8 +53,8 @@ class PromiseListSpec extends Specification {
list.onComplete { result = it }

then: 'then the result from onComplete is correct'
new PollingConditions(timeout: 5).eventually {
result == [1, 2, 3]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [1, 2, 3]
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class PromiseMapSpec extends Specification {
map.onComplete { result = it }

then: 'an appropriately populated map is returned to the onComplete event'
new PollingConditions(timeout: 5).eventually {
result
result['one'] == 1
result['four'] == 4
result['eight'] == 8
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result
assert result['one'] == 1
assert result['four'] == 4
assert result['eight'] == 8
}
}

Expand All @@ -52,11 +52,11 @@ class PromiseMapSpec extends Specification {
map.onComplete { result = it }

then: 'an appropriately populated map is returned to the onComplete event'
new PollingConditions(timeout: 5).eventually {
result
result['one'] == 1
result['four'] == 4
result['eight'] == 8
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result
assert result['one'] == 1
assert result['four'] == 4
assert result['eight'] == 8
}
}

Expand All @@ -69,13 +69,14 @@ class PromiseMapSpec extends Specification {
map['eight'] = { 4 * 2 }
def result = null
map.onComplete { result = it }
sleep 300

then: 'an appropriately populated map is returned to the onComplete event'
result
result['one'] == 1
result['four'] == 4
result['eight'] == 8
new PollingConditions(timeout: 5, delay: 0.2, initialDelay: 0.3).eventually {
assert result
assert result['one'] == 1
assert result['four'] == 4
assert result['eight'] == 8
}
}

void 'Test that a PromiseMap triggers onError for an exception and ignores onComplete'() {
Expand All @@ -89,12 +90,13 @@ class PromiseMapSpec extends Specification {
Throwable err = null
map.onComplete { result = it }
map.onError { err = it }
sleep 300

then: 'An appropriately populated map is returned to the onComplete event'
!result
err
err.message == 'java.lang.RuntimeException: bad'
new PollingConditions(timeout: 5, delay: 0.2, initialDelay: 0.3).eventually {
assert !result
assert err
assert err.message == 'java.lang.RuntimeException: bad'
}
}

@PendingFeature(reason = '''
Expand Down
30 changes: 15 additions & 15 deletions grails-async/core/src/test/groovy/grails/async/PromiseSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ class PromiseSpec extends Specification {

when: 'a promise list is created from two promises'
def p1 = Promises.createPromise {
sleep 200
sleep 200 // simulate long running task
1 + 1
}
def p2 = Promises.createPromise {
sleep 200
sleep 200 // simulate long running task
2 + 2
}
def list = Promises.createPromise(p1, p2)
def result = null
list.onComplete { result = it }

then: 'the result is correct'
new PollingConditions(timeout: 5).eventually {
result == [2, 4]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [2, 4]
}
}

Expand All @@ -95,17 +95,17 @@ class PromiseSpec extends Specification {
list.onComplete { result = it }

then: 'the result is correct'
new PollingConditions(timeout: 5).eventually {
result == [2, 4]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [2, 4]
}

when: 'a promise list is created from two closures'
list = Promises.createPromise({ 3 + 3 }, { 4 + 4 })
list.onComplete { result = it }

then: 'the result is correct'
new PollingConditions(timeout: 5).eventually {
result == [6, 8]
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == [6, 8]
}
}

Expand All @@ -119,9 +119,9 @@ class PromiseSpec extends Specification {
promise.onError { hasError = true }

then: 'the onComplete handler is invoked and the onError handler is ignored'
new PollingConditions(timeout: 5).eventually {
result == 2
hasError == false
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert result == 2
assert hasError == false
}
}

Expand All @@ -135,10 +135,10 @@ class PromiseSpec extends Specification {
promise.onError { error = it }

then: 'the onComplete handler is invoked and the onError handler is ignored'
new PollingConditions(timeout: 5).eventually {
!result
error
error.message.contains('bad')
new PollingConditions(timeout: 5, delay: 0.2).eventually {
assert !result
assert error
assert error.message.contains('bad')
}
}

Expand Down
Loading

0 comments on commit dc4296b

Please sign in to comment.