From a1e972ebaa63a3c935afd3bd9b8958c910961d4b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 18 Mar 2022 10:52:41 +0000 Subject: [PATCH] Update Spock for Groovy 4.0 compatibility Closes gh-30318 --- .../src/docs/asciidoc/features/testing.adoc | 6 +++--- spring-boot-project/spring-boot-parent/build.gradle | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc index 52d7cb4cb7..ab283845c6 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc @@ -797,10 +797,10 @@ Alternatively, you can specify a source for your test, which disables the behavi [[features.testing.spring-boot-applications.spock]] ==== Using Spock to Test Spring Boot Applications -Spock 2.x can be used to test a Spring Boot application. -To do so, add a dependency on Spock's `spock-spring` module to your application's build. +Spock 2.2 or later can be used to test a Spring Boot application. +To do so, add a dependency on a `-groovy-4.0` version of Spock's `spock-spring` module to your application's build. `spock-spring` integrates Spring's test framework into Spock. -See https://spockframework.org/spock/docs/2.0/modules.html#_spring_module[the documentation for Spock's Spring module] for further details. +See https://spockframework.org/spock/docs/2.2-M1/modules.html#_spring_module[the documentation for Spock's Spring module] for further details. diff --git a/spring-boot-project/spring-boot-parent/build.gradle b/spring-boot-project/spring-boot-parent/build.gradle index 6e649f58ab..11b19a3a5d 100644 --- a/spring-boot-project/spring-boot-parent/build.gradle +++ b/spring-boot-project/spring-boot-parent/build.gradle @@ -154,11 +154,10 @@ bom { ] } } - library("Spock Framework", "2.0-groovy-3.0") { + library("Spock Framework", "2.2-M1-groovy-4.0") { group("org.spockframework") { - modules = [ - "spock-core", - "spock-spring" + imports = [ + "spock-bom" ] } }