Skip to content

Commit 2c0b2b2

Browse files
committed
Fix wiremock 3.x Java 11 compatibility for test classpath resolution
1 parent ddc420f commit 2c0b2b2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

httpClient/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,19 @@ repositories {
99
dependencies {
1010
testImplementation group: 'org.testng', name: 'testng', version: '7.5.1'
1111
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.12.1'
12+
}
13+
14+
// wiremock 3.x requires Java 11+; override test classpath attributes so Gradle
15+
// resolves it correctly while keeping production code at Java 8
16+
configurations {
17+
testCompileClasspath {
18+
attributes {
19+
attribute(Attribute.of("org.gradle.jvm.version", Integer), 11)
20+
}
21+
}
22+
testRuntimeClasspath {
23+
attributes {
24+
attribute(Attribute.of("org.gradle.jvm.version", Integer), 11)
25+
}
26+
}
1227
}

0 commit comments

Comments
 (0)