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

merge 8.x.x into 9.0.x #750

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
107 changes: 100 additions & 7 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,117 @@
name-template: $RESOLVED_VERSION
tag-template: v$RESOLVED_VERSION
pull-request:
title-templates:
fix: '🐛 $TITLE (#$NUMBER)'
feat: '🚀 $TITLE (#$NUMBER)'
default: '$TITLE (#$NUMBER)'
autolabeler:
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'improvement'
branch:
- '/improv\/.+/'
title:
- '/improv/i'
- label: 'feature'
branch:
- '/feature\/.+/'
title:
- '/feat/i'
- label: 'documentation'
branch:
- '/docs\/.+/'
title:
- '/docs/i'
- label: 'maintenance'
branch:
- '/(chore|refactor|style|test|ci|perf|build)\/.+/'
title:
- '/(chore|refactor|style|test|ci|perf|build)/i'
- label: 'chore'
branch:
- '/chore\/.+/'
title:
- '/chore/i'
- label: 'refactor'
branch:
- '/refactor\/.+/'
title:
- '/refactor/i'
- label: 'style'
branch:
- '/style\/.+/'
title:
- '/style/i'
- label: 'test'
branch:
- '/test\/.+/'
title:
- '/test/i'
- label: 'ci'
branch:
- '/ci\/.+/'
title:
- '/ci/i'
- label: 'perf'
branch:
- '/perf\/.+/'
title:
- '/perf/i'
- label: 'build'
branch:
- '/build\/.+/'
title:
- '/build/i'
- label: 'deps'
branch:
- '/deps\/.+/'
title:
- '/deps/i'
- label: 'revert'
branch:
- '/revert\/.+/'
title:
- '/revert/i'
categories:
- title: Features
- title: '🚀 Features'
labels:
- 'feature'
- "type: enhancement"
- "type: new feature"
- "type: major"
- title: 🐛 Bug Fixes/Improvements
- "type: minor"
- title: '💡 Improvements'
labels:
- 'improvement'
- "type: improvement"

- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bug'
- "type: bug"
- "type: minor"
- title: 🛠 Dependency upgrades
- title: '📚 Documentation'
labels:
- "type: dependency upgrade"
- "dependencies"
- title: ⚙️ Build/CI
- 'docs'
- title: '🔧 Maintenance'
labels:
- 'maintenance'
- 'chore'
- 'refactor'
- 'style'
- 'test'
- 'ci'
- 'perf'
- 'build'
- "type: ci"
- "type: build"
- title: '⏪ Reverts'
labels:
- 'revert'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ jobs:
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Run Build
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: build -Dgeb.env=chromeHeadless
publish:
Expand All @@ -55,23 +53,19 @@ jobs:
java-version: '11'
- name: Publish to repo.grails.org
id: publish
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
- name: Build Docs
id: docs
if: steps.build.outcome == 'success'
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: docs:docs
- name: Determine docs target repository
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,9 @@ jobs:
echo "" >> $GITHUB_OUTPUT
echo "buildCache {" >> $GITHUB_OUTPUT
echo " local { enabled = System.getenv('CI') != 'true' }" >> $GITHUB_OUTPUT
echo " remote(HttpBuildCache) {" >> $GITHUB_OUTPUT
echo " remote(gradleEnterprise.buildCache) {" >> $GITHUB_OUTPUT
echo " push = System.getenv('CI') == 'true'" >> $GITHUB_OUTPUT
echo " enabled = true" >> $GITHUB_OUTPUT
echo " url = 'https://ge.grails.org/cache/'" >> $GITHUB_OUTPUT
echo " credentials {" >> $GITHUB_OUTPUT
echo " username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')" >> $GITHUB_OUTPUT
echo " password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')" >> $GITHUB_OUTPUT
echo " }" >> $GITHUB_OUTPUT
echo " }" >> $GITHUB_OUTPUT
echo "}" >> $GITHUB_OUTPUT
echo "" >> $GITHUB_OUTPUT
Expand All @@ -101,12 +96,10 @@ jobs:
# Add Gradle Enterprise set-up related configuration after line no 20 in settings.gradle
echo "${{ steps.ge_conf.outputs.value}}" | sed -i -e "20r /dev/stdin" settings.gradle
- name: Build and install groovy (no docs)
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
env:
GRADLE_SCANS_ACCEPT: yes
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
build-root-directory: ../groovy
arguments: |
Expand Down Expand Up @@ -145,11 +138,9 @@ jobs:
echo "CI_GROOVY_VERSION=${{needs.build_groovy.outputs.groovyVersion}}" >> $GITHUB_ENV
- name: Build GORM MongoDB
id: build_gorm_mongodb
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
with:
arguments: |
build
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
push:
branches:
- '[6-9]+.[0-9]+.x'
pull_request:
types: [opened, reopened, synchronize, labeled]
pull_request_target:
types: [opened, reopened, synchronize, labeled]
workflow_dispatch:
jobs:
release_notes:
Expand All @@ -15,18 +19,15 @@ jobs:
id: check_release_drafter
run: |
has_release_drafter=$([ -f .github/release-drafter.yml ] && echo "true" || echo "false")
echo ::set-output name=has_release_drafter::${has_release_drafter}
echo "has_release_drafter=${has_release_drafter}" >> $GITHUB_OUTPUT
- name: Extract branch name
id: extract_branch
run: echo ::set-output name=value::${GITHUB_REF:11}
run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
# If it has release drafter:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
if: steps.check_release_drafter.outputs.has_release_drafter == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
commitish: ${{ steps.extract_branch.outputs.value }}
filter-by-commitish: true
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/wrapper-validation-action@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -32,8 +32,6 @@ jobs:
- name: Publish to Sonatyoe OSSRH
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ buildscript {
dependencies {
classpath "org.codehaus.groovy.modules.http-builder:http-builder:0.7.2"
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.1'
classpath 'org.asciidoctor:asciidoctor-gradle-jvm:4.0.2'
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
classpath "org.grails.plugins:views-gradle:3.1.2"
classpath "org.grails.plugins:views-gradle:3.2.3"
classpath "io.github.gradle-nexus:publish-plugin:1.3.0"
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ subprojects { project ->
testImplementation "org.codehaus.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.spockframework:spock-core:$spockVersion", { transitive = false }
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testImplementation "org.junit.platform:junit-platform-runner:1.10.1"
testImplementation "org.junit.platform:junit-platform-runner:1.10.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
}

Expand Down Expand Up @@ -261,9 +261,9 @@ subprojects { project ->
testImplementation "org.codehaus.groovy:groovy-templates:$groovyVersion"
testImplementation "org.codehaus.groovy:groovy-test-junit5:$groovyVersion"
testImplementation "org.spockframework:spock-core:$spockVersion", { transitive = false }
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.1"
testImplementation "org.junit.platform:junit-platform-runner:1.10.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.2"
testImplementation "org.junit.platform:junit-platform-runner:1.10.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.2"
}

publishing {
Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
assetPipelineVersion=3.3.4
caffeineVersion=2.9.3
datastoreVersion=8.0.4
datastoreVersion=8.1.2
gebVersion=2.3
grailsVersion=6.0.0
grailsGradlePluginVersion=6.1.1
groovyVersion=3.0.11
grailsGradlePluginVersion=6.2.0
groovyVersion=3.0.21
h2Version=1.4.200
hibernateCoreVersion=5.5.7.Final
hibernatePluginVersion=8.0.2
hibernateValidatorVersion=6.2.5.Final
jansiVersion=2.4.1
javaParserCoreVersion=3.25.8
junitJupiterVersion=5.10.1
mongodbDriverVersion=4.11.1
javaParserCoreVersion=3.25.10
junitJupiterVersion=5.10.2
mongodbDriverVersion=4.11.2
mongodbRxDriverVersion=1.10.0
pluginGrailsVersion=6.1.1
pluginGrailsVersion=6.2.0
projectVersion=9.0.0-SNAPSHOT
seleniumSafariDriverVersion=3.14.0
seleniumVersion=3.14.0
Expand Down
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-7.6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion grails-datastore-gorm-mongodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies {
compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"

testImplementation "org.grails:grails-datastore-gorm-tck:$datastoreVersion"
testImplementation "org.grails:grails-gorm-testing-support:3.1.2"
testImplementation "org.grails:grails-gorm-testing-support:3.2.2"
testImplementation "org.hibernate:hibernate-validator:$hibernateValidatorVersion"
testImplementation "org.grails:grails-datastore-gorm-support:$datastoreVersion", {
exclude group: "org.grails", module:"grails-datastore-gorm-hibernate-core"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ class PersistentEntityCodec extends BsonPersistentEntityCodec {
return MongoConstants.MONGO_CLASS_FIELD
}

protected void encodeEmbeddedCollectionUpdate(EntityAccess parentAccess, BsonDocument sets, Document unsets, Association association, v) {
protected void encodeEmbeddedCollectionUpdate(EntityAccess parentAccess, BsonDocument sets, Document unsets, Association association, Object v) {
if(v instanceof Collection) {
if((v instanceof DirtyCheckableCollection) && !((DirtyCheckableCollection)v).hasChangedSize()) {
int i = 0
for(o in v) {
for(o in (v as Collection)) {
def embeddedUpdate = encodeUpdate(o, createEntityAccess(o), EncoderContext.builder().build(), true)
def embeddedSets = embeddedUpdate.get(MONGO_SET_OPERATOR)
if(embeddedSets != null) {
Expand Down
19 changes: 8 additions & 11 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "com.gradle.enterprise" version "3.16.1"
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.12.1'
id "com.gradle.enterprise" version "3.16.2"
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.13'
}

gradleEnterprise {
Expand All @@ -13,20 +13,17 @@ gradleEnterprise {
taskInputFiles = true
}
}

}

buildCache {
local { enabled = System.getenv('CI') != 'true' }
remote(HttpBuildCache) {
push = System.getenv('CI') == 'true'
remote(gradleEnterprise.buildCache) {
def isAuthenticated = System.getenv('GRADLE_ENTERPRISE_ACCESS_KEY')
push = System.getenv('CI') == 'true' && isAuthenticated
enabled = true
url = 'https://ge.grails.org/cache/'
credentials {
username = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER')
password = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')
}
}}

}
}

// core
include "grails-datastore-gorm-bson"
Expand Down
Loading