This is an automated email from the ASF dual-hosted git repository. jdaugherty pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit f6a10a35d0f270bbcdb32b8d74b504fec849cff4 Merge: bdc9c8e951 e4b22127dc Author: James Daugherty <[email protected]> AuthorDate: Thu Oct 22 10:05:04 2026 -0400 [skip tests] Merge branch '8.0.x' into 8.1.x # Conflicts: # gradle.properties # grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/buildGradle.rocker.raw .agents/skills/gradle-developer/SKILL.md | 22 +- .sdkmanrc | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../grails/async/factory/rxjava3/RxPromise.groovy | 47 +- .../async/factory/rxjava3/RxPromiseFactory.groovy | 39 +- .../async/factory/rxjava3/RxPromiseListSpec.groovy | 76 ++++ .../async/factory/rxjava3/RxPromiseNullSpec.groovy | 98 +++++ .../async/factory/rxjava3/RxPromiseSpec.groovy | 16 +- .../config/GrailsApplicationPostProcessor.groovy | 30 +- ...ifactsAutowiredAnnotationBeanPostProcessor.java | 90 ++++ ...ArtifactsCommonAnnotationBeanPostProcessor.java | 79 ++++ .../grails/core/aot/GeneratedBeanDefinitions.java | 310 ++++++++++++++ ...ratedInjectionBeanRegistrationAotProcessor.java | 69 +++ .../main/resources/META-INF/spring/aot.factories | 1 + .../config/GeneratedArtifactsInjectionSpec.groovy | 475 +++++++++++++++++++++ ...icationPostProcessorAnnotationConfigSpec.groovy | 84 ++++ .../core/aot/GeneratedBeanDefinitionsSpec.groovy | 251 +++++++++++ ...njectionBeanRegistrationAotProcessorSpec.groovy | 117 +++++ .../orm/hibernate/cfg/GrailsDomainBinder.java | 10 +- .../tests/ManyToManyWithoutOwnerWarningSpec.groovy | 164 ++++++- .../domainClasses/gormAssociation/manyToMany.adoc | 23 + .../datastore/bson/codecs/CodecExtensions.groovy | 12 +- .../decoders/EmbeddedCollectionDecoder.groovy | 3 +- .../codecs/BsonPersistentEntityCodecSpec.groovy | 31 +- .../bson/codecs/CodecExtensionsSpec.groovy | 67 +++ .../decoders/EmbeddedCollectionDecoderSpec.groovy | 20 + .../MapKeysNamedLikeBeanPropertiesSpec.groovy | 130 ++++++ .../MongoLookupByIdMultiTenancySpec.groovy | 12 +- .../docs/src/docs/asciidoc/objectMapping.adoc | 2 + .../docs/asciidoc/objectMapping/dirtyChecking.adoc | 5 + .../multitenancy/LookupByIdMultiTenancySpec.groovy | 219 ++++++++++ .../asciidoc/multiTenancy/multiTenancyModes.adoc | 10 + .../grails/databinding/SimpleDataBinder.groovy | 11 +- .../databinding/CollectionBindingSpec.groovy | 15 + .../grails/databinding/SimpleDataBinderSpec.groovy | 14 + .../partitioned/PartitionedLookupByIdSpec.groovy | 12 +- .../org/grails/datastore/gorm/GormStaticApi.groovy | 87 ++-- .../grails/datastore/gorm/GormStaticApiSpec.groovy | 72 ++++ .../mapping/dirty/checking/DirtyCheckingMap.groovy | 43 +- .../checking/DirtyCheckingCollectionSpec.groovy | 105 +++++ grails-doc/src/en/guide/REST/openApi.adoc | 21 + .../src/en/guide/deployment/deploymentAot.adoc | 4 +- .../guide/theWebLayer/controllers/dataBinding.adoc | 2 + .../src/en/guide/upgrading/upgrading80x.adoc | 31 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../groovy/org/grails/forge/cli/CommandSpec.groovy | 8 + .../forge/cli/CommandSpecBuildFailureSpec.groovy | 60 +++ .../feature/build/gradle/templates/buildGradle.gsp | 5 +- .../gradle/templates/gradleWrapperProperties.gsp | 2 +- .../grails/forge/feature/api/OpenApiSpec.groovy | 16 + .../feature/assetPipeline/AssetPipelineSpec.groovy | 4 +- .../forge/features/openapi/OpenApiBuildSpec.groovy | 44 ++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../skills/grails-8-upgrade/SKILL.md | 2 +- .../web/databinding/GrailsWebDataBinderSpec.groovy | 49 +++ ...GrailsWebDataBindingStructuredEditorSpec.groovy | 15 + .../web/databinding/GrailsWebDataBinder.groovy | 11 +- .../AbstractStructuredBindingEditor.groovy | 3 +- 64 files changed, 3036 insertions(+), 132 deletions(-) diff --cc build-logic/gradle/wrapper/gradle-wrapper.properties index 4a0dd224bb,a7c3019282..76995a5c5c --- a/build-logic/gradle/wrapper/gradle-wrapper.properties +++ b/build-logic/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --cc gradle.properties index b3f610d3c8,403f878bd6..8438c08568 --- a/gradle.properties +++ b/gradle.properties @@@ -47,8 -41,8 +47,8 @@@ expectitCoreVersion=0.9. geantyrefVersion=1.3.16 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 +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp - gradleToolingApiVersion=9.8.1 + gradleToolingApiVersion=9.8.2 greenmailVersion=2.1.14 javassistVersion=3.33.0-GA jnrPosixVersion=3.2.4 diff --cc gradle/wrapper/gradle-wrapper.properties index 4a0dd224bb,a7c3019282..76995a5c5c --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --cc grails-forge/gradle/wrapper/gradle-wrapper.properties index 4a0dd224bb,a7c3019282..76995a5c5c --- a/grails-forge/gradle/wrapper/gradle-wrapper.properties +++ b/grails-forge/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --cc grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/buildGradle.gsp index b83b0ab1ee,0000000000..84159cb17a mode 100644,000000..100644 --- a/grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/buildGradle.gsp +++ b/grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/buildGradle.gsp @@@ -1,140 -1,0 +1,143 @@@ +%{-- +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. +--}% +<%@ page trimLogicLines="true" expressionCodec="none" %> +<%@ page import="java.util.function.Function" %> +<%@ page import="org.grails.forge.application.ApplicationType" %> +<%@ page import="org.grails.forge.build.dependencies.CoordinateResolver" %> +<%@ page import="org.grails.forge.application.Project" %> +<%@ page import="org.grails.forge.build.dependencies.Coordinate" %> +<%@ page import="org.grails.forge.build.gradle.GradleBuild" %> +<%@ page import="org.grails.forge.build.gradle.GradleDsl" %> +<%@ page import="org.grails.forge.build.gradle.GradlePlugin" %> +<%@ page import="org.grails.forge.feature.Features" %> +<%@ page import="org.grails.forge.util.VersionInfo" %> +<%@ page import="org.grails.forge.options.JdkVersion" %> +<%@ page import="org.grails.forge.build.gradle.GradleDependency" %> +<%@ page import="org.grails.forge.build.gradle.GradleRepository" %> +<%@ page import="org.grails.forge.template.GspView" %> +<%@ model="ApplicationType applicationType" %> +<%@ model="Project project" %> +<%@ model="Function<String,Coordinate> coordinateResolver" %> +<%@ model="Features features" %> +<%@ model="GradleBuild gradleBuild" %> +<%@ model="String grailsVersion" %> +<% if (!features.contains('gradle-build-src') && !gradleBuild.getBuildscriptDependencies().isEmpty()) { %> +buildscript { + repositories { + <% for (GradleRepository repo : gradleBuild.getBuildRepositories()) { %> + ${repo.toSnippet(' ')} + <% } %> + } + dependencies { // Not Published to Gradle Plugin Portal + <% for (GradleDependency dependency : gradleBuild.getBuildscriptDependencies()) { %> + ${dependency.toSnippet()} + <% } %> + } +} + +<% } %> +<% for (String importLine : gradleBuild.getPluginsImports()) { %> +${importLine}<% } %>plugins { + <% for (GradlePlugin gradlePlugin : gradleBuild.getPluginsWithoutApply()) { %> + <% if (gradlePlugin.getVersion() != null) { %> + id "${gradlePlugin.getId()}" version "${gradlePlugin.getVersion()}" + <% } else { %> + id "${gradlePlugin.getId()}" + <% } %> + <% } %> +} + +<% if (!gradleBuild.getPluginsWithApply().isEmpty()) { %> +// Not Published to Gradle Plugin Portal +<% for (GradlePlugin gradlePlugin : gradleBuild.getPluginsWithApply()) { %> +apply plugin: "${gradlePlugin.getId()}" +<% } %> +<% } %> + +group = "${project.getPackageName()}" + +<% if (features.contains('asciidoctor')) { %> +apply from: "gradle/asciidoc.gradle" +<% } %> +repositories { + <% for (GradleRepository repo : gradleBuild.getRepositories()) { %> + ${repo.toSnippet(' ')} + <% } %> +} + +${GspView.of('/forge/feature/build/gradle/templates/dependencies.gsp', [applicationType: applicationType, project: project, features: features, gradleBuild: gradleBuild]).render()} +compileJava.options.release = ${features.getTargetJdk()} + +<% if (features.contains('jrebel')) { %> +tasks.named('bootRun') { + dependsOn(generateRebel) + if (project.hasProperty("rebelAgent")) { + jvmArgs(rebelAgent) + } +} + +<% } %> +<% if (features.contains('spock')) { %> +tasks.withType(Test).configureEach { + useJUnitPlatform() + <% if (features.contains('geb-with-local-browsers')) { %> + def gebEnv = providers.systemProperty('geb.env') + if (gebEnv.present) { + systemProperty('geb.env', gebEnv.get()) + } + <% } %> +} +<% } %> +${gradleBuild.renderExtensions()} +<% if (features.contains('grails-compile-static')) { %> +grails { + compileStatic { + controllers = true + services = true + tagLibs = true + <% if (features.contains('gsp')) { %> + gsp = true + <% } %> + } +} + +<% } %> +<% if (features.contains('asset-pipeline-grails')) { %> +assets { + <% if (applicationType == ApplicationType.WEB_PLUGIN) { %> + packagePlugin = true + <% } %> + excludes = [ + 'webjars/jquery/**', + 'webjars/bootstrap/**', - 'webjars/bootstrap-icons/**' ++ 'webjars/bootstrap-icons/**', ++ <% if (features.contains('openapi')) { %> ++ 'webjars/swagger-ui/**', ++ <% } %> + ] + includes = [ + 'webjars/jquery/*/dist/jquery.js', + 'webjars/bootstrap/*/dist/js/bootstrap.bundle.js', + 'webjars/bootstrap/*/dist/css/bootstrap.css', + 'webjars/bootstrap-icons/*/font/bootstrap-icons.css', + 'webjars/bootstrap-icons/*/font/fonts/*', + ] +} + +<% } %> diff --cc grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp index 80b3a14e0e,fa86364e51..42c113d30e --- a/grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp +++ b/grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp @@@ -15,23 -15,26 +15,23 @@@ software distributed under the License KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -*@ - -@import java.util.function.Function -@import org.grails.forge.application.Project -@import org.grails.forge.build.dependencies.CoordinateResolver -@import org.grails.forge.build.dependencies.Coordinate -@import org.grails.forge.build.gradle.GradleBuild -@import org.grails.forge.build.gradle.GradlePlugin -@import org.grails.forge.feature.Features - -@args ( -Project project, -GradleBuild gradleBuild, -Function<String, Coordinate> coordinateResolver, -Features features) - -@* Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all gradle-wrapper.properties files *@ +--}% +<%@ page trimLogicLines="true" expressionCodec="none" %> +<%@ page import="java.util.function.Function" %> +<%@ page import="org.grails.forge.application.Project" %> +<%@ page import="org.grails.forge.build.dependencies.CoordinateResolver" %> +<%@ page import="org.grails.forge.build.dependencies.Coordinate" %> +<%@ page import="org.grails.forge.build.gradle.GradleBuild" %> +<%@ page import="org.grails.forge.build.gradle.GradlePlugin" %> +<%@ page import="org.grails.forge.feature.Features" %> +<%@ model="Project project" %> +<%@ model="GradleBuild gradleBuild" %> +<%@ model="Function<String,Coordinate> coordinateResolver" %> +<%@ model="Features features" %> +%{-- Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all gradle-wrapper.properties files --}% distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --cc grails-gradle/gradle/wrapper/gradle-wrapper.properties index 4a0dd224bb,a7c3019282..76995a5c5c --- a/grails-gradle/gradle/wrapper/gradle-wrapper.properties +++ b/grails-gradle/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --cc grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties index 86a12e849b,bb93e7814f..c3e4654a5e --- a/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties +++ b/grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --cc grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties index 86a12e849b,bb93e7814f..c3e4654a5e --- a/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties +++ b/grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties @@@ -1,8 -1,8 +1,8 @@@ # Keep gradle version synced with .sdkmanrc, gradle.properties (gradleToolingApiVersion), all other gradle-wrapper.properties files, -# and grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw +# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists - distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME
