From c146d1f5b015ed5637f09338a3d97332b0241269 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:50:08 +0530 Subject: [PATCH 1/3] fix(deps): update grails monorepo to v6.1.2 (#697) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 723ffade..ea4efbee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ caffeineVersion=2.9.3 datastoreVersion=8.0.4 gebVersion=2.3 grailsVersion=6.0.0 -grailsGradlePluginVersion=6.1.1 +grailsGradlePluginVersion=6.1.2 groovyVersion=3.0.11 h2Version=1.4.200 hibernateCoreVersion=5.5.7.Final @@ -14,7 +14,7 @@ javaParserCoreVersion=3.25.8 junitJupiterVersion=5.10.1 mongodbDriverVersion=4.11.1 mongodbRxDriverVersion=1.10.0 -pluginGrailsVersion=6.1.1 +pluginGrailsVersion=6.1.2 projectVersion=8.1.3-SNAPSHOT seleniumSafariDriverVersion=3.14.0 seleniumVersion=3.14.0 From 226202b27c524cd4a6d739866b468a4dc20afe07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:50:23 +0530 Subject: [PATCH 2/3] chore(deps): update gradle/wrapper-validation-action action to v2 (#696) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4aa5bd32..3a661970 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: From 3c3f39c1148f2872f65253747f9359136964b95d Mon Sep 17 00:00:00 2001 From: James Fredley Date: Wed, 4 Sep 2024 17:47:03 -0400 Subject: [PATCH 3/3] Merge branch '8.2.x' into 9.0.x # Conflicts: # gradle.properties --- .github/release-drafter.yml | 107 ++++++++++++++++-- .github/workflows/gradle.yml | 12 +- .github/workflows/groovy-joint-workflow.yml | 15 +-- .github/workflows/release-notes.yml | 13 ++- .github/workflows/release.yml | 4 +- build.gradle | 12 +- gradle.properties | 14 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- grails-datastore-gorm-mongodb/build.gradle | 2 +- .../codecs/PersistentEntityCodec.groovy | 4 +- settings.gradle | 19 ++-- 11 files changed, 139 insertions(+), 65 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 6c4938f8..a21db2e5 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -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: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index f9404a61..938bfea5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -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: @@ -55,11 +53,9 @@ 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: @@ -67,11 +63,9 @@ jobs: - 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 diff --git a/.github/workflows/groovy-joint-workflow.yml b/.github/workflows/groovy-joint-workflow.yml index 73f6de9d..cb2b174e 100644 --- a/.github/workflows/groovy-joint-workflow.yml +++ b/.github/workflows/groovy-joint-workflow.yml @@ -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 @@ -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: | @@ -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 diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index 3d790afe..5c5f7812 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -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: @@ -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' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4aa5bd32..b22d4c7c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 }} diff --git a/build.gradle b/build.gradle index 1fbb259f..b7cd0adc 100644 --- a/build.gradle +++ b/build.gradle @@ -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" } } @@ -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" } @@ -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 { diff --git a/gradle.properties b/gradle.properties index 97be5af4..2397c797 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b1624c47..c7d437bb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/grails-datastore-gorm-mongodb/build.gradle b/grails-datastore-gorm-mongodb/build.gradle index a8742490..957fc8f7 100644 --- a/grails-datastore-gorm-mongodb/build.gradle +++ b/grails-datastore-gorm-mongodb/build.gradle @@ -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" diff --git a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy index ce294b15..2d047a61 100644 --- a/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy +++ b/grails-datastore-gorm-mongodb/src/main/groovy/org/grails/datastore/mapping/mongo/engine/codecs/PersistentEntityCodec.groovy @@ -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) { diff --git a/settings.gradle b/settings.gradle index d32a3896..047b641f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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 { @@ -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"