Skip to content

Commit 2f9b1a6

Browse files
committed
Fix spock version for JUnit 5.3
1 parent 5a9e1c7 commit 2f9b1a6

File tree

1 file changed

+3
-4
lines changed
  • dd-java-agent/instrumentation/junit/junit-5.3/spock-junit-5

1 file changed

+3
-4
lines changed

dd-java-agent/instrumentation/junit/junit-5.3/spock-junit-5/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ configurations.matching({ it.name.startsWith('test') }).configureEach({
4040
})
4141

4242
configurations.matching({ it.name.startsWith('latestDepTest') }).configureEach({
43-
it.resolutionStrategy.componentSelection.all { ComponentSelection selection ->
44-
if (selection.candidate.group == 'org.spockframework' && selection.candidate.module == 'spock-core' && !selection.candidate.version.endsWith("-groovy-${spockGroovyVersion}")) {
45-
selection.reject('Spock groovy version mismatch')
46-
}
43+
it.resolutionStrategy {
44+
// Force latest stable Spock version (2.3), as 2.4-M7-groovy-3.0 is still in milestone stage and incompatible with JUnit 5 version
45+
force "org.spockframework:spock-core:2.3-groovy-${spockGroovyVersion}"
4746
}
4847
})

0 commit comments

Comments
 (0)