Skip to content

Commit 7339161

Browse files
committed
#315: prevent dependency leaks
1 parent 5df3a7b commit 7339161

File tree

4 files changed

+39
-35
lines changed

4 files changed

+39
-35
lines changed

build.gradle

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,31 @@ dependencies {
3131
jacksonVersion = '2.17.2'
3232
}
3333

34-
compile 'com.squareup.okhttp3:okhttp:4.12.0'
35-
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
36-
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion"
37-
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion"
38-
compile 'org.apache.commons:commons-lang3:3.12.0'
39-
compile 'org.zeroturnaround:zt-exec:1.12'
40-
compile 'org.slf4j:slf4j-api:1.7.36'
41-
compile 'ch.qos.logback:logback-classic:1.5.13'
34+
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
35+
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
36+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion"
37+
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion"
38+
implementation 'org.apache.commons:commons-lang3:3.12.0'
39+
implementation 'org.zeroturnaround:zt-exec:1.12'
40+
implementation 'org.slf4j:slf4j-api:1.7.36'
4241
compileOnly 'junit:junit:4.13.2'
43-
testCompile 'com.sun.jersey:jersey-client:1.19.4'
44-
testCompile 'com.google.guava:guava:33.0.0-jre'
45-
testCompile 'org.springframework:spring-web:5.3.20'
46-
testCompile 'org.apache.httpcomponents:httpclient:4.5.13'
47-
testCompile 'org.assertj:assertj-core:3.22.0'
48-
testCompile 'net.javacrumbs.json-unit:json-unit:2.32.0'
49-
testCompile 'net.javacrumbs.json-unit:json-unit-fluent:2.28.0'
50-
testCompile 'org.eclipse.jetty:jetty-server:9.3.11.v20160721'
51-
testCompile 'org.skyscreamer:jsonassert:1.5.0'
52-
testCompile 'org.mockito:mockito-core:4.2.0'
53-
testCompile 'org.powermock:powermock-module-junit4:2.0.9'
54-
testCompile 'com.github.stefanbirkner:system-rules:1.19.0'
55-
testCompile 'io.projectreactor.ipc:reactor-netty:0.7.15.RELEASE'
56-
testCompile 'io.projectreactor:reactor-test:3.2.3.RELEASE'
57-
testCompile 'org.awaitility:awaitility:4.1.1'
42+
testImplementation 'ch.qos.logback:logback-classic:1.5.13'
43+
testImplementation 'com.sun.jersey:jersey-client:1.19.4'
44+
testImplementation 'com.google.guava:guava:33.0.0-jre'
45+
testImplementation 'org.springframework:spring-web:5.3.20'
46+
testImplementation 'org.apache.httpcomponents:httpclient:4.5.13'
47+
testImplementation 'org.assertj:assertj-core:3.22.0'
48+
testImplementation 'net.javacrumbs.json-unit:json-unit:2.32.0'
49+
testImplementation 'net.javacrumbs.json-unit:json-unit-fluent:2.28.0'
50+
testImplementation 'org.eclipse.jetty:jetty-server:9.3.11.v20160721'
51+
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
52+
testImplementation 'org.mockito:mockito-core:4.2.0'
53+
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
54+
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
55+
testImplementation 'io.projectreactor.ipc:reactor-netty:0.7.15.RELEASE'
56+
testImplementation 'io.projectreactor:reactor-test:3.2.3.RELEASE'
57+
testImplementation 'org.awaitility:awaitility:4.1.1'
58+
5859
}
5960

6061
allprojects { subproj ->

junit5/build.gradle

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,31 @@ repositories {
1717
dependencies {
1818

1919
ext {
20+
jacksonVersion = '2.17.2'
2021
junitJupiterVersion = '5.10.2'
2122
junitPlatformVersion = '1.10.2'
2223
}
2324

2425
compileOnly "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
2526
compileOnly "org.junit.platform:junit-platform-commons:$junitPlatformVersion"
26-
compile(rootProject) {
27+
implementation(rootProject) {
2728
exclude group: 'junit'
2829
}
2930

30-
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
31-
testCompile "org.junit.platform:junit-platform-testkit:$junitPlatformVersion"
32-
testCompile 'org.mockito:mockito-core:4.2.0'
33-
testCompile 'org.assertj:assertj-core:3.21.0'
34-
testCompile 'net.javacrumbs.json-unit:json-unit:2.28.0'
35-
testCompile 'net.javacrumbs.json-unit:json-unit-fluent:2.28.0'
31+
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
32+
testImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
33+
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
34+
testImplementation "org.junit.platform:junit-platform-testkit:$junitPlatformVersion"
35+
testImplementation 'org.mockito:mockito-core:4.2.0'
36+
testImplementation 'org.assertj:assertj-core:3.21.0'
37+
testImplementation 'net.javacrumbs.json-unit:json-unit:2.28.0'
38+
testImplementation 'net.javacrumbs.json-unit:json-unit-fluent:2.28.0'
39+
3640

3741
// Only needed to run tests in an IntelliJ IDEA that bundles an older version
38-
testRuntime("org.junit.platform:junit-platform-launcher:$junitPlatformVersion")
39-
testRuntime("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
40-
testRuntime("org.junit.vintage:junit-vintage-engine:$junitJupiterVersion")
42+
testRuntimeOnly "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
43+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
44+
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junitJupiterVersion"
4145

4246
}
4347

junit5/src/main/java/io/specto/hoverfly/junit5/HoverflyExtensionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import io.specto.hoverfly.junit5.api.HoverflyConfig;
88
import io.specto.hoverfly.junit5.api.HoverflySimulate;
99
import io.specto.hoverfly.junit5.api.UnsetSimulationPreprocessor;
10-
import org.apache.commons.lang3.StringUtils;
1110
import org.junit.platform.commons.util.ReflectionUtils;
1211

1312
import java.nio.file.Path;
1413
import java.nio.file.Paths;
14+
import org.junit.platform.commons.util.StringUtils;
1515

1616
import static io.specto.hoverfly.junit.core.HoverflyConfig.localConfigs;
1717
import static io.specto.hoverfly.junit.core.HoverflyConfig.remoteConfigs;

junit5/src/test/java/io/specto/hoverfly/junit5/HoverflyCustomCaptureTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.specto.hoverfly.junit5;
22

3-
import com.fasterxml.jackson.databind.ObjectMapper;
43
import io.specto.hoverfly.junit.core.Hoverfly;
54
import io.specto.hoverfly.junit.core.HoverflyMode;
65
import io.specto.hoverfly.junit.core.ObjectMapperFactory;

0 commit comments

Comments
 (0)