Skip to content

Commit cd47268

Browse files
authored
Update libraries (#98)
* Update libraries and java version * Bump wiremock * Use java 17
1 parent 0553d2e commit cd47268

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ jobs:
1616
- name: Set up JDK
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
20-
distribution: 'zulu'
19+
java-version: 17
20+
distribution: 'temurin'
21+
cache: gradle
2122
- name: Cache Gradle packages
2223
uses: actions/cache@v3
2324
with:

.github/workflows/test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
1717
- name: Set up JDK
1818
uses: actions/setup-java@v3
1919
with:
20-
java-version: 11
21-
distribution: 'zulu'
20+
java-version: 17
21+
distribution: 'temurin'
22+
cache: gradle
2223
- name: Cache SonarCloud packages
2324
uses: actions/cache@v3
2425
with:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ subprojects {
4040
mavenCentral()
4141
}
4242

43-
sourceCompatibility = 1.8
44-
targetCompatibility = 1.8
43+
sourceCompatibility = JavaVersion.VERSION_17
44+
targetCompatibility = JavaVersion.VERSION_17
4545

4646
task sourceJar(type: Jar) {
4747
from sourceSets.main.allJava

wiremock-spring-boot-starter/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
mavenCentral()
44
}
55
dependencies {
6-
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.7.12'
6+
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.7.18'
77
}
88
}
99

@@ -17,7 +17,7 @@ group = 'com.epages'
1717
description = 'Spring Boot Starter for adding a WireMock server to your integration test'
1818

1919
dependencies {
20-
api 'com.github.tomakehurst:wiremock-standalone:2.27.2'
20+
api 'org.wiremock:wiremock-standalone:3.5.3'
2121

2222
implementation 'org.springframework.boot:spring-boot-starter-test'
2323
implementation 'org.springframework.boot:spring-boot-starter'

wiremock-spring-boot-starter/src/main/java/com/epages/wiremock/starter/WireMockAutoConfiguration.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.github.tomakehurst.wiremock.WireMockServer;
1313
import com.github.tomakehurst.wiremock.common.ClasspathFileSource;
1414
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
15-
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;
1615

1716
@AutoConfiguration
1817
@ConditionalOnClass({WireMockServer.class})
@@ -36,7 +35,6 @@ public WireMockConfiguration wireMockConfiguration(WireMockProperties properties
3635
if(properties.getStubPath() != null) {
3736
config.fileSource(new ClasspathFileSource(properties.getStubPath()));
3837
}
39-
config.extensions(new ResponseTemplateTransformer(false));
4038
return config;
4139
}
4240

wiremock-spring-boot-starter/src/main/java/com/epages/wiremock/starter/WireMockListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void beforeTestMethod(TestContext testContext) {
7373
WireMockServer server = applicationContext.getBean(WireMockServer.class);
7474
server.resetMappings();
7575
if(! stubPath.isEmpty()) {
76-
server.loadMappingsUsing(new JsonFileMappingsSource(new ClasspathFileSource(stubPath)));
76+
server.loadMappingsUsing(new JsonFileMappingsSource(new ClasspathFileSource(stubPath), null));
7777
}
7878
}
7979

wiremock/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ dependencies {
33
// See https://github.com/spring-projects/spring-restdocs/releases/tag/v2.0.4.RELEASE
44
implementation 'org.springframework.restdocs:spring-restdocs-core:2.0.3.RELEASE'
55
implementation 'com.jayway.jsonpath:json-path:2.8.0'
6-
compileOnly 'junit:junit:4.13.1'
7-
testImplementation 'junit:junit:4.13.1'
8-
testImplementation 'org.mockito:mockito-core:2.18.0'
6+
compileOnly 'junit:junit:4.13.2'
7+
testImplementation 'junit:junit:4.13.2'
8+
testImplementation 'org.mockito:mockito-core:5.11.0'
99
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
1010
testImplementation 'com.google.guava:guava:30.0-jre'
1111
testImplementation 'org.hamcrest:hamcrest:2.2'

0 commit comments

Comments
 (0)