Skip to content

Commit 6d030ce

Browse files
All spock dependencies should be in groovySpock config.
1 parent 8b8ba20 commit 6d030ce

File tree

8 files changed

+35
-12
lines changed

8 files changed

+35
-12
lines changed

dd-java-agent/instrumentation/kafka/kafka-clients-0.11/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ apply from: "$rootDir/gradle/java.gradle"
2020
addTestSuite('latestDepTest')
2121
addTestSuite('iastLatestDepTest3')
2222

23+
groovySpock {
24+
// This module still needs Spock with JUnit4.
25+
configureDependencies("testImplementation", libs.spock.junit4.groovy4)
26+
}
27+
2328
dependencies {
2429
compileOnly group: 'org.apache.kafka', name: 'kafka-clients', version: '0.11.0.0'
2530
implementation project(':dd-java-agent:instrumentation:kafka:kafka-common')
2631

27-
testImplementation libs.spock.junit4.groovy4 // This module still needs Spock with JUnit4.
2832
testImplementation group: 'org.apache.kafka', name: 'kafka-clients', version: '0.11.0.0'
2933
testImplementation group: 'org.springframework.kafka', name: 'spring-kafka', version: '1.3.3.RELEASE'
3034
testImplementation group: 'org.springframework.kafka', name: 'spring-kafka-test', version: '1.3.3.RELEASE'

dd-java-agent/instrumentation/kafka/kafka-streams-0.11/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ apply from: "$rootDir/gradle/java.gradle"
1111

1212
addTestSuite('latestDepTest')
1313

14+
groovySpock {
15+
// This module still needs Spock with JUnit4.
16+
configureDependencies("latestDepTestImplementation", libs.spock.junit4.groovy4)
17+
}
18+
1419
dependencies {
1520
compileOnly group: 'org.apache.kafka', name: 'kafka-streams', version: '0.11.0.0'
1621

@@ -26,7 +31,6 @@ dependencies {
2631

2732
// Include latest version of kafka itself along with latest version of client libs.
2833
// This seems to help with jar compatibility hell.
29-
latestDepTestImplementation libs.spock.junit4.groovy4 // This module still needs Spock with JUnit4.
3034
latestDepTestImplementation group: 'org.apache.kafka', name: 'kafka_2.13', version: '2.+'
3135
latestDepTestImplementation group: 'org.apache.kafka', name: 'kafka-clients', version: '2.+'
3236
latestDepTestImplementation group: 'org.apache.kafka', name: 'kafka-streams', version: '2.+'

dd-java-agent/instrumentation/rs/jax-rs/jax-rs-annotations/jax-rs-annotations-1/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ muzzle {
1313

1414
apply from: "$rootDir/gradle/java.gradle"
1515

16+
groovySpock {
17+
// This module still needs Spock with JUnit4.
18+
configureDependencies("testImplementation", libs.spock.junit4.groovy4)
19+
}
20+
1621
dependencies {
1722
compileOnly group: 'javax.ws.rs', name: 'jsr311-api', version: '1.1.1'
1823

19-
testImplementation libs.spock.junit4.groovy4 // This module still needs Spock with JUnit4.
2024
testImplementation group: 'io.dropwizard', name: 'dropwizard-testing', version: '0.7.1'
2125
testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.3'
2226
}

dd-java-agent/instrumentation/spring/spring-data-1.8/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ testJvmConstraints {
2929

3030
addTestSuiteForDir('latestDepTest', 'test')
3131

32+
groovySpock {
33+
configureDependencies("testImplementation", libs.spock.spring.groovy4)
34+
}
35+
3236
// DQH - API changes that impact instrumentation occurred in spring-data-commons in March 2014.
3337
// For now, that limits support to spring-data-commons 1.9.0 (maybe 1.8.0).
3438
// For testing, chose a couple spring-data modules that are old enough to work with 1.9.0.
@@ -37,7 +41,6 @@ dependencies {
3741
compileOnly(group: 'org.springframework', name: 'spring-aop', version: '1.2')
3842
implementation project(':dd-java-agent:agent-debugger:debugger-bootstrap')
3943

40-
testImplementation libs.spock.spring.groovy4
4144
testImplementation group: 'org.springframework', name: 'spring-test', version: '3.0.0.RELEASE'
4245

4346
// JPA dependencies

dd-java-agent/instrumentation/spring/spring-webflux/spring-webflux-5.0/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ muzzle {
6060

6161
apply from: "$rootDir/gradle/java.gradle"
6262

63-
6463
addTestSuiteForDir('latestDepTest', 'test')
6564
addTestSuiteForDir('latestBoot20Test', 'bootTest')
6665
addTestSuiteForDir('latestBoot24Test', 'bootTest')
@@ -76,6 +75,10 @@ configurations {
7675
latestIast3TestImplementation.extendsFrom(iastTestImplementation)
7776
}
7877

78+
groovySpock {
79+
configureDependencies("testImplementation", libs.spock.spring.groovy4)
80+
}
81+
7982
dependencies {
8083
compileOnly group: 'org.springframework', name: 'spring-webflux', version: '5.0.0.RELEASE'
8184
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.4'
@@ -86,7 +89,6 @@ dependencies {
8689
testImplementation project(':dd-java-agent:instrumentation:reactor-core-3.1')
8790
testImplementation project(':dd-java-agent:instrumentation:reactive-streams')
8891
testImplementation project(':dd-java-agent:instrumentation:reactor-netty-1')
89-
testImplementation libs.spock.spring.groovy4
9092

9193
testImplementation group: 'org.springframework', name: 'spring-webflux', version: '5.0.0.RELEASE'
9294
testImplementation group: 'io.projectreactor.ipc', name: 'reactor-netty', version: '0.7.0.RELEASE'

dd-java-agent/instrumentation/spring/spring-webmvc/spring-webmvc-3.1/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ apply from: "$rootDir/gradle/java.gradle"
3636
addTestSuite("latestDepTest")
3737
addTestSuiteExtendingForDir("latestDepForkedTest", "latestDepTest", "latestDepTest")
3838

39+
groovySpock {
40+
configureDependencies("testImplementation", libs.spock.spring.groovy4)
41+
}
42+
3943
dependencies {
4044
compileOnly group: 'org.springframework', name: 'spring-webmvc', version: '3.1.0.RELEASE'
4145
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
@@ -66,8 +70,6 @@ dependencies {
6670
testImplementation group: 'javax.validation', name: 'validation-api', version: '1.1.0.Final'
6771
testImplementation group: 'org.hibernate', name: 'hibernate-validator', version: '5.4.2.Final'
6872

69-
testImplementation libs.spock.spring.groovy4
70-
7173
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '1.5.17.RELEASE'
7274
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '1.5.17.RELEASE'
7375
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-websocket', version: '1.5.17.RELEASE'

dd-java-agent/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ muzzle {
1010
apply from: "$rootDir/gradle/java.gradle"
1111
apply plugin: 'call-site-instrumentation'
1212

13+
groovySpock {
14+
configureDependencies("testImplementation", libs.spock.spring.groovy4)
15+
}
16+
1317
dependencies {
1418
compileOnly group: 'org.springframework', name: 'spring-webmvc', version: '5.3.23'
1519
compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1'
@@ -21,8 +25,6 @@ dependencies {
2125
testImplementation project(':dd-java-agent:instrumentation:servlet:javax-servlet:javax-servlet-3.0')
2226
testImplementation project(':dd-java-agent:instrumentation:spring:spring-webmvc:spring-webmvc-3.1')
2327

24-
testImplementation libs.spock.spring.groovy4
25-
2628
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.7.5'
2729
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.7.5'
2830

dd-java-agent/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ tasks.withType(GroovyCompile).configureEach {
2727
groovyOptions.setParameters(true)
2828
}
2929

30+
groovySpock {
31+
configureDependencies("testImplementation", libs.spock.spring.groovy4)
32+
}
33+
3034
dependencies {
3135
main_java17CompileOnly(group: 'org.springframework', name: 'spring-webmvc', version: '6.0.0')
3236
main_java17CompileOnly group: 'jakarta.servlet', name: 'jakarta.servlet-api', version: '5.0.0'
@@ -47,8 +51,6 @@ dependencies {
4751
testRuntimeOnly project(':dd-java-agent:instrumentation:websocket:jakarta-websocket-2.0')
4852
testImplementation project(':dd-java-agent:instrumentation:servlet:jakarta-servlet-5.0')
4953

50-
testImplementation libs.spock.spring.groovy4
51-
5254
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '3.0.0'
5355
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '3.0.0'
5456
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '3.0.0'

0 commit comments

Comments
 (0)