grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.79k stars 950 forks source link

Update Hamcrest to Match Spring Boot version #13828

Open codeconsole opened 2 weeks ago

codeconsole commented 2 weeks ago

Feature description

Spring Boot uses Hamcrest 2.2 in Spring Boot 3.4.0

<hamcrest.version>2.2</hamcrest.version>

We only use hamcrest in ChainedTransactionManagerTests

ChainedTransactionManagerTests should be updated to work with the new version so that we no longer have to override the Spring version.

https://github.com/grails/grails-core/blob/112861ec8bdd677ded19894e690ec8bdd8eca417/grails-core/build.gradle#L1-L5

codeconsole commented 3 days ago

@bkoehm any chance you can update this 1 file to use hamcrest 2.2? The Grails bom extends the Spring bom so this is causing some issues and forcing us to use that configurations exclusion block. It would be really nice if you could just update the tests to use 2.2 which is the same version Spring uses.

Make sure to remove the exclusion block prior to upgrading. It is forcing version 1.3. https://github.com/grails/grails-core/blob/112861ec8bdd677ded19894e690ec8bdd8eca417/grails-core/build.gradle#L1-L5