Skip to content

Commit 59c356b

Browse files
authored
Merge pull request #20 from wiremock/wiremock-4
upgrade dependencies and add build health plugin.
2 parents 47601ca + 843fb62 commit 59c356b

File tree

6 files changed

+46
-13
lines changed

6 files changed

+46
-13
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
18-
jdk: [11, 17]
18+
jdk: [17]
1919
runs-on: ${{ matrix.os }}
2020
env:
2121
JDK_VERSION: ${{ matrix.jdk }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Java
1616
uses: actions/setup-java@v3
1717
with:
18-
java-version: '11'
18+
java-version: '17'
1919
distribution: 'adopt'
2020
- name: Validate Gradle wrapper
2121
uses: gradle/wrapper-validation-action@v1

build.gradle

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ plugins {
1212
id 'eclipse'
1313
id 'project-report'
1414
id 'com.diffplug.spotless' version '6.25.0'
15-
id 'org.wiremock.tools.gradle.wiremock-extension-convention' version '0.2.0'
15+
id 'org.wiremock.tools.gradle.java' version '0.6.0-beta.3'
16+
id 'org.wiremock.tools.gradle.publishing' version '0.6.0-beta.3'
1617
}
1718

1819
repositories {
1920
mavenLocal()
2021
mavenCentral()
2122
}
2223

23-
projects {
24-
ext {
25-
versions = [
26-
wiremock: "3.5.2"
27-
]
28-
}
24+
java {
25+
sourceCompatibility = 17
26+
targetCompatibility = 17
2927
}
3028

3129
allprojects {
@@ -55,20 +53,31 @@ allprojects {
5553
}
5654

5755
dependencies {
58-
api "org.wiremock:wiremock:$versions.wiremock"
59-
// 1.x is not maintained but we need to use to support Java 11. It is in a better state than java-faker, which is also not maintained. Bump to 2.x once we deprecate support for Java 11.
60-
implementation 'net.datafaker:datafaker:1.9.0'
56+
api "org.wiremock:wiremock-core:$versions.wiremock"
57+
api 'com.github.jknack:handlebars:4.5.0'
58+
implementation 'net.datafaker:datafaker:2.5.3'
6159

60+
testImplementation platform('org.junit:junit-bom:5.14.1')
61+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
62+
testImplementation 'org.junit.jupiter:junit-jupiter-params'
63+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter'
64+
testRuntimeOnly 'org.junit.platform:junit-platform-engine:1.14.1'
65+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.14.1'
6266
testImplementation("org.wiremock:wiremock:$versions.wiremock") {
6367
artifact {
6468
classifier = 'tests'
6569
}
6670
}
71+
testImplementation(testFixtures("org.wiremock:wiremock:$versions.wiremock"))
72+
testImplementation("org.wiremock:wiremock-junit5:$versions.wiremock")
73+
testImplementation('org.hamcrest:hamcrest:3.0')
6774
}
6875

6976
shadowJar {
7077
relocate "com.github.jknack", 'wiremock.com.github.jknack'
7178
relocate "net.datafaker", 'wiremock.net.datafaker'
79+
80+
exclude("META-INF/versions/21/**")
7281
}
7382

7483
test {
@@ -78,3 +87,22 @@ test {
7887
exceptionFormat "full"
7988
}
8089
}
90+
91+
tasks.check {
92+
dependsOn(buildHealth)
93+
}
94+
95+
dependencyAnalysis {
96+
issues {
97+
all {
98+
onAny {
99+
severity("fail")
100+
}
101+
}
102+
}
103+
usage {
104+
analysis {
105+
checkSuperClasses(true)
106+
}
107+
}
108+
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ githubRepo = wiremock-faker-extension
55
developer.id=Shreya-7
66
developer.name=Shreya Agarwal
77
developer.email=a.shreya202@gmail.com
8+
wiremockVersion=4.0.0-beta.20
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Sat Oct 14 16:21:37 IST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
plugins {
2+
id 'com.autonomousapps.build-health' version '3.5.0'
3+
}
4+
15
rootProject.name = 'wiremock-faker-extension'

0 commit comments

Comments
 (0)