You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ma...@apache.org on 2026/09/24 08:54:41 UTC

(grails-core) branch deps/groovy-6.0.0 updated (8fbce0b6cf -> 1ab1f81345)

This is an automated email from the ASF dual-hosted git repository.

matrei pushed a change to branch deps/groovy-6.0.0
in repository https://gitbox.apache.org/repos/asf/grails-core.git


    omit 8fbce0b6cf Set the Spock Groovy version opt-out for every module
    omit f4471467ae Fix the Groovy 6 CI failures
    omit 35f76f00fe Upgrade Groovy to 6.0.0
     add 27d86820be fix: capture STACK_LOG output via a Logback appender instead of System.err
     add a8227fdbbb fix: convert GrailsExceptionResolverSpec to LogCapture, remove last System.err capture
     add 9e30fb08e5 Improve unresolved plugin dependency diagnostics
     add 9e73262146 Address review feedback on plugin dependency diagnostics
     add a1594a541e fix: preserve full transaction attribute state in CustomizableRollbackTransactionAttribute copy constructors
     add 7edff9cb78 Compare configuration metadata paths as the build reports them
     add a25b343435 Add unit coverage for MongodbGrailsPlugin
     add 9840b9c074 Add unit coverage for MongoExtensions
     add 82003817dd Add unit coverage for the simple bson Codec classes
     add 4ab5ee89c0 Add unit coverage for the bson codecs.decoders package
     add 65fb5b578b Add unit coverage for the bson codecs.encoders package
     add 3077fb7db4 Add unit coverage for CodecCustomTypeMarshaller and CodecExtensions
     add 10eca7c29d Add unit coverage for the bson json parser package
     add 1367d7e450 Add unit coverage for the embedded module's backend classes
     add fae8323e92 Add targeted unit coverage for GormSharedSessionMongoTransactionManager
     add 0e55d5513b Add targeted unit coverage for remaining core module gaps
     add 5619a371c2 Merge pull request #16285 from apache/test/grails-data-mongodb-specs
     add cb7e4a9d89 Add test coverage and clean up grails-datamapping-core validation package
     add e38e562ec0 Merge pull request #16189 from apache/chore/datamapping-core-validation-cleanup
     add df7efef273 Add missing test coverage to grails-data-graphql and remove dead disabled spec
     add ee104d2a8c Clean up EntityFetchOptions.java and add its first direct test coverage
     add 0c5defafdf Parameterize raw Association/ToOne/Selection usages in EntityFetchOptions
     add 3192a45320 Restore null-safe getMergedField handling and cover ClosureDataFetcher.buildFetchOptions
     add 5ae100f31a Consolidate PersistentGraphQLProperty's order resolution to a single assignment
     add 149fe635ad Consolidate PersistentGraphQLProperty.getGraphQLType entity/embedded resolution
     add 53a30e3608 Replace deprecated GraphQLArgument/GraphQLInputObjectField defaultValue calls
     add 2308fc63b0 Remove @CompileDynamic escape hatch from GraphQLMapping.methodMissing
     add d72aae4f8d Register custom operation data fetchers via the code registry
     add bbb476a7e2 Merge pull request #16202 from apache/refactor/graphql-entity
     add 4131ce905e Backport GORM AST transform test coverage and crash fixes to 8.0.x
     add 043aee944f Merge pull request #16389 from apache/test/gorm-ast-transform-coverage-8.0.x
     add a2211e9ceb Fix flaky PerTestRecordingSpec by waiting for recordings to stabilize
     add c9b3be3d96 Fix the real causes behind PerTestRecordingSpec's flakiness
     add 28a91dfead Add unit coverage for WebDriverContainerHolder and ground the recording size floor in real measurements
     add d33598371c Address review feedback: fix restart failure handling, driver leak, and test hermeticity
     add 4451faf7f4 Merge pull request #16031 from apache/fix/flaky-per-test-recording-spec
     add 0a412d76f4 Add test coverage for grails-datamapping-async and type decorator closures
     add cb8fc6b371 Add test coverage for AsyncEntity.getAsync()
     add 524a336df1 Merge pull request #16193 from apache/chore/clean-grails-datamapping-async
     add 7d5e684929 fix(config): bind nested settings maps under Spring 7
     add 8aee63808c Bind nested settings entries the resolver cannot address by path
     add 7ab5673d56 Merge pull request #16160 from apache/fix/spring7-nested-map-conversion
     add 99251f30c1 added specs to package
     add 014a0d414c Merge pull request #16188 from apache/test/datamapping-core-utils-cleanup
     add 144eec3a5a Add unit test coverage for the jdbc package in grails-datamapping-core
     add 241a7ef388 Fix potential NPE in DataSourceConnectionSource.close() when unwrapping a DelegatingDataSource
     add 81500c871c Rename shadowed local variable in DataSourceSettings.toProperties()
     add f8cf9d9205 Clean up IntelliJ inspection findings in DataSourceBuilder
     add ff22a0e3d8 Clean up IntelliJ inspection findings in RelaxedDataBinder
     add f2fff3f37c Annotate RelaxedNames/RelaxedConversionService overrides to match Spring's @NullMarked contracts
     add b682cab4fe Annotate remaining nullable overrides in RelaxedConversionService's nested classes
     add 78ac99346d Remove blank Javadoc line in DataSourceBuilder class comment
     add f91a6d3fa7 Close the application contexts opened by the jdbc connection source specs
     add d5a28073ca Remove the unreachable OriginCapablePropertyValue and PropertyOrigin
     add 35494623cd Merge pull request #16153 from apache/chore/jdbc-package-cleanup
     add 5ab85c3108 Merge remote-tracking branch 'upstream/8.0.x' into pr-16063
     add 7c69251c84 fix: honor @NotTransactional opt-out on class-annotated services
     add 63e0b577ca Merge pull request #16063 from borinquenkid/fix/customizable-rollback-tx-attribute-copy
     add 543aa9e55b Improve hot path virtual-thread and codec performance
     add ab2e4f4922 Restore decodeHex Groovy truth compatibility
     add 0282babb06 Address codec and virtual-thread performance review feedback
     add 1cce6632ac Finish the codec review follow-ups
     add b49a48e2ec Merge pull request #15828 from apache/perf/vthread-static-compile-8.0.x
     add 0a4ec6f2bb Merge remote-tracking branch 'upstream/8.0.x' into review-15995
     add 3b3464ef8b Capture plugin dependency diagnostics through logback and report pending versions
     add bba0e9c753 Merge pull request #15995 from apache/fix/plugin-dependency-diagnostics
     add 19fc2a11d7 Remove jodd-wot from fields tests
     add 3b8b35feaf Replace string assertions with Jsoup DOM parsing per review discussion
     add 30fa9ee3f2 Merge remote-tracking branch 'upstream/8.0.x' into pr-15965
     add 2da4fa140b Bump jsoup to 1.23.2 and tighten DefaultFieldTemplateSpec assertions
     add e35e3ae1b1 Merge pull request #15965 from apache/chore/remove-jodd-wot
     add ea69ef4501 Merge branch '8.0.x' into fix/stacktrace-filterer-test-log-capture
     add 64da415999 test: tighten StackTrace LogCapture assertions and pin web-mvc test logging
     add 7ea4cb9d8e Merge pull request #16067 from apache/fix/stacktrace-filterer-test-log-capture
     new d1cbf7fd0a Upgrade Groovy to 6.0.0
     new d5f4d8355d Fix the Groovy 6 CI failures
     new 1ab1f81345 Set the Spock Groovy version opt-out for every module

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8fbce0b6cf)
            \
             N -- N -- N   refs/heads/deps/groovy-6.0.0 (1ab1f81345)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ConfigurationMetadataPluginSpec.groovy         |    7 +-
 gradle.properties                                  |    2 +-
 .../codecs/Base64CodecExtensionMethods.groovy      |   14 +-
 .../org/grails/plugins/codecs/DigestUtils.groovy   |   85 +-
 .../plugins/codecs/HexCodecExtensionMethods.groovy |   52 +-
 .../codecs/MD5BytesCodecExtensionMethods.groovy    |    7 +-
 .../plugins/codecs/MD5CodecExtensionMethods.groovy |   10 +-
 .../codecs/SHA1BytesCodecExtensionMethods.groovy   |    7 +-
 .../codecs/SHA1CodecExtensionMethods.groovy        |    9 +-
 .../codecs/SHA256BytesCodecExtensionMethods.groovy |    7 +-
 .../codecs/SHA256CodecExtensionMethods.groovy      |    9 +-
 .../org/grails/web/codecs/Base64CodecTests.groovy  |   12 +
 .../org/grails/web/codecs/HexCodecTests.groovy     |   24 +-
 .../core/plugins/DefaultPluginDiscovery.java       |   57 +-
 .../grails/util/GrailsUtilStackFiltererSpec.groovy |    2 +-
 .../GrailsBootstrapRegistryInitializerSpec.groovy  |    2 +-
 .../grails/core/plugins/PluginDiscoverySpec.groovy |  146 +++
 .../groovy/org/grails/gorm/graphql/Schema.groovy   |    4 +-
 .../gorm/graphql/entity/EntityFetchOptions.java    |   41 +-
 .../graphql/entity/arguments/CustomArgument.groovy |    9 +-
 .../gorm/graphql/entity/dsl/GraphQLMapping.groovy  |   27 +-
 .../graphql/entity/dsl/helpers/Arguable.groovy     |    4 +-
 .../graphql/entity/dsl/helpers/ComplexTyped.groovy |   16 +-
 .../entity/operations/CustomOperation.groovy       |   12 +-
 .../property/impl/PersistentGraphQLProperty.groovy |   50 +-
 .../gorm/graphql/MongoSchemaSpec.groovy.disabled   |  122 --
 .../DataBinderNotFoundExceptionSpec.groovy}        |   25 +-
 .../graphql/entity/EntityFetchOptionsSpec.groovy   |  105 ++
 .../entity/arguments/SimpleArgumentSpec.groovy     |   89 ++
 .../graphql/entity/dsl/GraphQLMappingSpec.groovy   |   35 +-
 .../entity/dsl/helpers/ComplexTypedSpec.groovy     |   69 ++
 ...ovy => DataFetcherNotFoundExceptionSpec.groovy} |   27 +-
 .../fetcher/impl/ClosureDataFetcherSpec.groovy     |   40 +-
 .../impl/ClosureDataFetchingEnvironmentSpec.groovy |   75 ++
 .../fetcher/impl/CountEntityDataFetcherSpec.groovy |   61 +
 .../impl/PaginatedEntityDataFetcherSpec.groovy     |   87 ++
 ...vy => PersistentPropertyDataFetcherSpec.groovy} |   43 +-
 ...=> CustomMutationInterceptorInvokerSpec.groovy} |    2 +-
 .../CustomQueryInterceptorInvokerSpec.groovy       |   36 +-
 .../MutationInterceptorInvokerSpec.groovy          |   28 +-
 .../interceptor/QueryInterceptorInvokerSpec.groovy |   28 +-
 .../CachingGraphQLResponseHandlerSpec.groovy       |   54 +
 .../DefaultGraphQLErrorsResponseHandlerSpec.groovy |   19 +
 .../gorm/graphql/types/KeyClassQuerySpec.groovy    |   81 ++
 .../scalars/coercing/CurrencyCoercionSpec.groovy   |   83 ++
 .../types/scalars/coercing/DateCoercionSpec.groovy |  119 ++
 .../scalars/coercing/SqlDateCoercionSpec.groovy    |  110 ++
 .../types/scalars/coercing/TimeCoercionSpec.groovy |  102 ++
 .../scalars/coercing/TimeZoneCoercionSpec.groovy   |   78 ++
 .../scalars/coercing/TimestampCoercionSpec.groovy  |  102 ++
 .../types/scalars/coercing/URICoercionSpec.groovy  |   91 ++
 .../types/scalars/coercing/URLCoercionSpec.groovy  |   91 ++
 .../types/scalars/coercing/UUIDCoercionSpec.groovy |   97 ++
 .../coercing/jsr310/InstantCoercionSpec.groovy     |   96 ++
 .../coercing/jsr310/LocalDateCoercionSpec.groovy   |  101 ++
 .../jsr310/LocalDateTimeCoercionSpec.groovy        |   93 ++
 .../coercing/jsr310/LocalTimeCoercionSpec.groovy   |   93 ++
 .../jsr310/OffsetDateTimeCoercionSpec.groovy       |   94 ++
 .../coercing/jsr310/OffsetTimeCoercionSpec.groovy  |   94 ++
 .../jsr310/ZonedDateTimeCoercionSpec.groovy        |   94 ++
 ...rnateConnectionSourceSettingsBuilderSpec.groovy |   14 +
 .../codecs/CodecCustomTypeMarshallerSpec.groovy    |   79 ++
 .../bson/codecs/CodecExtensionsSpec.groovy         |  450 ++++++++
 .../datastore/bson/codecs/SimpleCodecsSpec.groovy  |  256 +++++
 .../decoders/BasicCollectionTypeDecoderSpec.groovy |  155 +++
 .../codecs/decoders/CustomTypeDecoderSpec.groovy   |  146 +++
 .../decoders/EmbeddedCollectionDecoderSpec.groovy  |  148 +++
 .../codecs/decoders/EmbeddedDecoderSpec.groovy     |  120 ++
 .../codecs/decoders/IdentityDecoderSpec.groovy     |  120 ++
 .../bson/codecs/decoders/SimpleDecoderSpec.groovy  |  158 +++
 .../decoders/TemporalTypeDecodersSpec.groovy       |   64 ++
 .../codecs/decoders/TenantIdDecoderSpec.groovy     |   91 ++
 .../encoders/BasicCollectionTypeEncoderSpec.groovy |  179 +++
 .../codecs/encoders/CustomTypeEncoderSpec.groovy   |  116 ++
 .../encoders/EmbeddedCollectionEncoderSpec.groovy  |  213 ++++
 .../codecs/encoders/EmbeddedEncoderSpec.groovy     |  153 +++
 .../codecs/encoders/IdentityEncoderSpec.groovy     |  215 ++++
 .../bson/codecs/encoders/SimpleEncoderSpec.groovy  |  189 ++++
 .../encoders/TemporalTypeEncodersSpec.groovy       |   70 ++
 .../codecs/encoders/TenantIdEncoderSpec.groovy     |   65 ++
 .../datastore/bson/json/JsonReaderSpec.groovy      |  419 ++++++-
 .../datastore/bson/json/JsonWriterSpec.groovy      |  342 ++++++
 .../groovy/grails/mongodb/geo/DistanceSpec.groovy  |   63 ++
 .../gorm/mongo/SwitchDatabaseAtRuntimeSpec.groovy  |   75 ++
 .../MongoConnectionSourceSettingsSpec.groovy       |   45 +
 .../mongo/engine/MongoIdCoercionSpec.groovy        |  187 +++
 .../embedded/FlapdoodleMongoBackendSpec.groovy     |   56 +
 .../embedded/InMemoryMongoBackendSpec.groovy       |  109 ++
 grails-data-mongodb/ext/build.gradle               |    3 +
 .../mongo/extensions/MongoExtensionsSpec.groovy    | 1195 ++++++++++++++++++++
 grails-data-mongodb/grails-plugin/build.gradle     |    7 +
 .../plugins/mongodb/MongodbGrailsPluginSpec.groovy |  117 ++
 ...SharedSessionMongoTransactionManagerSpec.groovy |  137 +++
 grails-datamapping-async/build.gradle              |    4 +
 .../grails/datastore/gorm/async/AsyncQuery.groovy  |    4 +-
 .../datastore/gorm/async/GormAsyncStaticApi.groovy |    4 +-
 .../grails/gorm/async/AsyncEntitySpec.groovy       |   93 ++
 .../datastore/gorm/async/AsyncQuerySpec.groovy     |   91 ++
 .../gorm/async/GormAsyncStaticApiSpec.groovy       |  115 ++
 .../compiler/gorm/DirtyCheckTransformation.groovy  |   16 +-
 .../compiler/gorm/DirtyCheckingTransformer.groovy  |   44 +-
 .../compiler/gorm/GormEntityTransformation.groovy  |   50 +-
 .../gorm/JpaGormEntityTransformation.groovy        |   14 +-
 .../gorm/LocalTransformationSupport.groovy         |   61 +
 .../datastore/gorm/jdbc/DataSourceBuilder.java     |   21 +-
 .../gorm/jdbc/OriginCapablePropertyValue.java      |   63 --
 .../gorm/jdbc/RelaxedConversionService.java        |   26 +-
 .../datastore/gorm/jdbc/RelaxedDataBinder.java     |   79 +-
 .../grails/datastore/gorm/jdbc/RelaxedNames.java   |    6 +-
 .../connections/DataSourceConnectionSource.java    |    3 +
 .../jdbc/connections/DataSourceSettings.groovy     |   16 +-
 .../SpringDataSourceConnectionSourceFactory.java   |    4 +-
 .../multitenancy/transform/TenantTransform.groovy  |    2 +-
 .../transform/TransactionalTransform.groovy        |   13 +
 .../transform/OrderedGormTransformation.groovy     |    4 +-
 .../datastore/gorm/utils/ReflectionUtils.java      |    6 +-
 .../validation/jakarta/GormValidatorAdapter.groovy |    2 +-
 .../jakarta/GormValidatorFactoryAdapter.groovy     |    2 +-
 .../jakarta/JakartaValidatorRegistry.groovy        |    6 +-
 .../gorm/validation/jakarta/MethodKey.java         |    8 +-
 .../MethodValidationImplementer.groovy             |   11 +-
 .../listener/ValidationEventListener.groovy        |    4 +-
 .../test/groovy/com/IgnoredPackageEntity.groovy    |   17 +-
 .../multitenancy/TenantTransformSpec.groovy        |  176 +++
 .../transactions/TransactionalTransformSpec.groovy |   75 ++
 .../ConnectionRoutingServiceTransformSpec.groovy   |  144 +++
 .../TransactionRollbackRulePropagationSpec.groovy  |  159 +++
 .../compiler/gorm/JpaEntityTransformSpec.groovy    |   52 +
 .../checking/DirtyCheckTransformationSpec.groovy   |    7 +
 .../datastore/gorm/jdbc/DatabaseDriverSpec.groovy  |   89 ++
 .../gorm/jdbc/MultiTenantConnectionSpec.groovy     |   34 +
 .../gorm/jdbc/MultiTenantDataSourceSpec.groovy     |   72 ++
 .../gorm/jdbc/RelaxedConversionServiceSpec.groovy  |  116 ++
 .../gorm/jdbc/RelaxedDataBinderSpec.groovy         |  123 ++
 .../datastore/gorm/jdbc/RelaxedNamesSpec.groovy    |   77 ++
 ...hedDataSourceConnectionSourceFactorySpec.groovy |   58 +
 .../DataSourceConnectionSourceFactorySpec.groovy   |  115 ++
 .../DataSourceConnectionSourceSpec.groovy          |  108 ++
 .../DataSourceSettingsBuilderSpec.groovy           |   75 ++
 .../jdbc/connections/DataSourceSettingsSpec.groovy |  123 ++
 ...ingDataSourceConnectionSourceFactorySpec.groovy |   89 ++
 .../DetachedCriteriaASTTransformationSpec.groovy   |  131 +++
 .../WhereQueryAggregateSubqueryErrorSpec.groovy    |  131 +++
 .../transform/WhereQueryAssociationPathSpec.groovy |  233 ++++
 .../WhereQueryDetachedCriteriaCastSpec.groovy      |  131 +++
 .../WhereQueryEmbeddedPropertyPathSpec.groovy      |  196 ++++
 .../transform/WhereQueryFunctionCallSpec.groovy    |  150 +++
 ...reQueryMultiLevelAssociationFunctionSpec.groovy |  138 +++
 .../query/transform/WhereQueryNegationSpec.groovy  |  121 ++
 .../query/transform/WhereQueryOperatorSpec.groovy  |  283 +++++
 .../transform/WhereQueryPropertyAliasSpec.groovy   |  177 +++
 .../transform/WhereQueryStaticFieldSpec.groovy     |  252 +++++
 .../transform/ServiceTransformationSpec.groovy     |  183 +++
 .../support/AdaptedProbeServiceImplementer.groovy  |   64 ++
 .../support/NoOpServiceImplementerAdapter.groovy}  |   37 +-
 .../support/ProbeServiceImplementer.groovy         |   63 ++
 .../support/ProbeServiceImplementerAdapter.groovy  |   43 +
 .../AbstractGormASTTransformationSpec.groovy       |  123 ++
 ...ctTraitApplyingGormASTTransformationSpec.groovy |  170 +++
 .../ApplyNonCompilationUnitAwareTransform.java     |   40 +
 .../gorm/transform/ApplyTestTraitWeaving.java}     |   40 +-
 .../transform/ApplyUnloadableGormTransform.java    |   39 +
 .../gorm/transform/DoubleGenericTestTrait.groovy   |   21 +-
 ...nCompilationUnitAwareTestTransformation.groovy} |   37 +-
 .../transform/OrderedGormTransformationSpec.groovy |   69 ++
 .../gorm/transform/SingleGenericTestTrait.groovy   |   19 +-
 .../TestTraitWeavingTransformation.groovy          |   61 +
 .../gorm/transform/TestWeavableTrait.groovy        |   19 +-
 .../gorm/utils/ClasspathEntityScannerSpec.groovy   |   71 +-
 .../gorm/utils/ReflectionUtilsSpec.groovy          |   80 ++
 ...MappingContextAwareConstraintFactorySpec.groovy |   55 +
 .../ConfigurableParameterNameProviderSpec.groovy   |   79 ++
 .../jakarta/ConstraintViolationUtilsSpec.groovy    |   68 ++
 .../jakarta/GormValidatorFactoryAdapterSpec.groovy |  149 +++
 .../jakarta/JakartaValidatorRegistrySpec.groovy    |   98 ++
 .../gorm/validation/jakarta/MethodKeySpec.groovy   |   58 +
 .../listener/ValidationEventListenerSpec.groovy    |  147 +++
 .../support/ValidatorRegistriesSpec.groovy         |   67 ++
 .../jakartafixture/JakartaTestEntity.groovy        |   16 +-
 ...ails.datastore.gorm.services.ServiceImplementer |    1 +
 ...tastore.gorm.services.ServiceImplementerAdapter |    2 +
 .../mapping/config/ConfigurationBuilder.groovy     |  250 +++-
 .../CustomizableRollbackTransactionAttribute.java  |   59 +-
 .../mapping/config/ConfigurationBuilderSpec.groovy |  567 ++++++++++
 ...omizableRollbackTransactionAttributeSpec.groovy |  294 +++++
 grails-doc/src/en/guide/security/codecs.adoc       |    6 +
 .../en/guide/security/securingAgainstAttacks.adoc  |    9 +
 grails-fields/build.gradle                         |    7 +-
 .../formfields/DefaultFieldTemplateSpec.groovy     |  104 +-
 .../plugin/geb/GebRecordingTestListenerSpec.groovy |   80 ++
 .../plugin/geb/WebDriverContainerHolderSpec.groovy |  200 ++++
 .../plugin/geb/GebRecordingTestListener.groovy     |   14 +
 .../plugin/geb/WebDriverContainerHolder.groovy     |   52 +-
 .../org/demo/spock/PerTestRecordingSpec.groovy     |   54 +-
 .../services/gorm/TransactionTestService.groovy    |   16 +
 .../groovy/gorm/TransactionPropagationSpec.groovy  |    8 +
 .../services/gorm/TransactionTestService.groovy    |   16 +
 .../groovy/gorm/TransactionPropagationSpec.groovy  |    8 +
 .../grails/web/servlet/mvc/GrailsHttpSession.java  |  141 ++-
 .../web/servlet/mvc/GrailsHttpSessionSpec.groovy   |   24 +
 .../web/errors/GrailsExceptionResolverSpec.groovy  |    7 +-
 .../src/test/resources/logback-test.xml            |    0
 202 files changed, 16291 insertions(+), 903 deletions(-)
 delete mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/MongoSchemaSpec.groovy.disabled
 copy grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/{fetcher/interceptor/MutationInterceptorInvokerSpec.groovy => binding/DataBinderNotFoundExceptionSpec.groovy} (55%)
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/entity/EntityFetchOptionsSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/entity/arguments/SimpleArgumentSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/entity/dsl/helpers/ComplexTypedSpec.groovy
 copy grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/{interceptor/MutationInterceptorInvokerSpec.groovy => DataFetcherNotFoundExceptionSpec.groovy} (52%)
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/impl/ClosureDataFetchingEnvironmentSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/impl/CountEntityDataFetcherSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/impl/PaginatedEntityDataFetcherSpec.groovy
 copy grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/impl/{ClosureDataFetcherSpec.groovy => PersistentPropertyDataFetcherSpec.groovy} (54%)
 copy grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/interceptor/{MutationInterceptorInvokerSpec.groovy => CustomMutationInterceptorInvokerSpec.groovy} (95%)
 copy grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/jdbc/PropertyOrigin.java => grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/fetcher/interceptor/CustomQueryInterceptorInvokerSpec.groovy (57%)
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/response/CachingGraphQLResponseHandlerSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/KeyClassQuerySpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/CurrencyCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/DateCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/SqlDateCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/TimeCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/TimeZoneCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/TimestampCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/URICoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/URLCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/UUIDCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/InstantCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/LocalDateCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/LocalDateTimeCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/LocalTimeCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/OffsetDateTimeCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/OffsetTimeCoercionSpec.groovy
 create mode 100644 grails-data-graphql/core/src/test/groovy/org/grails/gorm/graphql/types/scalars/coercing/jsr310/ZonedDateTimeCoercionSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/CodecCustomTypeMarshallerSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/CodecExtensionsSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/SimpleCodecsSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/BasicCollectionTypeDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/CustomTypeDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/EmbeddedCollectionDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/EmbeddedDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/IdentityDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/SimpleDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/TemporalTypeDecodersSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/decoders/TenantIdDecoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/BasicCollectionTypeEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/CustomTypeEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/EmbeddedCollectionEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/EmbeddedEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/IdentityEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/SimpleEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/TemporalTypeEncodersSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/codecs/encoders/TenantIdEncoderSpec.groovy
 create mode 100644 grails-data-mongodb/bson/src/test/groovy/org/grails/datastore/bson/json/JsonWriterSpec.groovy
 create mode 100644 grails-data-mongodb/core/src/test/groovy/grails/mongodb/geo/DistanceSpec.groovy
 create mode 100644 grails-data-mongodb/core/src/test/groovy/org/grails/datastore/mapping/mongo/engine/MongoIdCoercionSpec.groovy
 create mode 100644 grails-data-mongodb/embedded/src/test/groovy/org/grails/datastore/gorm/mongodb/embedded/FlapdoodleMongoBackendSpec.groovy
 create mode 100644 grails-data-mongodb/embedded/src/test/groovy/org/grails/datastore/gorm/mongodb/embedded/InMemoryMongoBackendSpec.groovy
 create mode 100644 grails-data-mongodb/ext/src/test/groovy/org/grails/datastore/gorm/mongo/extensions/MongoExtensionsSpec.groovy
 create mode 100644 grails-data-mongodb/grails-plugin/src/test/groovy/grails/plugins/mongodb/MongodbGrailsPluginSpec.groovy
 create mode 100644 grails-data-mongodb/spring-data/src/test/groovy/org/grails/datastore/gorm/mongodb/springdata/GormSharedSessionMongoTransactionManagerSpec.groovy
 create mode 100644 grails-datamapping-async/src/test/groovy/grails/gorm/async/AsyncEntitySpec.groovy
 create mode 100644 grails-datamapping-async/src/test/groovy/org/grails/datastore/gorm/async/AsyncQuerySpec.groovy
 create mode 100644 grails-datamapping-async/src/test/groovy/org/grails/datastore/gorm/async/GormAsyncStaticApiSpec.groovy
 create mode 100644 grails-datamapping-core/src/main/groovy/org/grails/compiler/gorm/LocalTransformationSupport.groovy
 delete mode 100644 grails-datamapping-core/src/main/groovy/org/grails/datastore/gorm/jdbc/OriginCapablePropertyValue.java
 copy grails-codecs-core/src/main/groovy/org/grails/plugins/codecs/MD5CodecExtensionMethods.groovy => grails-datamapping-core/src/test/groovy/com/IgnoredPackageEntity.groovy (67%)
 create mode 100644 grails-datamapping-core/src/test/groovy/grails/gorm/annotation/multitenancy/TenantTransformSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/grails/gorm/transactions/TransactionRollbackRulePropagationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/DatabaseDriverSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/MultiTenantDataSourceSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/RelaxedConversionServiceSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/RelaxedDataBinderSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/RelaxedNamesSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/CachedDataSourceConnectionSourceFactorySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/DataSourceConnectionSourceFactorySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/DataSourceConnectionSourceSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/DataSourceSettingsBuilderSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/DataSourceSettingsSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/jdbc/connections/SpringDataSourceConnectionSourceFactorySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/DetachedCriteriaASTTransformationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryAggregateSubqueryErrorSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryAssociationPathSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryDetachedCriteriaCastSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryEmbeddedPropertyPathSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryFunctionCallSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryMultiLevelAssociationFunctionSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryNegationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryOperatorSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryPropertyAliasSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/query/transform/WhereQueryStaticFieldSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/services/transform/ServiceTransformationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/services/transform/support/AdaptedProbeServiceImplementer.groovy
 copy grails-datamapping-core/src/{main/groovy/org/grails/datastore/gorm/jdbc/PropertyOrigin.java => test/groovy/org/grails/datastore/gorm/services/transform/support/NoOpServiceImplementerAdapter.groovy} (52%)
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/services/transform/support/ProbeServiceImplementer.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/services/transform/support/ProbeServiceImplementerAdapter.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/AbstractGormASTTransformationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/AbstractTraitApplyingGormASTTransformationSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/ApplyNonCompilationUnitAwareTransform.java
 copy grails-datamapping-core/src/{main/groovy/org/grails/datastore/gorm/jdbc/PropertyOrigin.java => test/groovy/org/grails/datastore/gorm/transform/ApplyTestTraitWeaving.java} (51%)
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/ApplyUnloadableGormTransform.java
 copy grails-codecs-core/src/main/groovy/org/grails/plugins/codecs/MD5CodecExtensionMethods.groovy => grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/DoubleGenericTestTrait.groovy (60%)
 rename grails-datamapping-core/src/{main/groovy/org/grails/datastore/gorm/jdbc/PropertyOrigin.java => test/groovy/org/grails/datastore/gorm/transform/NonCompilationUnitAwareTestTransformation.groovy} (50%)
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/OrderedGormTransformationSpec.groovy
 copy grails-codecs-core/src/main/groovy/org/grails/plugins/codecs/MD5CodecExtensionMethods.groovy => grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/SingleGenericTestTrait.groovy (67%)
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/TestTraitWeavingTransformation.groovy
 copy grails-codecs-core/src/main/groovy/org/grails/plugins/codecs/MD5CodecExtensionMethods.groovy => grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/transform/TestWeavableTrait.groovy (67%)
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/utils/ReflectionUtilsSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/constraints/MappingContextAwareConstraintFactorySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/jakarta/ConfigurableParameterNameProviderSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/jakarta/ConstraintViolationUtilsSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/jakarta/GormValidatorFactoryAdapterSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/jakarta/JakartaValidatorRegistrySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/jakarta/MethodKeySpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/listener/ValidationEventListenerSpec.groovy
 create mode 100644 grails-datamapping-core/src/test/groovy/org/grails/datastore/gorm/validation/registry/support/ValidatorRegistriesSpec.groovy
 copy grails-codecs-core/src/main/groovy/org/grails/plugins/codecs/MD5CodecExtensionMethods.groovy => grails-datamapping-core/src/test/groovy/org/grails/datastore/jakartafixture/JakartaTestEntity.groovy (67%)
 create mode 100644 grails-datamapping-core/src/test/resources/META-INF/services/org.grails.datastore.gorm.services.ServiceImplementer
 create mode 100644 grails-datamapping-core/src/test/resources/META-INF/services/org.grails.datastore.gorm.services.ServiceImplementerAdapter
 create mode 100644 grails-datastore-core/src/test/groovy/org/grails/datastore/mapping/transactions/CustomizableRollbackTransactionAttributeSpec.groovy
 create mode 100644 grails-geb/src/test/groovy/grails/plugin/geb/GebRecordingTestListenerSpec.groovy
 create mode 100644 grails-geb/src/test/groovy/grails/plugin/geb/WebDriverContainerHolderSpec.groovy
 copy {grails-core => grails-web-mvc}/src/test/resources/logback-test.xml (100%)


(grails-core) 01/03: Upgrade Groovy to 6.0.0

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch deps/groovy-6.0.0
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit d1cbf7fd0a822dd4791cc5869d4af594705e210a
Author: Mattias Reichel <ma...@gmail.com>
AuthorDate: Wed Sep 23 22:57:03 2026 +0200

    Upgrade Groovy to 6.0.0
    
    Groovy 6 ships the classic (non-invokedynamic) call-site runtime as the
    separate groovy-callsite module, and its compiler refuses to generate that
    bytecode without it on the compile classpath. Grails 8 compiles with indy
    off, so grails-common exports the module and the root build adds it to
    every source set of the modules below grails-common.
    
    Spock has no groovy-6.0 build, and 2.4-groovy-5.0 checks the Groovy major
    both in its compiler AST transform and when a Spec starts. The opt-out
    system property is set on the forked Groovy compiler and Test tasks by
    CompilePlugin, on groovydoc runs, in the end-to-end build, and for
    applications by the Grails Gradle plugin on GroovyCompile, Test and the
    forked view compiler. A build that sets its own value keeps it.
    
    Groovy 6 moves groovysh to JLine 4, so jline.version follows and the
    SBOM plugin corrects the JLine 4 licence metadata by pattern.
    
    Source changes for Groovy 6.0.0: parameterized types and type variables
    are no longer class literals; `!x instanceof T` is rejected (it was always
    false); a statically compiled map-style constructor call needs an
    explicit @MapConstructor; @Delegate generates over declared overrides
    (config write filtering, dirty-checking reversed views) and no longer
    satisfies the abstract-method check for the JSON view helper's render
    overloads; the stub generator writes a precompiled trait's static
    methods as `static abstract`; and generic trait methods are specialized
    on the implementing class. Each workaround is commented with its
    trigger, failure, deletion condition and impact class as catalogued in
    issue #16157 on the 9.0.x line.
    
    The upgrade guide gains a Groovy 6 section covering the call-site module,
    the Spock opt-out, JLine 4 and the application-source changes.
---
 .agents/skills/gradle-developer/SKILL.md           |  8 ++--
 .agents/skills/grails-developer/SKILL.md           |  4 +-
 .agents/skills/groovy-developer/SKILL.md           |  6 +--
 AGENTS.md                                          |  6 +--
 .../apache/grails/buildsrc/CompilePlugin.groovy    | 27 +++++++++---
 .../apache/grails/buildsrc/GroovydocRunner.groovy  |  4 ++
 .../org/apache/grails/buildsrc/SbomPlugin.groovy   | 33 +++++++-------
 .../grails/buildsrc/CompilePluginSpec.groovy       | 11 +++++
 .../apache/grails/buildsrc/SbomPluginSpec.groovy   | 28 ++++++++++++
 build.gradle                                       | 17 ++++++++
 dependencies.gradle                                | 12 ++++-
 end-to-end/README.md                               |  4 +-
 end-to-end/build.gradle                            | 11 +++++
 end-to-end/legacy-g7-command-plugin/build.gradle   |  2 +-
 end-to-end/settings.gradle                         |  2 +-
 gradle/mongodb-forked-test-config.gradle           |  4 +-
 gradle/mongodb-test-config.gradle                  |  4 +-
 grails-common/build.gradle                         |  7 +++
 .../main/groovy/grails/boot/GrailsBanner.groovy    |  3 +-
 .../config/external/WriterFilteringMap.groovy      |  5 ++-
 .../orm/hibernate/HibernateGormInstanceApi.groovy  |  4 +-
 .../hibernate/HibernateGormInstanceApiSpec.groovy  | 19 ++++++++
 .../compiler/gorm/GormEntityTransformSpec.groovy   | 22 +++++++++-
 .../dirty/checking/DirtyCheckingList.groovy        |  5 ++-
 .../dirty/checking/DirtyCheckingSortedSet.groovy   |  3 +-
 .../src/en/guide/upgrading/upgrading80x.adoc       | 51 +++++++++++++++++++++-
 .../formfields/BeanPropertyAccessorImpl.groovy     |  6 +++
 .../formfields/BeanPropertyAccessorImplSpec.groovy | 51 ++++++++++++++++++++++
 .../gradle/plugin/core/GrailsGradlePlugin.groovy   | 17 ++++++++
 .../views/AbstractGroovyTemplateCompileTask.groovy | 11 +++++
 .../core/GrailsGradlePluginToolchainSpec.groovy    |  9 ++++
 .../fork-settings-defaults/build.gradle            | 19 ++++++++
 .../Sitemesh3RenderViewMutatorSpec.groovy          |  2 +-
 .../oauth2/SpringSecurityOauth2BaseService.groovy  |  3 +-
 .../testing/ParameterizedGrailsUnitTest.groovy     |  3 +-
 .../mongo/StartMongoGrailsUnitExtension.groovy     |  3 +-
 .../grails/validation/ValidateableTraitSpec.groovy | 13 ++++++
 .../json/view/api/GrailsJsonViewHelper.groovy      | 26 ++++++++---
 .../json/view/api/internal/TemplateRenderer.groovy | 35 +++++++++++++++
 .../plugin/json/view/TemplateRendererSpec.groovy   | 23 ++++++++++
 40 files changed, 466 insertions(+), 57 deletions(-)

diff --git a/.agents/skills/gradle-developer/SKILL.md b/.agents/skills/gradle-developer/SKILL.md
index 98a092170c..2c7196f5d4 100644
--- a/.agents/skills/gradle-developer/SKILL.md
+++ b/.agents/skills/gradle-developer/SKILL.md
@@ -138,10 +138,10 @@ Presence-based flags (property **present**, value optional) match `skipFunctiona
 
 Current line: **Gradle 9.7.1** (`distributionUrl` + `gradleToolingApiVersion=9.7.1`). Upstream may already ship a newer 9.7.x patch - this repo rides close to latest **only after** a deliberate multi-location bump PR. Do not "helpfully" jump one wrapper ahead of the rest.
 
-**Two Groovy stacks:** Gradle itself embeds **Groovy 4** for build logic. Application/runtime code on 8.0.x is **Groovy 5**. That is why `dependencies.gradle` keeps separate maps:
+**Two Groovy stacks:** Gradle itself embeds **Groovy 4** for build logic. Application/runtime code on 8.0.x is **Groovy 6**. That is why `dependencies.gradle` keeps separate maps:
 
 - `gradleBomDependencyVersions` / `gradle-groovy.version` / `gradle-spock.version` → build tooling (Groovy 4 / Spock groovy-4)
-- `bomDependencyVersions` / `groovy.version` / `spock.version` → apps and framework modules (Groovy 5 / Spock groovy-5.0)
+- `bomDependencyVersions` / `groovy.version` / `spock.version` → apps and framework modules (Groovy 6 / Spock groovy-5.0, which runs on Groovy 6 with its version check switched off until Spock ships a groovy-6.0 build)
 
 Never unify those casually.
 
@@ -293,7 +293,7 @@ For POM property generation, **map key must be the dependency name prefix**:
 
 ```groovy
 bomDependencyVersions = [
-    'groovy.version': '5.1.3',
+    'groovy.version': '6.0.0',
 ]
 bomDependencies = [
     'groovy': "org.apache.groovy:groovy:${bomDependencyVersions['groovy.version']}",
@@ -596,7 +596,7 @@ Develocity: `https://develocity.apache.org` - build scans publish when authentic
 | `includeBuild` the root into `end-to-end` | Publish to `build/local-maven` via `publishAllPublicationsToTestCaseMavenRepoRepository` |
 | Use `publishAllToMavenLocal` to feed end-to-end | That fills `~/.m2`; end-to-end reads `<repo>/build/local-maven` |
 | Bump `legacy-g7-command-plugin` wrapper to Gradle 9 | Leave it on the Grails 7-pinned Gradle 8.x |
-| Mix Gradle-embedded Groovy 4 pins into app Groovy 5 BOM | Keep `gradleBom*` vs `bom*` maps separate |
+| Mix Gradle-embedded Groovy 4 pins into app Groovy 6 BOM | Keep `gradleBom*` vs `bom*` maps separate |
 
 ---
 
diff --git a/.agents/skills/grails-developer/SKILL.md b/.agents/skills/grails-developer/SKILL.md
index 8e83754866..ddc980310b 100644
--- a/.agents/skills/grails-developer/SKILL.md
+++ b/.agents/skills/grails-developer/SKILL.md
@@ -33,7 +33,7 @@ Activate this skill when developing with current Grails, including:
 Current Grails is built on:
 - **Spring Boot**: 4.1.x
 - **Spring Framework**: 7.0.x
-- **Groovy**: 5.1.x
+- **Groovy**: 6.0.x
 - **Gradle**: 9.6.x
 - **Spock**: 2.4-groovy-5.0
 - **Jakarta EE**: 10 (migrated from javax.*)
@@ -865,6 +865,6 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
 - **Grails User Guide**: https://grails.apache.org/docs/latest/guide/single.html
 - **GORM Documentation**: https://grails.apache.org/docs/latest/grails-data/
 - **Grails Plugins**: https://grails.apache.org/plugins.html
-- **Groovy 5 Documentation**: https://groovy-lang.org/documentation.html#all-versions (select latest 5.1.x)
+- **Groovy 6 Documentation**: https://groovy-lang.org/documentation.html#all-versions (select latest 6.0.x)
 - **Spock Framework**: https://spockframework.org/spock/docs/2.4/all_in_one.html
 - **Geb Manual**: https://groovy.apache.org/geb/manual/current/
diff --git a/.agents/skills/groovy-developer/SKILL.md b/.agents/skills/groovy-developer/SKILL.md
index 2b370502be..2af957fa56 100644
--- a/.agents/skills/groovy-developer/SKILL.md
+++ b/.agents/skills/groovy-developer/SKILL.md
@@ -1,6 +1,6 @@
 ---
 name: groovy-developer
-description: Expert guide for Groovy 5 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 21 and Grails
+description: Expert guide for Groovy 6 development, covering concise syntax, closures, DSLs, metaprogramming, static compilation, and integration with Java 21 and Grails
 license: Apache-2.0
 ---
 <!--
@@ -11,7 +11,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
 
 ## What I Do
 
-- Provide deep expertise in Groovy 5.1, including core language features: syntax, closures, traits, GStrings, operators, and Groovy Truth.
+- Provide deep expertise in Groovy 6.0, including core language features: syntax, closures, traits, GStrings, operators, and Groovy Truth.
 - Guide metaprogramming techniques: runtime (categories, ExpandoMetaClass, extension modules) and compile-time (AST transformations like @Immutable, @Builder, @Delegate, @Singleton, @Log, @Memoized).
 - Assist with DSL creation and usage (MarkupBuilder, JsonBuilder, builders for configuration).
 - Support testing with Spock Framework (BDD, data-driven tests, mocking) and built-in power assertions.
@@ -509,7 +509,7 @@ sql.execute("INSERT INTO books (title) VALUES ($title)")
 
 ## Resources
 
-- **Groovy 5 Documentation**: https://groovy-lang.org/documentation.html#all-versions (select latest 5.1.x)
+- **Groovy 6 Documentation**: https://groovy-lang.org/documentation.html#all-versions (select latest 6.0.x)
 - **Groovy Style Guide**: https://groovy-lang.org/style-guide.html
 - **GORM Documentation**: https://grails.apache.org/docs/latest/grails-data/
 - **Spock Framework**: https://spockframework.org/spock/docs/2.4/all_in_one.html
diff --git a/AGENTS.md b/AGENTS.md
index 6c7eaabb4e..12abde794e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -74,7 +74,7 @@ export GRADLE_OPTS="-Dorg.gradle.jvmargs=-Xmx4G"
 | Skill | Path | Use For |
 |-------|------|---------|
 | **grails-developer** | `.agents/skills/grails-developer/SKILL.md` | Current Grails apps, GORM, controllers, views |
-| **groovy-developer** | `.agents/skills/groovy-developer/SKILL.md` | Groovy 5 syntax, closures, DSLs, Spock |
+| **groovy-developer** | `.agents/skills/groovy-developer/SKILL.md` | Groovy 6 syntax, closures, DSLs, Spock |
 | **gradle-developer** | `.agents/skills/gradle-developer/SKILL.md` | Gradle 9 builds, BOM/platforms, convention plugins, wrappers |
 | **grails-8-upgrade** | `.agents/skills/grails-8-upgrade/SKILL.md` | Upgrading Grails applications from 7.x to 8 |
 | **java-developer** | `.agents/skills/java-developer/SKILL.md` | Java 21 features, Groovy interop |
@@ -88,7 +88,7 @@ export GRADLE_OPTS="-Dorg.gradle.jvmargs=-Xmx4G"
 | Component | Version |
 |-----------|---------|
 | JDK | 21+ (baseline 21) |
-| Groovy | 5.1.x |
+| Groovy | 6.0.x |
 | Spring Boot | 4.1.x |
 | Spring Framework | 7.0.x |
 | Spock | 2.4-groovy-5.0 |
@@ -309,7 +309,7 @@ and known non-findings — before reporting issues.
 ## Resources
 
 - **Grails Guide**: https://grails.apache.org/docs/latest/guide/single.html
-- **Groovy 5 Docs**: https://groovy-lang.org/documentation.html#all-versions (select latest 5.1.x)
+- **Groovy 6 Docs**: https://groovy-lang.org/documentation.html#all-versions (select latest 6.0.x)
 - **Spock 2.4 Docs**: https://spockframework.org/spock/docs/2.4/all_in_one.html
 - **GORM Docs**: https://grails.apache.org/docs/latest/grails-data/
 - **Issues**: https://github.com/apache/grails-core/issues
diff --git a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
index 935185516f..c61250d830 100644
--- a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
+++ b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
@@ -34,6 +34,7 @@ import org.gradle.api.tasks.bundling.Jar
 import org.gradle.api.tasks.compile.GroovyCompile
 import org.gradle.api.tasks.compile.JavaCompile
 import org.gradle.api.tasks.javadoc.Javadoc
+import org.gradle.api.tasks.testing.Test
 import org.gradle.external.javadoc.StandardJavadocDocletOptions
 
 import static org.apache.grails.buildsrc.GradleUtils.lookupProperty
@@ -118,11 +119,13 @@ class CompilePlugin implements Plugin<Project> {
                 if (!it.options.compilerArgs.contains('-parameters')) {
                     it.options.compilerArgs.add('-parameters')
                 }
-                // Grails 8 keeps invokedynamic off for published artifacts. Groovy 5's
-                // compiler default is indy=true, which is a large runtime regression for
-                // dynamic Groovy (see #15293). Unpublished build-logic uses Gradle's
-                // default. Grails 9 / Groovy 6 can flip this. CI can still opt in with
-                // -PgrailsIndy=true (same property as grails-extension-gradle-config.gradle).
+                // Grails 8 keeps invokedynamic off for published artifacts. The Groovy
+                // compiler default is indy=true, which was a large runtime regression for
+                // dynamic Groovy on Groovy 5 (see #15293). Unpublished build-logic uses
+                // Gradle's default. On Groovy 6 classes compiled this way need the
+                // groovy-callsite module at runtime, which grails-common carries. CI can
+                // still opt in with -PgrailsIndy=true (same property as
+                // grails-extension-gradle-config.gradle).
                 it.groovyOptions.optimizationOptions.put('indy', lookupProperty(project, 'grailsIndy', false))
                 // encoding needs to be the same since it's different across platforms
                 it.options.encoding = StandardCharsets.UTF_8.name()
@@ -130,6 +133,13 @@ class CompilePlugin implements Plugin<Project> {
                 // always set an isolated build to ensure grails.factories aren't accidentally merged since every project
                 // in this mono repo should be an isolated projected
                 it.options.forkOptions.jvmArgs = ['-Xms128M', '-Xmx2G', '-Dgrails.isolated.build=true']
+                // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): Spock's global AST transform is on
+                // every compile classpath that carries spock-core and checks the Groovy major
+                // version inside the forked compiler, failing with IncompatibleGroovyVersionException.
+                // Remove when the BOM moves to a Spock build for Groovy 6. App test build: an
+                // application's build gets the same flag from the Grails Gradle plugin.
+                it.groovyOptions.forkOptions.jvmArgs = (it.groovyOptions.forkOptions.jvmArgs ?: []) +
+                        ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
                 // Publish THIS project's base.dir to the forked Groovy compiler. Gradle reuses a forked
                 // compiler daemon for a task whose requested fork arguments the daemon already satisfies,
                 // so a compile that does NOT request base.dir can be handed a daemon started for another
@@ -150,6 +160,13 @@ class CompilePlugin implements Plugin<Project> {
                 it.groovyOptions.configurationScript =
                         GradleUtils.findRootGrailsCoreDir(project).file('gradle/groovy-compile-configscript.groovy').asFile
             }
+            project.tasks.withType(Test).configureEach {
+                // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): the same check runs when a Spec
+                // starts, and again whenever a test compiles Groovy at runtime with spock-core on
+                // the classpath. A system property survives a later `jvmArgs = [...]` assignment.
+                // Remove with the compiler flag above.
+                it.systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')
+            }
             project.tasks.named('compileGroovy', GroovyCompile).configure { GroovyCompile task ->
                 // Resource-only changes do not ordinarily invalidate compilation. This file changes
                 // whether the compiler owns the generated imports resource, so adding or deleting it
diff --git a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GroovydocRunner.groovy b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GroovydocRunner.groovy
index 2f8d9da047..1918b69315 100644
--- a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GroovydocRunner.groovy
+++ b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GroovydocRunner.groovy
@@ -83,6 +83,10 @@ abstract class GroovydocRunner {
             spec.classpath = classpath
             spec.mainClass.set('groovy.ui.GroovyMain')
             spec.args = [scriptFile.absolutePath, paramsFile.absolutePath]
+            // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): the documentation classpath can carry
+            // spock-core, whose global AST transform refuses to load on Groovy 6 without this.
+            // Remove when the BOM moves to a Spock build for Groovy 6. Framework only.
+            spec.systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')
             spec.maxHeapSize = maxHeapSize
         }
     }
diff --git a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
index 9bbeca3087..2bb7e9ab98 100644
--- a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
+++ b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/SbomPlugin.groovy
@@ -113,20 +113,9 @@ class SbomPlugin implements Plugin<Project> {
             'pkg:maven/de.bwaldvogel/mongo-java-server@1.47.0?type=jar'       : 'BSD-3-Clause',
             'pkg:maven/de.bwaldvogel/mongo-java-server-core@1.47.0?type=jar'  : 'BSD-3-Clause',
             'pkg:maven/de.bwaldvogel/mongo-java-server-memory-backend@1.47.0?type=jar': 'BSD-3-Clause',
-            // The whole org.jline group declares "The BSD License", which maps incorrectly because of
+            // The org.jline group is handled by forcedLicenseFor below: every artifact of it declares
+            // "The BSD License", which maps incorrectly because of
             // https://github.com/CycloneDX/cyclonedx-core-java/issues/205 - the POMs point at BSD-3-Clause.
-            // jline.version tracks the JLine version Groovy ships, so every module resolves to one version.
-            'pkg:maven/org.jline/jansi@3.30.16?type=jar'                       : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline@3.30.16?type=jar'                       : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-builtins@3.30.16?type=jar'              : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-console@3.30.16?type=jar'               : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-native@3.30.16?type=jar'                : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-reader@3.30.16?type=jar'                : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-style@3.30.16?type=jar'                 : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-terminal@3.30.16?type=jar'              : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-terminal-jansi@3.30.16?type=jar'        : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-terminal-jna@3.30.16?type=jar'          : 'BSD-3-Clause',
-            'pkg:maven/org.jline/jline-terminal-jni@3.30.16?type=jar'          : 'BSD-3-Clause',
             'pkg:maven/org.jruby/jzlib@1.1.5?type=jar'                        : 'BSD-3-Clause', // https://web.archive.org/web/20240822213507/http://www.jcraft.com/jzlib/LICENSE.txt shows it's a 3 clause
             'pkg:maven/org.liquibase.ext/liquibase-hibernate5@4.27.0?type=jar': 'Apache-2.0', // maps incorrectly because of https://github.com/liquibase/liquibase/issues/2445 & the base pom does not define a license
             'pkg:maven/org.json/json@20251224?type=jar'                       : 'Public-Domain', // required due to jedis, https://issues.apache.org/jira/browse/LEGAL-666 approves this usage
@@ -453,6 +442,20 @@ class SbomPlugin implements Plugin<Project> {
         }
     }
 
+    private static String forcedLicenseFor(String bomRef) {
+        if (LICENSE_MAPPING.containsKey(bomRef)) {
+            return LICENSE_MAPPING[bomRef]
+        }
+        // Groovy 6 ships on JLine 4 (#16157), and jline.version follows it. JLine's LICENSE.txt is
+        // BSD-3-Clause, but CycloneDX reads "The BSD License" as BSD-4-Clause
+        // (cyclonedx-core-java#205). Limited to the org.jline Maven jar family at 4.x so a bump
+        // inside that line needs no new entry. Framework only.
+        if (bomRef.matches('pkg:maven/org\\.jline/[^/@?]+@4\\.[^?]+\\?type=jar')) {
+            return 'BSD-3-Clause'
+        }
+        null
+    }
+
     /**
      * Picks the most appropriate license for a dependency from a list of license choices.
      * This method is called at execution time and should not access Task.project.
@@ -471,10 +474,10 @@ class SbomPlugin implements Plugin<Project> {
         }
 
         logger.info('Picking license for {} from {} choices', bomRef, licenseChoices.size())
-        if (LICENSE_MAPPING.containsKey(bomRef)) {
+        def licenseId = forcedLicenseFor(bomRef)
+        if (licenseId) {
             // There are several reasons that cyclone will get the license wrong, usually due to upstream not publishing information or publishing it incorrectly
             // see the licenseMapping map above for details
-            def licenseId = LICENSE_MAPPING[bomRef]
             logger.info('Forcing license for {} to {}', bomRef, licenseId)
 
             def licenseBlock = LICENSES[licenseId]
diff --git a/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/CompilePluginSpec.groovy b/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/CompilePluginSpec.groovy
index 83721b2219..1238fd1a13 100644
--- a/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/CompilePluginSpec.groovy
+++ b/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/CompilePluginSpec.groovy
@@ -83,6 +83,8 @@ class CompilePluginSpec extends Specification {
                     println "TEST_INDY=\${testCompileTask.get().groovyOptions.optimizationOptions.indy}"
                     println "MAIN_JOINT_JAVAC_ARGS=\${compileTask.get().options.compilerArgs}"
                     println "MAIN_GROOVY_PARAMETERS=\${compileTask.get().groovyOptions.parameters}"
+                    println "MAIN_GROOVY_FORK_JVM_ARGS=\${compileTask.get().groovyOptions.forkOptions.jvmArgs}"
+                    println "TEST_GROOVY_FORK_JVM_ARGS=\${testCompileTask.get().groovyOptions.forkOptions.jvmArgs}"
                 }
             }
         """
@@ -107,6 +109,15 @@ class CompilePluginSpec extends Specification {
         result.output.contains('MAIN_JOINT_JAVAC_ARGS=[-parameters]')
     }
 
+    def "switches off the Spock Groovy version check in the forked Groovy compiler"() {
+        when:
+        def result = runPrintIndy()
+
+        then:
+        result.output.contains('MAIN_GROOVY_FORK_JVM_ARGS=[-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true]')
+        result.output.contains('TEST_GROOVY_FORK_JVM_ARGS=[-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true]')
+    }
+
     def "enables invokedynamic when grailsIndy is true"() {
         when:
         def result = runPrintIndy('-PgrailsIndy=true')
diff --git a/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/SbomPluginSpec.groovy b/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/SbomPluginSpec.groovy
index 4786a254a9..3d4fe29f9f 100644
--- a/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/SbomPluginSpec.groovy
+++ b/build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/SbomPluginSpec.groovy
@@ -81,6 +81,34 @@ class SbomPluginSpec extends Specification {
         location.get().asFile.name == 'grails-core-custom-cli-8.0.0-sbom.json'
     }
 
+    private static List bsd4Choice() {
+        [[license: [id: 'BSD-4-Clause']]]
+    }
+
+    void "JLine 4 Maven jars use the BSD-3-Clause correction for any version of that line"() {
+        expect:
+        SbomPlugin.pickLicense(LOGGER, 'grails-console', 'grails-console',
+                'pkg:maven/org.jline/jansi@4.4.5?type=jar', bsd4Choice()).id == 'BSD-3-Clause'
+        SbomPlugin.pickLicense(LOGGER, 'grails-console', 'grails-console',
+                'pkg:maven/org.jline/jline-console-ui@4.5.0?type=jar', bsd4Choice()).id == 'BSD-3-Clause'
+    }
+
+    void "the JLine 4 license correction is limited to JLine 4 Maven jars"() {
+        when:
+        SbomPlugin.pickLicense(LOGGER, 'grails-console', 'grails-console', bomRef, bsd4Choice())
+
+        then:
+        GradleException e = thrown(GradleException)
+        e.message.contains('BSD-4-Clause')
+
+        where:
+        bomRef << [
+                'pkg:maven/com.example/jansi@4.4.5?type=jar',
+                'pkg:maven/org.jline/jansi@3.30.16?type=jar',
+                'pkg:maven/org.jline/jansi@4.4.5?type=pom',
+        ]
+    }
+
     void "a category-X license is permitted when exempted for the sbom component (cli companion)"() {
         expect: "the hibernate 5 LGPL exemption keyed to the dbmigration cli companion is honoured"
         SbomPlugin.pickLicense(LOGGER, 'grails-data-hibernate5-dbmigration',
diff --git a/build.gradle b/build.gradle
index 61f25361f5..247df0213d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -31,6 +31,8 @@ import javax.inject.Inject
 
 import org.apache.tools.ant.taskdefs.condition.Os
 
+apply from: layout.projectDirectory.file('dependencies.gradle')
+
 ext {
     isReproducibleBuild = System.getenv("SOURCE_DATE_EPOCH") != null
     buildInstant = java.util.Optional.ofNullable(System.getenv("SOURCE_DATE_EPOCH"))
@@ -139,6 +141,21 @@ subprojects {
         rootProject.ext['profileProjects'] << name
     }
 
+    // Groovy 6 (#16157, GROOVY-12185): the classic (non-invokedynamic) call-site runtime is the
+    // separate groovy-callsite module, and the compiler refuses to generate that bytecode without it
+    // on the compile classpath ("Classic call-site bytecode generation requires the optional
+    // org.apache.groovy:groovy-callsite module"). Every module compiles with indy off (CompilePlugin),
+    // and the ones below grails-common, which exports the module for everything above it, have no
+    // other way to get it. Permanent while indy stays off. Framework only: applications get it
+    // through grails-common.
+    plugins.withId('groovy') {
+        String groovyCallsite = "org.apache.groovy:groovy-callsite:${bomDependencyVersions['groovy.version']}"
+        sourceSets.configureEach { sourceSet ->
+            dependencies.add(sourceSet.compileOnlyConfigurationName, groovyCallsite)
+            dependencies.add(sourceSet.runtimeOnlyConfigurationName, groovyCallsite)
+        }
+    }
+
     configurations.configureEach {
         resolutionStrategy {
             def cacheHours = isCiBuild || isReproducibleBuild ? 0 : 24
diff --git a/dependencies.gradle b/dependencies.gradle
index 1e8e823280..6ebfeeec15 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -35,7 +35,7 @@ ext {
             'javaparser-core.version'       : '3.28.2',
             // Tracks the JLine version Groovy ships (groovy-groovysh), so the framework and groovysh
             // share one terminal stack - keep in step with groovy.version.
-            'jline.version'                 : '3.30.16',
+            'jline.version'                 : '4.4.5',
             'jna.version'                   : '5.19.1',
             'jquery.version'                : '4.0.0',
             'maven-model.version'           : '3.9.16',
@@ -85,7 +85,7 @@ ext {
             // extended-scalars compatibility. See https://github.com/apache/grails-core/issues/15674
             'graphql-java.version'          : '25.0',
             'graphql-java-extended-scalars.version': '24.0',
-            'groovy.version'                : '5.1.3',
+            'groovy.version'                : '6.0.0',
             'guava.version'                 : '33.7.1-jre',
             // Groovy YAML 5.1.0 requires a minimum of Jackson 2.22.1, and 2.22.2 also overrides the
             // 2.21.5 Spring Boot 4.1 manages: it adds the StreamReadConstraints length limit to
@@ -124,6 +124,11 @@ ext {
             'rxjava2.version'               : '2.2.21',
             'sitemesh.version'              : '2.6.0',
             'scribejava.version'            : '8.3.3',
+            // Groovy 6 (#16157): Spock has no groovy-6.0 build. The groovy-5.0 build runs on Groovy 6
+            // once its Groovy major-version check is switched off with the
+            // spock.iKnowWhatImDoing.disableGroovyVersionCheck system property, which CompilePlugin sets
+            // on every compile and test JVM here and the Grails Gradle plugin sets for applications.
+            // Move to the Groovy 6 build and drop the property when Spock publishes one. App test build.
             'spock.version'                 : '2.4-groovy-5.0',
             'starter-sitemesh.version'      : '3.3.0-RC1',
             'spring-webmvc-sitemesh.version': '3.3.0-RC1',
@@ -160,6 +165,9 @@ ext {
             'groovy'                   : "org.apache.groovy:groovy:${bomDependencyVersions['groovy.version']}",
             'groovy-ant'               : "org.apache.groovy:groovy-ant:${bomDependencyVersions['groovy.version']}",
             'groovy-astbuilder'        : "org.apache.groovy:groovy-astbuilder:${bomDependencyVersions['groovy.version']}",
+            // Groovy 6 (#16157, GROOVY-12185): the classic (non-invokedynamic) call-site runtime is a
+            // separate module. Grails compiles with indy off, so grails-common exports it. Permanent.
+            'groovy-callsite'          : "org.apache.groovy:groovy-callsite:${bomDependencyVersions['groovy.version']}",
             'groovy-cli-commons'       : "org.apache.groovy:groovy-cli-commons:${bomDependencyVersions['groovy.version']}",
             'groovy-cli-picocli'       : "org.apache.groovy:groovy-cli-picocli:${bomDependencyVersions['groovy.version']}",
             'groovy-console'           : "org.apache.groovy:groovy-console:${bomDependencyVersions['groovy.version']}",
diff --git a/end-to-end/README.md b/end-to-end/README.md
index 7d2dc6cfb6..35e55797fe 100644
--- a/end-to-end/README.md
+++ b/end-to-end/README.md
@@ -33,13 +33,13 @@ applications at via `GRAILS_REPO_URL`.
 | Project | What it is |
 |---|---|
 | `legacy-g7-command-plugin` | A **standalone build**, not part of this one. Compiles against published Grails 7 / Groovy 4 to produce a genuine precompiled `grails.dev.commands.ApplicationCommand` binary. |
-| `legacy-commands-plugin` | A Grails 8 plugin whose legacy commands are recompiled under Groovy 5. |
+| `legacy-commands-plugin` | A Grails 8 plugin whose legacy commands are recompiled under Groovy 6. |
 | `legacy-commands` | A Grails 8 application that consumes both and runs their commands through the registry. |
 | `spring-dependency-management` | A Grails 8 application that manages its versions with the legacy `io.spring.dependency-management` plugin instead of the Grails Gradle plugin's native `platform(grails-bom)`, as an upgraded Grails 7 application does. |
 | `taglib-index-incremental` | Builds a Grails 8 application **twice, without a clean**, to prove a renamed or deleted tag library cannot survive in the published tag library index. Incremental behaviour is the whole point, so it cannot be expressed by a project the core build builds once for itself. |
 
 `legacy-g7-command-plugin` is deliberately excluded from `settings.gradle`. An included build would
-substitute `org.apache.grails:grails-core` for this repository's Groovy 5 project, which is exactly
+substitute `org.apache.grails:grails-core` for this repository's Groovy 6 project, which is exactly
 the substitution the fixture exists to avoid — it must be compiled by a real Grails 7 toolchain for
 its trait-woven bytecode to prove anything.
 
diff --git a/end-to-end/build.gradle b/end-to-end/build.gradle
index 236237fd03..b93c75eb8d 100644
--- a/end-to-end/build.gradle
+++ b/end-to-end/build.gradle
@@ -29,6 +29,17 @@ subprojects {
         }
     }
 
+    // Grails 8 compiles against Groovy 6 while Spock ships as 2.4-groovy-5.0 (#16157). The
+    // framework build disables Spock's Groovy version check the same way (see CompilePlugin).
+    // Remove when the BOM moves to a Spock build for Groovy 6.
+    tasks.withType(GroovyCompile).configureEach {
+        groovyOptions.forkOptions.jvmArgs = (groovyOptions.forkOptions.jvmArgs ?: []) +
+                ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
+    }
+    tasks.withType(Test).configureEach {
+        systemProperty 'spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true'
+    }
+
     tasks.withType(AbstractCompile).configureEach {
         doFirst {
             if (!localMavenRepo.asFile.directory) {
diff --git a/end-to-end/legacy-g7-command-plugin/build.gradle b/end-to-end/legacy-g7-command-plugin/build.gradle
index 43981d6547..4168c282a8 100644
--- a/end-to-end/legacy-g7-command-plugin/build.gradle
+++ b/end-to-end/legacy-g7-command-plugin/build.gradle
@@ -22,7 +22,7 @@
 // sources under Grails 8.
 //
 // This is deliberately not part of the end-to-end build and is not composed with includeBuild:
-// substitution would rewrite org.apache.grails:grails-core to this repo's Groovy 5 project, which
+// substitution would rewrite org.apache.grails:grails-core to this repo's Groovy 6 project, which
 // is exactly what the fixture exists to avoid.
 //
 // It builds under the JDK declared in .sdkmanrc (17, the minimum for a Grails 7 app) rather than a
diff --git a/end-to-end/settings.gradle b/end-to-end/settings.gradle
index 428275ad5b..6880097cf7 100644
--- a/end-to-end/settings.gradle
+++ b/end-to-end/settings.gradle
@@ -121,7 +121,7 @@ include(
 
 // legacy-g7-command-plugin is deliberately NOT included here. It compiles against published
 // Grails 7 / Groovy 4 artifacts, and an included build would substitute
-// org.apache.grails:grails-core for this repo's Groovy 5 project - which is exactly the
+// org.apache.grails:grails-core for this repo's Groovy 6 project - which is exactly the
 // substitution the fixture exists to avoid. It stays a standalone build, run under its own JDK
 // (legacy-g7-command-plugin/.sdkmanrc), and legacy-commands consumes the jar it produces.
 
diff --git a/gradle/mongodb-forked-test-config.gradle b/gradle/mongodb-forked-test-config.gradle
index b230f36282..2b13265274 100644
--- a/gradle/mongodb-forked-test-config.gradle
+++ b/gradle/mongodb-forked-test-config.gradle
@@ -25,7 +25,9 @@ dependencies {
 }
 
 tasks.named('compileTestGroovy', GroovyCompile) {
-    groovyOptions.forkOptions.jvmArgs = ['-Xmx768m']
+    // Append rather than assign: CompilePlugin already passes the Spock Groovy version-check
+    // opt-out to this fork (#16157).
+    groovyOptions.forkOptions.jvmArgs = (groovyOptions.forkOptions.jvmArgs ?: []) + ['-Xmx768m']
 }
 
 tasks.withType(Test).configureEach {
diff --git a/gradle/mongodb-test-config.gradle b/gradle/mongodb-test-config.gradle
index 8925cf25de..cc3e3cfe5c 100644
--- a/gradle/mongodb-test-config.gradle
+++ b/gradle/mongodb-test-config.gradle
@@ -25,7 +25,9 @@ dependencies {
 }
 
 tasks.named('compileTestGroovy', GroovyCompile) {
-    groovyOptions.forkOptions.jvmArgs = ['-Xmx768m']
+    // Append rather than assign: CompilePlugin already passes the Spock Groovy version-check
+    // opt-out to this fork (#16157).
+    groovyOptions.forkOptions.jvmArgs = (groovyOptions.forkOptions.jvmArgs ?: []) + ['-Xmx768m']
 }
 
 tasks.withType(Test).configureEach {
diff --git a/grails-common/build.gradle b/grails-common/build.gradle
index 2b8ee5f649..0b2b471853 100644
--- a/grails-common/build.gradle
+++ b/grails-common/build.gradle
@@ -42,6 +42,13 @@ dependencies {
 
     api 'org.apache.grails.gradle:grails-gradle-common'
     api 'org.apache.groovy:groovy'
+    // Groovy 6 (#16157, GROOVY-12185): the classic (non-invokedynamic) call-site runtime is the
+    // separate groovy-callsite module. Grails compiles with indy off by default; without the module
+    // the compiler refuses to generate such bytecode and the classes fail at runtime with
+    // NoClassDefFoundError for CallSiteArray. Exporting it here puts it on the compile and runtime
+    // classpath of every module and application that reaches grails-common, which is everything
+    // that depends on grails-core. Permanent while indy stays off. App runtime.
+    api 'org.apache.groovy:groovy-callsite'
     api 'org.slf4j:jcl-over-slf4j'
     api 'org.slf4j:slf4j-api'
     api 'org.springframework:spring-context', {
diff --git a/grails-core/src/main/groovy/grails/boot/GrailsBanner.groovy b/grails-core/src/main/groovy/grails/boot/GrailsBanner.groovy
index b6bfbbeaa3..28c14c1a5b 100644
--- a/grails-core/src/main/groovy/grails/boot/GrailsBanner.groovy
+++ b/grails-core/src/main/groovy/grails/boot/GrailsBanner.groovy
@@ -511,7 +511,8 @@ class GrailsBanner implements Banner {
 
     /** What an application wrote under the given property, or nothing where it wrote none. */
     private static List<String> readVersionOptions(Environment env, String propertyName) {
-        env.getProperty(propertyName, List<String>, [] as List<String>)
+        // Groovy 6.0.0 (GROOVY-12319, #16157): parameterized types are not class literals. Permanent. App source.
+        env.getProperty(propertyName, List, [] as List<String>) as List<String>
     }
 
     /**
diff --git a/grails-core/src/main/groovy/grails/config/external/WriterFilteringMap.groovy b/grails-core/src/main/groovy/grails/config/external/WriterFilteringMap.groovy
index 9667f67759..5819ea5318 100644
--- a/grails-core/src/main/groovy/grails/config/external/WriterFilteringMap.groovy
+++ b/grails-core/src/main/groovy/grails/config/external/WriterFilteringMap.groovy
@@ -26,7 +26,10 @@ class WriteFilteringMap implements Map<String, Object> {
     String keyPrefix
     private Map<String, Object> proxied // source map
 
-    @Delegate
+    // Groovy 6 (#16157): @Delegate now generates the mutators over the tracking overrides below, so
+    // written values were no longer recorded (WriteFilteringMapSpec). Excluded so the overrides stay.
+    // Remove when @Delegate again leaves declared methods alone. App runtime.
+    @Delegate(excludes = ['put', 'putAll', 'remove'])
     private Map<String, Object> overlap  // written values, flattened -- shared
     private Map<String, Object> nestedDestinationMap // written keys at this level
 
diff --git a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormInstanceApi.groovy b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormInstanceApi.groovy
index 9ffa2b0bdb..6b2acf0445 100644
--- a/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormInstanceApi.groovy
+++ b/grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/HibernateGormInstanceApi.groovy
@@ -524,7 +524,9 @@ class HibernateGormInstanceApi<D> extends GormInstanceApi<D> {
         setObjectToReadOnly target
         if (entity) {
             for (Association association in entity.associations) {
-                if (association instanceof ToOne && !association instanceof Embedded) {
+                // Groovy 6.0.0 (#16157) rejects `!x instanceof T` ("Incompatible instanceof types"),
+                // which parsed as `(!x) instanceof T` and was always false. Permanent. App source.
+                if (association instanceof ToOne && !(association instanceof Embedded)) {
                     def bean = new BeanWrapperImpl(target)
                     def propertyValue = bean.getPropertyValue(association.name)
                     if (propertyValue != null) {
diff --git a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormInstanceApiSpec.groovy b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormInstanceApiSpec.groovy
index d0fd9b01ed..70573d66c6 100644
--- a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormInstanceApiSpec.groovy
+++ b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormInstanceApiSpec.groovy
@@ -369,6 +369,25 @@ class HibernateGormInstanceApiSpec extends HibernateGormDatastoreSpec {
         person.errors.fieldErrors.any { it.field == 'name' }
     }
 
+    @Rollback
+    def "a validation error marks the invalid instance's to-one association read-only"() {
+        given: 'a persisted author and a book that fails validation'
+        def author = new PersonInstanceApi(name: 'Author', age: 40).save(flush: true)
+        def book = new ConstrainedBook(title: '', author: author)
+
+        when:
+        def result = ConstrainedBook.withTransaction {
+            book.save(flush: true)
+        }
+
+        then:
+        result == null
+        book.hasErrors()
+
+        and: 'the author the session still manages cannot be flushed behind the failed save'
+        ConstrainedBook.withSession { it.isReadOnly(author) }
+    }
+
     @Rollback
     def "save with invalid entity and failOnError:true throws an exception"() {
         given:
diff --git a/grails-datamapping-core/src/test/groovy/org/grails/compiler/gorm/GormEntityTransformSpec.groovy b/grails-datamapping-core/src/test/groovy/org/grails/compiler/gorm/GormEntityTransformSpec.groovy
index 3aeac5e308..0f01f808ef 100644
--- a/grails-datamapping-core/src/test/groovy/org/grails/compiler/gorm/GormEntityTransformSpec.groovy
+++ b/grails-datamapping-core/src/test/groovy/org/grails/compiler/gorm/GormEntityTransformSpec.groovy
@@ -229,12 +229,30 @@ class GormEntityTransformSpec extends Specification{
 
         expect: 'all GormEntity methods are marked as Generated on implementation class'
         GormEntity.methods.each { Method traitMethod ->
-            assert Book.getMethod(traitMethod.name, traitMethod.parameterTypes).isAnnotationPresent(Generated)
+            assert findGeneratedMethod(Book, traitMethod).isAnnotationPresent(Generated)
         }
 
         and: 'all GormValidateable methods are marked as Generated on implementation class'
         GormValidateable.methods.each { Method traitMethod ->
-            assert Book.getMethod(traitMethod.name, traitMethod.parameterTypes).isAnnotationPresent(Generated)
+            assert findGeneratedMethod(Book, traitMethod).isAnnotationPresent(Generated)
+        }
+    }
+
+    // Groovy 6 (#16157) specializes a generic trait method's type-variable parameters to the
+    // implementing class, so Book.merge(Object) from GormEntity<D> is Book.merge(Book). Look the
+    // specialized signature up when the erased one is missing. Remove if Groovy restores the erased
+    // signature. Test only.
+    private static Method findGeneratedMethod(Class targetClass, Method traitMethod) {
+        try {
+            return targetClass.getMethod(traitMethod.name, traitMethod.parameterTypes)
+        } catch (NoSuchMethodException e) {
+            Class[] specializedParameterTypes = traitMethod.genericParameterTypes.withIndex().collect { type, index ->
+                type instanceof java.lang.reflect.TypeVariable ? targetClass : traitMethod.parameterTypes[index]
+            } as Class[]
+            if (specializedParameterTypes.toList() != traitMethod.parameterTypes.toList()) {
+                return targetClass.getMethod(traitMethod.name, specializedParameterTypes)
+            }
+            throw e
         }
     }
 
diff --git a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingList.groovy b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingList.groovy
index 5ece3e8e33..d3155c7d9c 100644
--- a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingList.groovy
+++ b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingList.groovy
@@ -32,7 +32,10 @@ import groovy.transform.CompileStatic
 @CompileStatic
 class DirtyCheckingList extends DirtyCheckingCollection implements List {
 
-    @Delegate List target
+    // Groovy 6 (#16157): @Delegate now generates reversed() over the tracking override below, so the
+    // reverse-ordered view came back untracked (DirtyCheckingCollectionSpec). Excluded so the override
+    // stays. Remove when @Delegate again leaves declared methods alone. App runtime.
+    @Delegate(excludes = 'reversed') List target
 
     DirtyCheckingList(List target, DirtyCheckable parent, String property) {
         this(target, parent, property, false)
diff --git a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingSortedSet.groovy b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingSortedSet.groovy
index 6109b0426c..e6c3a8fc77 100644
--- a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingSortedSet.groovy
+++ b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/dirty/checking/DirtyCheckingSortedSet.groovy
@@ -30,7 +30,8 @@ import groovy.transform.CompileStatic
 @CompileStatic
 class DirtyCheckingSortedSet extends DirtyCheckingCollection implements SortedSet {
 
-    @Delegate SortedSet target
+    // See the note on DirtyCheckingList (#16157): reversed() must not be generated over the override.
+    @Delegate(excludes = 'reversed') SortedSet target
 
     DirtyCheckingSortedSet(SortedSet target, DirtyCheckable parent, String property) {
         this(target, parent, property, false)
diff --git a/grails-doc/src/en/guide/upgrading/upgrading80x.adoc b/grails-doc/src/en/guide/upgrading/upgrading80x.adoc
index 79530c4673..6221f4e81b 100644
--- a/grails-doc/src/en/guide/upgrading/upgrading80x.adoc
+++ b/grails-doc/src/en/guide/upgrading/upgrading80x.adoc
@@ -1395,7 +1395,8 @@ grails.gorm.default.constraints = {
 [[groovy5-behavior-changes]]
 ==== 28. Apache Groovy 5 Behavior Changes
 
-Grails 8 upgrades from Apache Groovy 4 to Apache Groovy 5.
+Grails 8 upgrades from Apache Groovy 4 to Apache Groovy 6, so the Groovy 5 changes below apply on the way.
+See <<groovy6,Apache Groovy 6>> for what the move to Groovy 6 adds.
 Most applications need no changes, but a few stricter behaviors can affect application code.
 
 ===== 28.1 Assigning a static field from a static closure requires the class name
@@ -4093,3 +4094,51 @@ them. Name the connection, as in `@Transactional(connection = 'secondary')`, whe
 has to cover its writes.
 
 Applications using a single datasource are unaffected.
+
+[[groovy6]]
+==== 73. Apache Groovy 6
+
+Grails 8 builds on Apache Groovy 6.0. The Groovy 5 changes in <<groovy5-behavior-changes,Apache Groovy 5 Behavior Changes>>
+still apply; https://groovy-lang.org/releasenotes/groovy-6.0.html[the Groovy 6 release notes] list what changed since.
+Groovy 6 needs JDK 17 or later, which Grails 8's JDK 21 baseline already satisfies. Three of its changes touch a
+Grails build:
+
+* **The classic call-site runtime is a separate module.** Groovy 6 moves the non-`invokedynamic` call-site classes out
+  of `groovy` into `org.apache.groovy:groovy-callsite`, and a class compiled with `invokedynamic` off fails with
+  `NoClassDefFoundError: org/codehaus/groovy/runtime/callsite/CallSiteArray` without it, and the Groovy 6 compiler
+  refuses to generate such bytecode unless the module is on the compile classpath. Grails compiles applications that
+  way by default, and `grails-common`, which every application has through `grails-core`, exports the module, so it is
+  on the compile and runtime classpath already. Nothing needs adding, and a plugin or library compiled that way against
+  Groovy 4 or 5 keeps working. Groovy code compiled with `invokedynamic` off outside a Grails module, such as a plain
+  Groovy library in the same build, declares `org.apache.groovy:groovy-callsite` itself.
+* **Spock has no Groovy 6 build yet.** The Grails BOM keeps Spock `2.4-groovy-5.0`, which runs on Groovy 6 once its
+  Groovy major-version check is switched off. The Grails Gradle plugin sets
+  `spock.iKnowWhatImDoing.disableGroovyVersionCheck=true` on every `Test` task it configures; a task that already
+  sets the property keeps its own value. A `Test` task outside a Grails module, for example in a plain Groovy
+  library of a multi-project build that uses the Grails BOM, sets it itself:
+
+[source,groovy]
+----
+tasks.withType(Test).configureEach {
+    systemProperty 'spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true'
+}
+----
+
+* **JLine 4.** Groovy 6 ships `groovysh` on JLine 4.4.x, and the Grails BOM manages `org.jline:jline` at that version
+  for the Grails CLI and the console. An application that uses the JLine 3 API in its own code should check the
+  https://github.com/jline/jline3/releases[JLine 4 release notes] before upgrading.
+
+Four stricter compiler behaviours in Groovy 6.0.0 came up while moving Grails itself; application code with the same
+shape needs the same one-line change:
+
+* A parameterized type is no longer a class literal: write `config.getProperty(name, List, [])` rather than
+  `config.getProperty(name, List<String>, [])`, and `Mock(Foo)` rather than `Mock(Foo<Bar>)`.
+* `!x instanceof T` is rejected. It always parsed as `(!x) instanceof T`, which is never true, so the intended
+  `!(x instanceof T)` may change behaviour where the old form silently did nothing.
+* Under `@CompileStatic` or `@GrailsCompileStatic`, `new Foo(map)` on a class without a map constructor fails with
+  `Target constructor for constructor call expression hasn't been set`. Add `@groovy.transform.MapConstructor` to the class.
+* A Java source that refers to a Groovy class implementing a trait with static methods, such as `Validateable` or
+  a GORM entity, cannot be joint-compiled: the generated stub declares those methods `static abstract` and javac
+  rejects it. Until the Groovy stub generator is fixed, implement the static methods on the Groovy class
+  explicitly (delegating to `Validateable$Trait$Helper`, for instance), or move the Java source out of the joint
+  compilation.
diff --git a/grails-fields/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy b/grails-fields/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy
index 6e344c0033..6829d83b46 100644
--- a/grails-fields/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy
+++ b/grails-fields/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy
@@ -20,6 +20,7 @@ package grails.plugin.formfields
 
 import groovy.transform.Canonical
 import groovy.transform.CompileStatic
+import groovy.transform.MapConstructor
 import groovy.transform.Memoized
 import groovy.transform.TupleConstructor
 
@@ -42,6 +43,11 @@ import org.grails.scaffolding.model.property.Constrained
 @CompileStatic
 @Canonical
 @TupleConstructor(includes = ['beanType', 'propertyName', 'propertyType'])
+// Groovy 6.0.0 (#16157): @CompileStatic no longer resolves new BeanPropertyAccessorImpl(map) to the
+// implicit map-style construction ("Target constructor for constructor call expression hasn't been
+// set"). An explicit map constructor keeps that call shape. Keep permanently, or remove when the
+// implicit form compiles again. App source: a statically compiled `new Foo(map)` needs the same.
+@MapConstructor
 class BeanPropertyAccessorImpl implements BeanPropertyAccessor {
 
     Object rootBean
diff --git a/grails-fields/src/test/groovy/grails/plugin/formfields/BeanPropertyAccessorImplSpec.groovy b/grails-fields/src/test/groovy/grails/plugin/formfields/BeanPropertyAccessorImplSpec.groovy
new file mode 100644
index 0000000000..256aa787d4
--- /dev/null
+++ b/grails-fields/src/test/groovy/grails/plugin/formfields/BeanPropertyAccessorImplSpec.groovy
@@ -0,0 +1,51 @@
+/*
+ *  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.
+ */
+package grails.plugin.formfields
+
+import grails.core.GrailsApplication
+import spock.lang.Specification
+
+class BeanPropertyAccessorImplSpec extends Specification {
+
+    void "a map of properties constructs the accessor, as the factory does"() {
+        given:
+        def bean = new Object()
+        def grailsApplication = Mock(GrailsApplication)
+        Map<String, Object> params = [
+                rootBean: bean, rootBeanType: Object, pathFromRoot: 'name',
+                beanType: Object, propertyName: 'name', propertyType: String,
+                value: 'value', grailsApplication: grailsApplication,
+        ]
+
+        when:
+        def accessor = new BeanPropertyAccessorImpl(params)
+
+        then:
+        accessor.rootBean.is(bean)
+        accessor.rootBeanType == Object
+        accessor.pathFromRoot == 'name'
+        accessor.beanType == Object
+        accessor.propertyName == 'name'
+        accessor.propertyType == String
+        accessor.value == 'value'
+        accessor.grailsApplication.is(grailsApplication)
+        accessor.domainProperty == null
+        accessor.constraints == null
+    }
+}
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
index c4a2a90bed..188ef5c0e2 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy
@@ -99,6 +99,7 @@ import javax.inject.Inject
 @CompileStatic
 class GrailsGradlePlugin implements Plugin<Project> {
 
+    protected static final String SPOCK_DISABLE_GROOVY_VERSION_CHECK = 'spock.iKnowWhatImDoing.disableGroovyVersionCheck'
     private static final String NATIVE_IMAGE_PLUGIN = 'org.graalvm.buildtools.native'
 
     /** The plugin that compiles the pages, which are half of what a native image has to be told about. */
@@ -279,6 +280,13 @@ class GrailsGradlePlugin implements Plugin<Project> {
 
             project.tasks.withType(GroovyCompile).configureEach { GroovyCompile c ->
                 c.groovyOptions.optimizationOptions.indy = indyEnabled
+                // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): Spock's global AST transform checks
+                // the Groovy major version inside the forked compiler too. Same property the Test
+                // tasks get, for the same reason; remove with it. App test build.
+                List<String> forkJvmArgs = c.groovyOptions.forkOptions.jvmArgs ?: []
+                if (!forkJvmArgs.any { String arg -> arg.startsWith("-D${SPOCK_DISABLE_GROOVY_VERSION_CHECK}=") }) {
+                    c.groovyOptions.forkOptions.jvmArgs = forkJvmArgs + ["-D${SPOCK_DISABLE_GROOVY_VERSION_CHECK}=true".toString()]
+                }
 
                 if (preserveParameterNames != null) {
                     project.logger.info('Grails: Configuring Groovy compilation to preserve parameter names: {}', preserveParameterNames)
@@ -1052,6 +1060,15 @@ ${importStatements}
 
         String grailsEnvSystemProperty = System.getProperty(Environment.KEY)
         tasks.withType(Test).configureEach(systemPropertyConfigurer.curry(grailsEnvSystemProperty ?: Environment.TEST.getName()))
+        tasks.withType(Test).configureEach { Test task ->
+            // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): Spock refuses to start on Groovy 6 with
+            // IncompatibleGroovyVersionException unless its major-version check is switched off. An
+            // application that sets the property itself keeps its own value. Remove when the Grails
+            // BOM moves to a Spock build for Groovy 6. App test build.
+            if (!task.systemProperties.containsKey(SPOCK_DISABLE_GROOVY_VERSION_CHECK)) {
+                task.systemProperty(SPOCK_DISABLE_GROOVY_VERSION_CHECK, 'true')
+            }
+        }
         tasks.withType(JavaExec).configureEach(systemPropertyConfigurer.curry(grailsEnvSystemProperty ?: Environment.DEVELOPMENT.getName()))
 
         configureToolchainForForkTasks(project)
diff --git a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
index ff69e8a401..b32707c5aa 100644
--- a/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
+++ b/grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/views/AbstractGroovyTemplateCompileTask.groovy
@@ -134,6 +134,17 @@ abstract class AbstractGroovyTemplateCompileTask extends AbstractCompile {
                         if (jvmArgs) {
                             javaExecSpec.jvmArgs(jvmArgs)
                         }
+
+                        // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): the view template classpath can
+                        // carry Spock's global AST transform, which aborts compilation with
+                        // IncompatibleGroovyVersionException when the Groovy major is newer than the
+                        // Spock artifact's. This fork gets the same opt-out the Grails Gradle plugin
+                        // gives GroovyCompile and Test tasks, unless the build already passes one
+                        // through the fork options. Remove when the BOM moves to a Spock build for
+                        // Groovy 6. App test build.
+                        if (!jvmArgs?.any { String arg -> arg.startsWith('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=') }) {
+                            javaExecSpec.systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')
+                        }
                         javaExecSpec.maxHeapSize = compileOptions.forkOptions.memoryMaximumSize
                         javaExecSpec.minHeapSize = compileOptions.forkOptions.memoryInitialSize
 
diff --git a/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGradlePluginToolchainSpec.groovy b/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGradlePluginToolchainSpec.groovy
index 7f60c02a1f..cb8cf70e63 100644
--- a/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGradlePluginToolchainSpec.groovy
+++ b/grails-gradle/plugins/src/test/groovy/org/grails/gradle/plugin/core/GrailsGradlePluginToolchainSpec.groovy
@@ -120,6 +120,15 @@ class GrailsGradlePluginToolchainSpec extends GradleSpecification {
         result.output.contains('HAS_ENV=true')
         result.output.contains('MIN_HEAP=768m')
         result.output.contains('MAX_HEAP=768m')
+
+        and: 'only Test tasks switch off the Spock Groovy major-version check, and a task that sets it keeps its value'
+        result.output.contains('JAVAEXEC_SPOCK_CHECK=null')
+        result.output.contains('TEST_HAS_ENV=true')
+        result.output.contains('TEST_SPOCK_CHECK=true')
+        result.output.contains('TEST_SPOCK_CHECK_OVERRIDDEN=false')
+
+        and: 'the forked Groovy compiler gets the same override for the Spock AST transform'
+        result.output.contains('COMPILE_FORK_JVM_ARGS=[-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true]')
     }
 
     def "BootRun tasks enable Spring Boot console colors"() {
diff --git a/grails-gradle/plugins/src/test/resources/test-projects/fork-settings-defaults/build.gradle b/grails-gradle/plugins/src/test/resources/test-projects/fork-settings-defaults/build.gradle
index 9816aab19d..2852dadfb2 100644
--- a/grails-gradle/plugins/src/test/resources/test-projects/fork-settings-defaults/build.gradle
+++ b/grails-gradle/plugins/src/test/resources/test-projects/fork-settings-defaults/build.gradle
@@ -7,6 +7,17 @@ tasks.register('checkSysProps', JavaExec) {
     mainClass = 'does.not.Matter'
 }
 
+tasks.register('checkTestSysProps', Test) {
+    classpath = files()
+    testClassesDirs = files()
+}
+
+tasks.register('checkTestSysPropsOverridden', Test) {
+    classpath = files()
+    testClassesDirs = files()
+    systemProperty 'spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'false'
+}
+
 tasks.register('inspectSysProps') {
     doLast {
         def task = tasks.named('checkSysProps', JavaExec).get()
@@ -14,5 +25,13 @@ tasks.register('inspectSysProps') {
         println "HAS_ENV=${sysProps.containsKey('grails.env')}"
         println "MIN_HEAP=${task.minHeapSize}"
         println "MAX_HEAP=${task.maxHeapSize}"
+        println "JAVAEXEC_SPOCK_CHECK=${sysProps.get('spock.iKnowWhatImDoing.disableGroovyVersionCheck')}"
+        def testTask = tasks.named('checkTestSysProps', Test).get()
+        println "TEST_HAS_ENV=${testTask.systemProperties.containsKey('grails.env')}"
+        println "TEST_SPOCK_CHECK=${testTask.systemProperties.get('spock.iKnowWhatImDoing.disableGroovyVersionCheck')}"
+        def overridden = tasks.named('checkTestSysPropsOverridden', Test).get()
+        println "TEST_SPOCK_CHECK_OVERRIDDEN=${overridden.systemProperties.get('spock.iKnowWhatImDoing.disableGroovyVersionCheck')}"
+        def compile = tasks.named('compileGroovy', GroovyCompile).get()
+        println "COMPILE_FORK_JVM_ARGS=${compile.groovyOptions.forkOptions.jvmArgs}"
     }
 }
diff --git a/grails-gsp/grails-sitemesh3/src/test/groovy/org/grails/plugins/sitemesh3/Sitemesh3RenderViewMutatorSpec.groovy b/grails-gsp/grails-sitemesh3/src/test/groovy/org/grails/plugins/sitemesh3/Sitemesh3RenderViewMutatorSpec.groovy
index e8751917d5..a6d8ea5591 100644
--- a/grails-gsp/grails-sitemesh3/src/test/groovy/org/grails/plugins/sitemesh3/Sitemesh3RenderViewMutatorSpec.groovy
+++ b/grails-gsp/grails-sitemesh3/src/test/groovy/org/grails/plugins/sitemesh3/Sitemesh3RenderViewMutatorSpec.groovy
@@ -38,7 +38,7 @@ class Sitemesh3RenderViewMutatorSpec extends Specification {
 
     GrailsSiteMeshView siteMeshView() {
         new GrailsSiteMeshView(innerView, Mock(ContentProcessor),
-                Mock(DecoratorSelector<SiteMeshContext>), Mock(ServletContext), Mock(ViewResolver))
+                Mock(DecoratorSelector) /* Groovy 6.0.0 (GROOVY-12319, #16157): parameterized types are not class literals */, Mock(ServletContext), Mock(ViewResolver))
     }
 
     void 'unwraps the SiteMesh view for partial renders without an explicit layout'() {
diff --git a/grails-spring-security/oauth2/plugin/grails-app/services/grails/plugin/springsecurity/oauth2/SpringSecurityOauth2BaseService.groovy b/grails-spring-security/oauth2/plugin/grails-app/services/grails/plugin/springsecurity/oauth2/SpringSecurityOauth2BaseService.groovy
index d72aa857e9..b097464035 100644
--- a/grails-spring-security/oauth2/plugin/grails-app/services/grails/plugin/springsecurity/oauth2/SpringSecurityOauth2BaseService.groovy
+++ b/grails-spring-security/oauth2/plugin/grails-app/services/grails/plugin/springsecurity/oauth2/SpringSecurityOauth2BaseService.groovy
@@ -301,7 +301,8 @@ class SpringSecurityOauth2BaseService {
      * @return The role names for a newly registered user
      */
     def getRoleNames() {
-        def roleNames = grailsApplication.config.getProperty('grails.plugin.springsecurity.oauth2.registration.roleNames', List<String>, ['ROLE_USER'])
+        // Groovy 6.0.0 (GROOVY-12319, #16157): parameterized types are not class literals. Permanent.
+        def roleNames = grailsApplication.config.getProperty('grails.plugin.springsecurity.oauth2.registration.roleNames', List, ['ROLE_USER'])
         return roleNames
     }
 }
diff --git a/grails-testing-support-core/src/main/groovy/org/grails/testing/ParameterizedGrailsUnitTest.groovy b/grails-testing-support-core/src/main/groovy/org/grails/testing/ParameterizedGrailsUnitTest.groovy
index 60e1e7e8ee..291b9a6e45 100755
--- a/grails-testing-support-core/src/main/groovy/org/grails/testing/ParameterizedGrailsUnitTest.groovy
+++ b/grails-testing-support-core/src/main/groovy/org/grails/testing/ParameterizedGrailsUnitTest.groovy
@@ -49,7 +49,8 @@ trait ParameterizedGrailsUnitTest<T> extends GrailsUnitTest {
                 mockArtefact(cutType)
                 final String beanName = getBeanName(cutType)
                 if (beanName != null && applicationContext.containsBean(beanName)) {
-                    _artefactInstance = applicationContext.getBean(beanName, T)
+                    // Groovy 6.0.0 (GROOVY-12319, #16157): a type parameter is not a class literal. Permanent.
+                    _artefactInstance = applicationContext.getBean(beanName, cutType)
                 } else {
                     _artefactInstance = cutType.newInstance()
                     applicationContext.autowireCapableBeanFactory.autowireBeanProperties(_artefactInstance, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false)
diff --git a/grails-testing-support-mongodb/src/main/groovy/org/apache/grails/testing/mongo/StartMongoGrailsUnitExtension.groovy b/grails-testing-support-mongodb/src/main/groovy/org/apache/grails/testing/mongo/StartMongoGrailsUnitExtension.groovy
index 0007914d76..46ef63c63e 100644
--- a/grails-testing-support-mongodb/src/main/groovy/org/apache/grails/testing/mongo/StartMongoGrailsUnitExtension.groovy
+++ b/grails-testing-support-mongodb/src/main/groovy/org/apache/grails/testing/mongo/StartMongoGrailsUnitExtension.groovy
@@ -100,7 +100,8 @@ class StartMongoGrailsUnitExtension extends AbstractMongoGrailsExtension impleme
                         Package[] packagesArray = packages.toArray(new Package[packages.size()])
 
                         Map<String, Object> configuration = ['grails.mongodb.url': createConnectionString(container.getHost(), container.getMappedPort(DEFAULT_MONGO_PORT))]
-                        def datastore = mongoDatastoreClass.getDeclaredConstructor(Map<String, Object>, Package[]).newInstance(configuration, packagesArray)
+                        // Groovy 6.0.0 (GROOVY-12319, #16157): parameterized types are not class literals. Permanent.
+                        def datastore = mongoDatastoreClass.getDeclaredConstructor(Map, Package[]).newInstance(configuration, packagesArray)
                         mongoDatastoreField.writeValue(invocation.sharedInstance, datastore)
                     }
                 }
diff --git a/grails-validation/src/test/groovy/grails/validation/ValidateableTraitSpec.groovy b/grails-validation/src/test/groovy/grails/validation/ValidateableTraitSpec.groovy
index 06b1cb9aa1..76cb3f26b4 100644
--- a/grails-validation/src/test/groovy/grails/validation/ValidateableTraitSpec.groovy
+++ b/grails-validation/src/test/groovy/grails/validation/ValidateableTraitSpec.groovy
@@ -347,6 +347,19 @@ class MyValidateable implements Validateable {
     String town
     private String _someProperty = 'default value'
 
+    // Groovy 6.0.0 joint compilation (#16157): SomeJavaClass.java references this class, so the
+    // Groovy compiler writes a Java stub for it, and its stub generator emits a precompiled trait's
+    // static methods as `static abstract`, which javac rejects. Implementing them here keeps the
+    // stub legal. Remove when the stub generator handles static trait methods. App source: a Java
+    // class referencing a Groovy class that implements Validateable hits the same failure.
+    static Map<String, Constrained> getConstraintsMap() {
+        Validateable$Trait$Helper.getConstraintsMap(MyValidateable)
+    }
+
+    static void clearConstraintsMapCache() {
+        Validateable$Trait$Helper.clearConstraintsMapCache(MyValidateable)
+    }
+
     void setSomeOtherProperty(String s) {}
 
     void setSomeProperty(String s) {
diff --git a/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/GrailsJsonViewHelper.groovy b/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/GrailsJsonViewHelper.groovy
index 114317700e..9d3a47619a 100644
--- a/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/GrailsJsonViewHelper.groovy
+++ b/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/GrailsJsonViewHelper.groovy
@@ -45,7 +45,15 @@ interface GrailsJsonViewHelper extends GrailsViewHelper {
      * @param arguments The named arguments: 'template', 'collection', 'model', 'var' and 'bean'
      * @return The unescaped JSON
      */
-    JsonOutput.JsonWritable render(Map arguments)
+    // Groovy 6.0.0 (#16157): the concrete render(...) overrides in DefaultGrailsJsonViewHelper get a
+    // different return-type descriptor from these methods when JsonOutput.JsonWritable, a nested
+    // class of the joint-compiled JsonOutput.java, is resolved, so the abstract-method check
+    // reports them unimplemented ("Can't have an abstract method in a non-abstract class").
+    // Declared default so the check has nothing to flag; every implementor overrides them. Remove
+    // when the compiler resolves both sides alike. Framework only.
+    default JsonOutput.JsonWritable render(Map arguments) {
+        throw new UnsupportedOperationException()
+    }
 
     /**
      * Renders the given object to JSON, typically a domain class, ignoring lazy and internal properties
@@ -55,7 +63,9 @@ interface GrailsJsonViewHelper extends GrailsViewHelper {
      * @param customizer Used to customize the contents
      * @return The unescaped JSON
      */
-    JsonOutput.JsonWritable render(Object object, Map arguments, @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer)
+    default JsonOutput.JsonWritable render(Object object, Map arguments, @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer) {
+        throw new UnsupportedOperationException()
+    }
 
     /**
      * Renders the given object to JSON, typically a domain class, ignoring lazy and internal properties
@@ -64,7 +74,9 @@ interface GrailsJsonViewHelper extends GrailsViewHelper {
      * @param arguments The supported named arguments: 'includes' or 'excludes' list
      * @return The unescaped JSON
      */
-    JsonOutput.JsonWritable render(Object object, Map arguments)
+    default JsonOutput.JsonWritable render(Object object, Map arguments) {
+        throw new UnsupportedOperationException()
+    }
 
     /**
      * Renders the given object to JSON, typically a domain class, ignoring lazy and internal properties
@@ -72,7 +84,9 @@ interface GrailsJsonViewHelper extends GrailsViewHelper {
      * @param object The object to render
      * @return The unescaped JSON
      */
-    JsonOutput.JsonWritable render(Object object)
+    default JsonOutput.JsonWritable render(Object object) {
+        throw new UnsupportedOperationException()
+    }
 
     /**
      * Renders the given object to JSON, typically a domain class, ignoring lazy and internal properties
@@ -81,7 +95,9 @@ interface GrailsJsonViewHelper extends GrailsViewHelper {
      * @param customizer the customizer
      * @return The unescaped JSON
      */
-    JsonOutput.JsonWritable render(Object object, @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer)
+    default JsonOutput.JsonWritable render(Object object, @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer) {
+        throw new UnsupportedOperationException()
+    }
 
     /**
      * Renders the given object inline within the current JSON object instead of creating a new JSON object
diff --git a/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/internal/TemplateRenderer.groovy b/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/internal/TemplateRenderer.groovy
index 905a7ad385..3073ce9cda 100644
--- a/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/internal/TemplateRenderer.groovy
+++ b/grails-views-gson/src/main/groovy/grails/plugin/json/view/api/internal/TemplateRenderer.groovy
@@ -19,8 +19,10 @@
 
 package grails.plugin.json.view.api.internal
 
+import groovy.json.StreamingJsonBuilder
 import groovy.transform.CompileStatic
 
+import grails.plugin.json.builder.JsonOutput
 import grails.plugin.json.view.api.GrailsJsonViewHelper
 import grails.util.GrailsNameUtils
 
@@ -39,6 +41,39 @@ class TemplateRenderer {
         this.jsonViewHelper = jsonViewHelper
     }
 
+    // Groovy 6.0.0 (#16157): @Delegate no longer satisfies the abstract-method check for the five
+    // render(...) overloads, whose return type is a nested class of the joint-compiled
+    // JsonOutput.java ("Can't have an abstract method in a non-abstract class"). The void
+    // inline(...) overloads are unaffected, so @Delegate still handles them. Same behaviour as the
+    // forwarders @Delegate generated on Groovy 5. Remove when @Delegate handles the return type.
+    // Framework only.
+
+    @Override
+    JsonOutput.JsonWritable render(Map arguments) {
+        jsonViewHelper.render(arguments)
+    }
+
+    @Override
+    JsonOutput.JsonWritable render(Object object, Map arguments,
+                                   @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer) {
+        jsonViewHelper.render(object, arguments, customizer)
+    }
+
+    @Override
+    JsonOutput.JsonWritable render(Object object, Map arguments) {
+        jsonViewHelper.render(object, arguments)
+    }
+
+    @Override
+    JsonOutput.JsonWritable render(Object object) {
+        jsonViewHelper.render(object)
+    }
+
+    @Override
+    JsonOutput.JsonWritable render(Object object, @DelegatesTo(StreamingJsonBuilder.StreamingJsonDelegate) Closure customizer) {
+        jsonViewHelper.render(object, customizer)
+    }
+
     @Override
     Object invokeMethod(String name, Object args) {
         Object[] argArray = (Object[]) args
diff --git a/grails-views-gson/src/test/groovy/grails/plugin/json/view/TemplateRendererSpec.groovy b/grails-views-gson/src/test/groovy/grails/plugin/json/view/TemplateRendererSpec.groovy
index ddcffecfaf..1cb608d05f 100644
--- a/grails-views-gson/src/test/groovy/grails/plugin/json/view/TemplateRendererSpec.groovy
+++ b/grails-views-gson/src/test/groovy/grails/plugin/json/view/TemplateRendererSpec.groovy
@@ -27,6 +27,29 @@ import spock.lang.Specification
  */
 class TemplateRendererSpec extends Specification {
 
+    void "the render overloads of the view helper are available on the template renderer and forward to it"() {
+        given: "a template renderer"
+        def mockViewHelper = Mock(GrailsJsonViewHelper)
+        def tmpl = new TemplateRenderer(mockViewHelper)
+        def o = new Object()
+        def customizer = { -> }
+
+        when:
+        tmpl.render(template: 'foo')
+        tmpl.render(o)
+        tmpl.render(o, [includes: ['name']])
+        tmpl.render(o, customizer)
+        tmpl.render(o, [excludes: ['name']], customizer)
+
+        then:
+        1 * mockViewHelper.render([template: 'foo'])
+        1 * mockViewHelper.render(o)
+        1 * mockViewHelper.render(o, [includes: ['name']])
+        1 * mockViewHelper.render(o, customizer)
+        1 * mockViewHelper.render(o, [excludes: ['name']], customizer)
+        0 * _
+    }
+
     void "Test template renderer calls the correct render method"() {
         given:"A template renderer"
 


(grails-core) 02/03: Fix the Groovy 6 CI failures

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch deps/groovy-6.0.0
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit d5f4d8355d641ea11fbfbfdefcb1f404580cc9fc
Author: Mattias Reichel <ma...@gmail.com>
AuthorDate: Thu Sep 24 07:12:53 2026 +0200

    Fix the Groovy 6 CI failures
    
    Groovy 6 reads a system property while dispatching a Groovy call. The Geb
    test fixture replaced System.properties with a lookup backed by a Groovy
    closure, so every lookup re-entered itself until a StackOverflowError
    killed the Gradle test worker's dispatcher; the worker then waited for the
    daemon's end-of-stream while the daemon waited for the worker to exit,
    which is the hang that held the functional, canary and SiteMesh jobs
    until their timeouts. The lookup is now plain Java, as on 9.0.x, with a
    spec that drives it through a Groovy closure.
    
    Three runtime workarounds from 9.0.x that Groovy 6.0.0 still needs:
    ClassPropertyFetcher skips trait interfaces when collecting static
    property values (DomainConstraintGettersSpec), and @Delegate no longer
    generates over declared overrides in WriteFilteringMap and the
    dirty-checking list and sorted set. GormEntityTransformSpec looks up the
    specialized signature Groovy 6 gives generic trait methods, and
    GroovyPageAttributesTests follows Map subscript assignment now going
    through put.
---
 .../grails/util/AbstractTypeConvertingMap.java     |  8 ++-
 .../mapping/reflect/ClassPropertyFetcher.java      |  6 +-
 grails-geb/build.gradle                            |  3 +
 .../plugin/geb/ThreadLocalPropertyScopeSpec.groovy | 58 +++++++++++++++
 .../plugin/geb/WebDriverContainerHolder.groovy     | 43 +-----------
 .../plugin/geb/ThreadLocalPropertyScope.java       | 82 ++++++++++++++++++++++
 .../grails/taglib/GroovyPageAttributesTests.groovy | 16 +++--
 7 files changed, 165 insertions(+), 51 deletions(-)

diff --git a/grails-core/src/main/groovy/grails/util/AbstractTypeConvertingMap.java b/grails-core/src/main/groovy/grails/util/AbstractTypeConvertingMap.java
index 70c2cb4cd6..20e39a5f7a 100644
--- a/grails-core/src/main/groovy/grails/util/AbstractTypeConvertingMap.java
+++ b/grails-core/src/main/groovy/grails/util/AbstractTypeConvertingMap.java
@@ -51,9 +51,11 @@ import org.apache.grails.core.internal.util.TypeConverters;
  * Expose such a value under a name that is not a JavaBean accessor - for example
  * {@code GrailsParameterMap.request()} - or under a method that takes an argument.
  *
- * A setter is a weaker case and is allowed: it leaves reads addressing the map, but assignment to
- * that one name invokes the setter instead of storing an entry, so such an entry must be written
- * with {@link Map#put}. {@code GroovyPageAttributes.setGspTagSyntaxCall(boolean)} is the only one.
+ * A setter is a weaker case and is allowed: it leaves reads addressing the map, but dotted
+ * assignment to that one name invokes the setter instead of storing an entry. Groovy 6
+ * routes Map subscript assignment through {@link Map#put}, so {@code map['x'] = v} stores
+ * an entry rather than invoking the setter. Such an entry can also be written with
+ * {@link Map#put}. {@code GroovyPageAttributes.setGspTagSyntaxCall(boolean)} is the only one.
  *
  * @author Graeme Rocher
  * @author Lari Hotari
diff --git a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/reflect/ClassPropertyFetcher.java b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/reflect/ClassPropertyFetcher.java
index a429285376..18ddd38460 100644
--- a/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/reflect/ClassPropertyFetcher.java
+++ b/grails-datastore-core/src/main/groovy/org/grails/datastore/mapping/reflect/ClassPropertyFetcher.java
@@ -225,7 +225,11 @@ public class ClassPropertyFetcher {
         Class javaClass = cachedClass.getTheClass();
         List<T> values = new ArrayList<>(hierarchy.size());
         for (ClassInfo current : hierarchy) {
-            if (cachedClass.isInterface()) continue;
+            // Groovy 6 (#16157): the trait interfaces in the hierarchy no longer carry the static
+            // accessors the helper class implements, so asking one for `transients` failed with
+            // MissingMethodException (DomainConstraintGettersSpec). Skip interfaces. Remove if Groovy
+            // restores the accessors. App runtime.
+            if (current.getCachedClass().isInterface()) continue;
             MetaProperty metaProperty = current.getMetaClass().getMetaProperty(name);
             if (metaProperty != null && Modifier.isStatic(metaProperty.getModifiers())) {
                 Class type = metaProperty.getType();
diff --git a/grails-geb/build.gradle b/grails-geb/build.gradle
index 00dfc60ddb..690147a860 100644
--- a/grails-geb/build.gradle
+++ b/grails-geb/build.gradle
@@ -61,6 +61,9 @@ dependencies {
 
     // Added to be able to resolve the geb version from the BOM in the resolveVersions task
     compileOnly 'org.apache.groovy.geb:geb-spock'
+
+    testImplementation 'org.slf4j:slf4j-simple'
+    testImplementation 'org.spockframework:spock-core'
 }
 
 apply {
diff --git a/grails-geb/src/test/groovy/grails/plugin/geb/ThreadLocalPropertyScopeSpec.groovy b/grails-geb/src/test/groovy/grails/plugin/geb/ThreadLocalPropertyScopeSpec.groovy
new file mode 100644
index 0000000000..abda3871f7
--- /dev/null
+++ b/grails-geb/src/test/groovy/grails/plugin/geb/ThreadLocalPropertyScopeSpec.groovy
@@ -0,0 +1,58 @@
+/*
+ *  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.
+ */
+package grails.plugin.geb
+
+import spock.lang.Specification
+
+class ThreadLocalPropertyScopeSpec extends Specification {
+
+    private static final String KEY = 'grails.geb.ThreadLocalPropertyScopeSpec'
+
+    void 'a Groovy closure body reads the overridden property without re-entering the lookup'() {
+        // Groovy 6 reads a system property while dispatching the closure call, so a lookup that
+        // itself went through Groovy recursed until a StackOverflowError (#16157).
+        expect:
+        ThreadLocalPropertyScope.withProperty(KEY, 'overridden') { System.getProperty(KEY) } == 'overridden'
+
+        and: 'the override is gone once the body returns'
+        System.getProperty(KEY) == null
+    }
+
+    void 'the override is restored to the previous value and stays on the calling thread'() {
+        given:
+        System.setProperty(KEY, 'original')
+        String seenOnOtherThread = null
+
+        when:
+        String seenInside = ThreadLocalPropertyScope.withProperty(KEY, 'overridden') {
+            Thread other = new Thread({ seenOnOtherThread = System.getProperty(KEY) } as Runnable)
+            other.start()
+            other.join()
+            System.getProperty(KEY)
+        }
+
+        then:
+        seenInside == 'overridden'
+        seenOnOtherThread == 'original'
+        System.getProperty(KEY) == 'original'
+
+        cleanup:
+        System.clearProperty(KEY)
+    }
+}
diff --git a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
index cb52224a62..6eeb1b65ab 100644
--- a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
+++ b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
@@ -503,7 +503,7 @@ class WebDriverContainerHolder {
          */
         static Closure withSystemProperty(Closure target, String key, Object value) {
             Closure wrapped = { Object... args ->
-                SysPropScope.withProperty(key, value.toString()) {
+                ThreadLocalPropertyScope.withProperty(key, value.toString()) {
                     InvokerHelper.invokeClosure(target, args)
                 }
             }
@@ -514,46 +514,5 @@ class WebDriverContainerHolder {
             }
         }
 
-        @CompileStatic
-        private static class SysPropScope {
-
-            private static final ThreadLocal<Map<String,String>> OVERRIDDEN_SYSTEM_PROPERTIES =
-                    ThreadLocal.withInitial { [:] as Map<String,String> }
-
-            @Lazy // Thread-safe wrapping of system properties
-            private static Properties propertiesWrappedOnFirstAccess = {
-                new InterceptingProperties().tap {
-                    putAll(System.getProperties())
-                    System.setProperties(it)
-                }
-            }()
-
-            // Helper method for Groovy 5 static type checking compatibility
-            private static Map<String, String> getOverriddenProperties() {
-                OVERRIDDEN_SYSTEM_PROPERTIES.get()
-            }
-
-            static <T> T withProperty(String key, String value, Closure<T> body) {
-                propertiesWrappedOnFirstAccess // Access property to trigger property wrapping
-                def map = OVERRIDDEN_SYSTEM_PROPERTIES.get()
-                def prev = map.put(key, value)
-                try {
-                    return body.call()
-                } finally {
-                    if (prev == null) map.remove(key) else map[key] = prev
-                    if (map.isEmpty()) OVERRIDDEN_SYSTEM_PROPERTIES.remove()
-                }
-            }
-
-            @CompileStatic
-            private static class InterceptingProperties extends Properties {
-                @Override
-                String getProperty(String key) {
-                    Map<String, String> overrides = getOverriddenProperties()
-                    def v = overrides.get(key)
-                    v != null ? v : super.getProperty(key)
-                }
-            }
-        }
     }
 }
diff --git a/grails-geb/src/testFixtures/java/grails/plugin/geb/ThreadLocalPropertyScope.java b/grails-geb/src/testFixtures/java/grails/plugin/geb/ThreadLocalPropertyScope.java
new file mode 100644
index 0000000000..2f31e37a7d
--- /dev/null
+++ b/grails-geb/src/testFixtures/java/grails/plugin/geb/ThreadLocalPropertyScope.java
@@ -0,0 +1,82 @@
+/*
+ *  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.
+ */
+package grails.plugin.geb;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.function.Supplier;
+
+/**
+ * Overrides a system property for a custom browser factory on its calling thread.
+ * <p>
+ * Property lookup must stay in Java (#16157): Groovy 6 reads a system property while
+ * dispatching a method call, so a lookup backed by a Groovy closure, as the previous
+ * Groovy implementation's {@code ThreadLocal.withInitial { [:] }} was, re-entered itself
+ * until a {@code StackOverflowError} killed the Gradle test worker's dispatcher and left
+ * the worker and the daemon waiting on each other. Permanent. App test build: a Grails
+ * application's Geb tests use this fixture.
+ */
+final class ThreadLocalPropertyScope {
+
+    private static final ThreadLocal<Map<String, String>> OVERRIDES = ThreadLocal.withInitial(HashMap::new);
+    private static boolean installed;
+
+    private ThreadLocalPropertyScope() {
+    }
+
+    static <T> T withProperty(String key, String value, Supplier<T> body) {
+        installProperties();
+        Map<String, String> overrides = OVERRIDES.get();
+        String previous = overrides.put(key, value);
+        try {
+            return body.get();
+        }
+        finally {
+            if (previous == null) {
+                overrides.remove(key);
+            }
+            else {
+                overrides.put(key, previous);
+            }
+            if (overrides.isEmpty()) {
+                OVERRIDES.remove();
+            }
+        }
+    }
+
+    private static synchronized void installProperties() {
+        if (!installed) {
+            Properties properties = new InterceptingProperties();
+            properties.putAll(System.getProperties());
+            System.setProperties(properties);
+            installed = true;
+        }
+    }
+
+    private static final class InterceptingProperties extends Properties {
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public String getProperty(String key) {
+            String value = OVERRIDES.get().get(key);
+            return value != null ? value : super.getProperty(key);
+        }
+    }
+}
diff --git a/grails-gsp/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageAttributesTests.groovy b/grails-gsp/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageAttributesTests.groovy
index 4f00ccab0c..75409c83f5 100644
--- a/grails-gsp/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageAttributesTests.groovy
+++ b/grails-gsp/grails-taglib/src/test/groovy/org/grails/taglib/GroovyPageAttributesTests.groovy
@@ -119,20 +119,26 @@ class GroovyPageAttributesTests {
     }
 
     // https://github.com/apache/grails-core/issues/16280
-    // gspTagSyntaxCall keeps a real setter, so assigning that one name invokes the setter rather
-    // than storing an entry - both in dotted and subscript form. That is the Grails 7 behaviour,
-    // and TagOutput and GroovyPage rely on it. Use put() to store an attribute of that name.
+    // gspTagSyntaxCall keeps a real setter, so dotted assignment to that one name invokes the
+    // setter rather than storing an entry. Groovy 6 routes Map subscript assignment through
+    // Map.put, so attrs['gspTagSyntaxCall'] = v stores an attribute. TagOutput and GroovyPage
+    // call setGspTagSyntaxCall(boolean) directly. Use put() or subscript to store an attribute
+    // of that name.
     @Test
     void testAssigningGspTagSyntaxCallInvokesTheSetter() {
         def dotted = toGroovyPageAttributes([:])
         dotted.gspTagSyntaxCall = false
         assertFalse dotted.gspTagSyntaxCall()
         assertFalse dotted.containsKey('gspTagSyntaxCall')
+    }
 
+    @Test
+    void testSubscriptAssignmentOfGspTagSyntaxCallStoresAnAttribute() {
         def subscript = toGroovyPageAttributes([:])
         subscript['gspTagSyntaxCall'] = false
-        assertFalse subscript.gspTagSyntaxCall()
-        assertFalse subscript.containsKey('gspTagSyntaxCall')
+        assertTrue subscript.gspTagSyntaxCall()
+        assertTrue subscript.containsKey('gspTagSyntaxCall')
+        assertEquals false, subscript['gspTagSyntaxCall']
     }
 
     @Test


(grails-core) 03/03: Set the Spock Groovy version opt-out for every module

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch deps/groovy-6.0.0
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 1ab1f813452815bca356b0bf2dd0bea16e42f7e0
Author: Mattias Reichel <ma...@gmail.com>
AuthorDate: Thu Sep 24 08:22:47 2026 +0200

    Set the Spock Groovy version opt-out for every module
    
    The spring-security-ui-common test-example helper applies only the groovy
    and java-test-fixtures plugins, so neither CompilePlugin nor the Grails
    Gradle plugin reached its compileTestFixturesGroovy task and Spock's AST
    transform aborted it on Groovy 6. The root build now sets the opt-out on
    every module's GroovyCompile fork and Test JVM, guarded so a module that
    also gets it from CompilePlugin carries it once.
---
 .../org/apache/grails/buildsrc/CompilePlugin.groovy    |  7 +++++--
 build.gradle                                           | 18 ++++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
index c61250d830..ffe20a923f 100644
--- a/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
+++ b/build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/CompilePlugin.groovy
@@ -138,8 +138,11 @@ class CompilePlugin implements Plugin<Project> {
                 // version inside the forked compiler, failing with IncompatibleGroovyVersionException.
                 // Remove when the BOM moves to a Spock build for Groovy 6. App test build: an
                 // application's build gets the same flag from the Grails Gradle plugin.
-                it.groovyOptions.forkOptions.jvmArgs = (it.groovyOptions.forkOptions.jvmArgs ?: []) +
-                        ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
+                List<String> groovyForkJvmArgs = it.groovyOptions.forkOptions.jvmArgs ?: []
+                if (!groovyForkJvmArgs.any { String arg -> arg.startsWith('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=') }) {
+                    it.groovyOptions.forkOptions.jvmArgs = groovyForkJvmArgs +
+                            ['-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true']
+                }
                 // Publish THIS project's base.dir to the forked Groovy compiler. Gradle reuses a forked
                 // compiler daemon for a task whose requested fork arguments the daemon already satisfies,
                 // so a compile that does NOT request base.dir can be handed a daemon started for another
diff --git a/build.gradle b/build.gradle
index 247df0213d..5cd6a4d203 100644
--- a/build.gradle
+++ b/build.gradle
@@ -154,6 +154,24 @@ subprojects {
             dependencies.add(sourceSet.compileOnlyConfigurationName, groovyCallsite)
             dependencies.add(sourceSet.runtimeOnlyConfigurationName, groovyCallsite)
         }
+
+        // Groovy 6 with Spock 2.4-groovy-5.0 (#16157): Spock's global AST transform checks the Groovy
+        // major inside the forked compiler, and Spock checks it again when a Spec starts. CompilePlugin
+        // and the Grails Gradle plugin set the opt-out for the modules that apply them; this covers the
+        // rest, such as test-example helpers that apply only the groovy plugin, without doubling it.
+        // Remove when the BOM moves to a Spock build for Groovy 6.
+        String spockOptOut = '-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=true'
+        tasks.withType(GroovyCompile).configureEach { GroovyCompile compile ->
+            List<String> forkJvmArgs = compile.groovyOptions.forkOptions.jvmArgs ?: []
+            if (!forkJvmArgs.any { String arg -> arg.startsWith('-Dspock.iKnowWhatImDoing.disableGroovyVersionCheck=') }) {
+                compile.groovyOptions.forkOptions.jvmArgs = forkJvmArgs + [spockOptOut]
+            }
+        }
+        tasks.withType(Test).configureEach { Test testTask ->
+            if (!testTask.systemProperties.containsKey('spock.iKnowWhatImDoing.disableGroovyVersionCheck')) {
+                testTask.systemProperty('spock.iKnowWhatImDoing.disableGroovyVersionCheck', 'true')
+            }
+        }
     }
 
     configurations.configureEach {