Skip to content

Commit

Permalink
Update libraries (#98)
Browse files Browse the repository at this point in the history
* Update libraries and java version

* Bump wiremock

* Use java 17
  • Loading branch information
wodrobina authored Apr 26, 2024
1 parent 0553d2e commit cd47268
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ subprojects {
mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

task sourceJar(type: Jar) {
from sourceSets.main.allJava
Expand Down
4 changes: 2 additions & 2 deletions wiremock-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.7.12'
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.7.18'
}
}

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

dependencies {
api 'com.github.tomakehurst:wiremock-standalone:2.27.2'
api 'org.wiremock:wiremock-standalone:3.5.3'

implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.common.ClasspathFileSource;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.extension.responsetemplating.ResponseTemplateTransformer;

@AutoConfiguration
@ConditionalOnClass({WireMockServer.class})
Expand All @@ -36,7 +35,6 @@ public WireMockConfiguration wireMockConfiguration(WireMockProperties properties
if(properties.getStubPath() != null) {
config.fileSource(new ClasspathFileSource(properties.getStubPath()));
}
config.extensions(new ResponseTemplateTransformer(false));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void beforeTestMethod(TestContext testContext) {
WireMockServer server = applicationContext.getBean(WireMockServer.class);
server.resetMappings();
if(! stubPath.isEmpty()) {
server.loadMappingsUsing(new JsonFileMappingsSource(new ClasspathFileSource(stubPath)));
server.loadMappingsUsing(new JsonFileMappingsSource(new ClasspathFileSource(stubPath), null));
}
}

Expand Down
6 changes: 3 additions & 3 deletions wiremock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ dependencies {
// See https://github.com/spring-projects/spring-restdocs/releases/tag/v2.0.4.RELEASE
implementation 'org.springframework.restdocs:spring-restdocs-core:2.0.3.RELEASE'
implementation 'com.jayway.jsonpath:json-path:2.8.0'
compileOnly 'junit:junit:4.13.1'
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-core:2.18.0'
compileOnly 'junit:junit:4.13.2'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.11.0'
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
testImplementation 'com.google.guava:guava:30.0-jre'
testImplementation 'org.hamcrest:hamcrest:2.2'
Expand Down

0 comments on commit cd47268

Please sign in to comment.