Skip to content

Commit

Permalink
refactor!: drop support for spock 1.3
Browse files Browse the repository at this point in the history
Signed-off-by: Joke de Buhr <joke@xckk.de>
  • Loading branch information
joke committed Nov 4, 2022
1 parent c366d93 commit 96753f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In consequence Spock then capable of mocking these classes.
* Removes `final` from classes and methods
* Automatically attaches java agent
* Redefines classes via https://bytebuddy.net/[Byte Buddy] transformation.
* Working with Spock Framework 1.3, 2.0, 2.1, 2.2 and 2.3
* Working with Spock Framework 2.0, 2.1, 2.2 and 2.3
== Gradle Dependency

Expand Down
28 changes: 1 addition & 27 deletions examples/spock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ plugins {
id 'groovy'
}

def spock13 = ['spock13groovy24', 'spock13groovy25']
def spock2x = [
'spock20groovy25', 'spock20groovy30',
'spock21groovy25', 'spock21groovy30',
'spock22groovy25', 'spock22groovy30', 'spock22groovy40',
'spock23groovy25', 'spock23groovy30', 'spock23groovy40'
]

[*spock13, *spock2x].forEach {
[*spock2x].forEach {
sourceSets.create(it) {
java.srcDirs += sourceSets.main.java.srcDirs
groovy.srcDirs += sourceSets.test.groovy.srcDirs
Expand All @@ -25,20 +24,6 @@ dependencies {
testImplementation 'org.slf4j:slf4j-simple:2.0.3'
testImplementation 'org.spockframework:spock-core'

spock13groovy24Implementation platform('org.codehaus.groovy:groovy-bom:2.4.21')
spock13groovy24Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.4')
spock13groovy24Implementation project(':spock-mockable')
spock13groovy24Implementation 'org.slf4j:slf4j-simple:2.0.2'
spock13groovy24Implementation 'org.spockframework:spock-core'
spock13groovy24Implementation 'org.objenesis:objenesis:3.3'

spock13groovy25Implementation platform('org.codehaus.groovy:groovy-bom:2.5.16')
spock13groovy25Implementation platform('org.spockframework:spock-bom:1.3-groovy-2.5')
spock13groovy25Implementation project(':spock-mockable')
spock13groovy25Implementation 'org.slf4j:slf4j-simple:2.0.2'
spock13groovy25Implementation 'org.spockframework:spock-core'
spock13groovy25Implementation 'org.objenesis:objenesis:2.6'

spock20groovy25Implementation platform('org.codehaus.groovy:groovy-bom:2.5.16')
spock20groovy25Implementation platform('org.spockframework:spock-bom:2.0-groovy-2.5')
spock20groovy25Implementation project(':spock-mockable')
Expand Down Expand Up @@ -110,17 +95,6 @@ dependencies {
spock23groovy40Implementation 'org.objenesis:objenesis:3.3'
}

spock13.forEach { source ->
tasks.register("test$source", Test) {
group = 'verification'

testClassesDirs = sourceSets.findByName(source).output.classesDirs
classpath = sourceSets.findByName(source).runtimeClasspath

useJUnit()
tasks.findByName('check').dependsOn it
}
}
spock2x.forEach { source ->
tasks.register("test$source", Test) {
group = 'verification'
Expand Down

0 comments on commit 96753f6

Please sign in to comment.