Skip to content

Commit 6b7695a

Browse files
committed
feat!: drop support for spock 1.3
Signed-off-by: Joke de Buhr <[email protected]>
1 parent 5188a24 commit 6b7695a

File tree

3 files changed

+7
-65
lines changed

3 files changed

+7
-65
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ which has been superseed by the `OutputCaptureExtension` that on the other hand
1919
** `@Share @OutputCapture globalLogs`
2020
* Captures logs per Test
2121
** `@OutputCapture localLogs`
22-
* Working with Spock Framework 1.3, 2.0, 2.1, 2.2 and 2.3
22+
* Working with Spock Framework 2.0, 2.1, 2.2 and 2.3
2323
2424
== Dependency setup
2525

examples/slf4j/build.gradle

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ plugins {
33
id 'groovy'
44
}
55

6-
def spock13 = ['spock13groovy24', 'spock13groovy25']
7-
def spock2x = [
6+
def versions = [
87
'spock20groovy25', 'spock20groovy30',
98
'spock21groovy25', 'spock21groovy30',
109
'spock22groovy25', 'spock22groovy30', 'spock22groovy40',
1110
'spock23groovy25', 'spock23groovy30', 'spock23groovy40'
1211
]
1312

14-
[*spock13, *spock2x].forEach {
13+
versions.forEach {
1514
sourceSets.create(it) {
1615
java.srcDirs += sourceSets.main.java.srcDirs
1716
groovy.srcDirs += sourceSets.test.groovy.srcDirs
@@ -27,20 +26,6 @@ dependencies {
2726
testImplementation 'org.slf4j:slf4j-simple:2.0.7'
2827
testImplementation 'org.spockframework:spock-core'
2928

30-
spock13groovy24Implementation platform('org.codehaus.groovy:groovy-bom:2.4.21')
31-
spock13groovy24Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.4')
32-
spock13groovy24Implementation project(':spock-outputcapture')
33-
spock13groovy24Implementation 'org.slf4j:slf4j-simple:2.0.7'
34-
spock13groovy24Implementation 'org.spockframework:spock-core'
35-
spock13groovy24Implementation 'org.objenesis:objenesis:3.3'
36-
37-
spock13groovy25Implementation platform('org.codehaus.groovy:groovy-bom:2.5.16')
38-
spock13groovy25Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.5')
39-
spock13groovy25Implementation project(':spock-outputcapture')
40-
spock13groovy25Implementation 'org.slf4j:slf4j-simple:2.0.7'
41-
spock13groovy25Implementation 'org.spockframework:spock-core'
42-
spock13groovy25Implementation 'org.objenesis:objenesis:2.6'
43-
4429
spock20groovy25Implementation platform('org.codehaus.groovy:groovy-bom:2.5.16')
4530
spock20groovy25Implementation platform('org.spockframework:spock-bom:2.0-groovy-2.5')
4631
spock20groovy25Implementation project(':spock-outputcapture')
@@ -102,18 +87,7 @@ dependencies {
10287
spock23groovy40Implementation 'org.spockframework:spock-core'
10388
}
10489

105-
spock13.forEach { source ->
106-
tasks.register("test$source", Test) {
107-
group = 'verification'
108-
109-
testClassesDirs = sourceSets.findByName(source).output.classesDirs
110-
classpath = sourceSets.findByName(source).runtimeClasspath
111-
112-
useJUnit()
113-
tasks.findByName('check').dependsOn it
114-
}
115-
}
116-
spock2x.forEach { source ->
90+
versions.forEach { source ->
11791
tasks.register("test$source", Test) {
11892
group = 'verification'
11993

examples/springboot/build.gradle

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ plugins {
33
id 'groovy'
44
}
55

6-
def spock13 = ['spock13groovy24', 'spock13groovy25']
7-
def spock2x = [
6+
def versions = [
87
'spock20groovy25', 'spock20groovy30',
98
'spock21groovy25', 'spock21groovy30',
109
'spock22groovy25', 'spock22groovy30', 'spock22groovy40',
1110
'spock23groovy25', 'spock23groovy30', 'spock23groovy40'
1211
]
1312

14-
[*spock13, *spock2x].forEach {
13+
versions.forEach {
1514
sourceSets.create(it) {
1615
java.srcDirs += sourceSets.main.java.srcDirs
1716
groovy.srcDirs += sourceSets.test.groovy.srcDirs
@@ -30,26 +29,6 @@ dependencies {
3029
testImplementation 'org.spockframework:spock-spring'
3130
testImplementation 'org.springframework.boot:spring-boot-starter-test'
3231

33-
spock13groovy24Implementation(platform('org.springframework.boot:spring-boot-dependencies:2.7.3')) {
34-
exclude group: 'org.codehaus.groovy', module: '*'
35-
}
36-
spock13groovy24Implementation platform('org.codehaus.groovy:groovy-bom:2.4.21')
37-
spock13groovy24Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.4')
38-
spock13groovy24Implementation project(':spock-outputcapture')
39-
spock13groovy24Implementation 'org.spockframework:spock-spring'
40-
spock13groovy24Implementation 'org.springframework.boot:spring-boot-starter-test'
41-
spock13groovy24Implementation 'org.objenesis:objenesis:3.3'
42-
43-
spock13groovy25Implementation(platform('org.springframework.boot:spring-boot-dependencies:2.7.3')) {
44-
exclude group: 'org.codehaus.groovy', module: '*'
45-
}
46-
spock13groovy25Implementation platform('org.codehaus.groovy:groovy-bom:2.5.16')
47-
spock13groovy25Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.5')
48-
spock13groovy25Implementation project(':spock-outputcapture')
49-
spock13groovy25Implementation 'org.spockframework:spock-spring'
50-
spock13groovy25Implementation 'org.springframework.boot:spring-boot-starter-test'
51-
spock13groovy25Implementation 'org.objenesis:objenesis:2.6'
52-
5332
spock20groovy25Implementation(platform('org.springframework.boot:spring-boot-dependencies:2.7.3')) {
5433
exclude group: 'org.codehaus.groovy', module: '*'
5534
}
@@ -129,18 +108,7 @@ dependencies {
129108
spock23groovy40Implementation 'org.springframework.boot:spring-boot-starter-test'
130109
}
131110

132-
spock13.forEach { source ->
133-
tasks.register("test$source", Test) {
134-
group = 'verification'
135-
136-
testClassesDirs = sourceSets.findByName(source).output.classesDirs
137-
classpath = sourceSets.findByName(source).runtimeClasspath
138-
139-
useJUnit()
140-
tasks.findByName('check').dependsOn it
141-
}
142-
}
143-
spock2x.forEach { source ->
111+
versions.forEach { source ->
144112
tasks.register("test$source", Test) {
145113
group = 'verification'
146114

0 commit comments

Comments
 (0)