Skip to content

Commit 710bb25

Browse files
gradle
1 parent 40c3d77 commit 710bb25

File tree

2 files changed

+32
-35
lines changed

2 files changed

+32
-35
lines changed

e2e-tests/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ plugins {
33
id "io.freefair.lombok" version "9.1.0"
44
}
55

6-
apply plugin: 'java'
7-
86
group = 'uk.nhs.adaptors'
97
sourceCompatibility = '21'
108

@@ -18,6 +16,7 @@ dependencies {
1816
implementation 'org.mongodb:mongo-java-driver:3.12.14'
1917
testImplementation(platform('org.junit:junit-bom:6.0.0'))
2018
testImplementation 'org.junit.jupiter:junit-jupiter'
19+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
2120
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.20.0'
2221
testImplementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.20.1'
2322
testImplementation 'commons-io:commons-io:2.21.0'
@@ -26,8 +25,6 @@ dependencies {
2625
testImplementation 'ch.qos.logback:logback-classic:1.5.21'
2726
testImplementation 'org.xmlunit:xmlunit-assertj3:2.11.0'
2827
testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.5.1'
29-
30-
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
3128
}
3229

3330
tasks.withType(Test) {
@@ -41,4 +38,3 @@ test {
4138
useJUnitPlatform()
4239
dependsOn "cleanTest" // never re-use previous test outputs
4340
}
44-

service/build.gradle

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414
}
1515

1616
spotbugs {
17-
toolVersion = '4.9.5'
17+
toolVersion = '4.9.5'
1818
}
1919

2020
apply plugin: 'java'
@@ -24,15 +24,15 @@ apply plugin: "com.github.spotbugs"
2424
apply plugin: 'application'
2525

2626
application {
27-
mainClassName = 'uk.nhs.adaptors.gp2gp.Gp2gpApplication'
27+
mainClassName = 'uk.nhs.adaptors.gp2gp.Gp2gpApplication'
2828
}
2929

3030
group = 'uk.nhs.adaptors'
3131

3232
java {
33-
toolchain {
34-
languageVersion = JavaLanguageVersion.of(21)
35-
}
33+
toolchain {
34+
languageVersion = JavaLanguageVersion.of(21)
35+
}
3636
}
3737

3838
checkstyle {
@@ -78,21 +78,21 @@ dependencies {
7878
testImplementation 'org.springframework.boot:spring-boot-starter-test'
7979
testImplementation "org.assertj:assertj-core:3.27.6"
8080
testImplementation 'org.apache.commons:commons-compress:1.28.0'
81-
testImplementation(platform('org.testcontainers:testcontainers-bom:2.0.2'))
82-
testImplementation 'commons-io:commons-io:2.21.0'
83-
testImplementation 'org.testcontainers:testcontainers'
84-
testImplementation 'org.testcontainers:junit-jupiter'
81+
testImplementation(platform('org.testcontainers:testcontainers-bom:2.0.2'))
82+
testImplementation 'commons-io:commons-io:2.21.0'
83+
testImplementation 'org.testcontainers:testcontainers'
84+
testImplementation 'org.testcontainers:junit-jupiter'
8585
testImplementation 'org.awaitility:awaitility:4.3.0'
8686
testImplementation 'org.wiremock:wiremock-standalone:3.13.1'
8787
testImplementation 'com.squareup.okhttp3:okhttp:5.3.0'
8888
testImplementation 'com.squareup.okhttp3:mockwebserver3:5.3.0'
8989
testImplementation 'com.adobe.testing:s3mock-testcontainers:4.10.0'
9090

91-
spotbugs 'com.github.spotbugs:spotbugs:4.9.8'
92-
spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.8'
91+
spotbugs 'com.github.spotbugs:spotbugs:4.9.8'
92+
spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.8'
9393

94-
pitest 'com.arcmutate:base:1.3.2'
95-
pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
94+
pitest 'com.arcmutate:base:1.3.2'
95+
pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
9696
}
9797

9898
test {
@@ -121,33 +121,35 @@ sourceSets {
121121
}
122122

123123
tasks.register('interoperabilityTestingToolJsonToXml', JavaExec) {
124-
dependsOn 'classes'
125-
mainClass.set('uk.nhs.adaptors.gp2gp.transformjsontoxmltool.TransformJsonToXml')
126-
classpath = sourceSets.main.runtimeClasspath
124+
dependsOn 'classes'
125+
mainClass.set('uk.nhs.adaptors.gp2gp.transformjsontoxmltool.TransformJsonToXml')
126+
classpath = sourceSets.main.runtimeClasspath
127127
}
128128

129129
configurations {
130130
integrationTestCompileOnly.extendsFrom testCompileOnly
131131
integrationTestImplementation.extendsFrom testImplementation
132-
integrationTestRuntime.extendsFrom testRuntime
132+
integrationTestRuntime.extendsFrom testRuntimeOnly
133133
integrationTestAnnotationProcessor.extendsFrom testAnnotationProcessor
134134
}
135135

136136
tasks.register('integrationTest', Test) {
137-
useJUnitPlatform() {
138-
description = 'Runs integration tests.'
139-
group = 'verification'
137+
// Runs integration tests
138+
description = 'Runs integration tests.'
139+
group = 'verification'
140+
141+
// Enable JUnit 5
142+
useJUnitPlatform()
140143

141-
testClassesDirs = sourceSets.integrationTest.output.classesDirs
142-
classpath = sourceSets.integrationTest.runtimeClasspath
143-
shouldRunAfter test
144-
}
144+
testClassesDirs = sourceSets.integrationTest.output.classesDirs
145+
classpath = sourceSets.integrationTest.runtimeClasspath
146+
shouldRunAfter test
145147
}
146148

147149
tasks.withType(Test).configureEach {
148-
testLogging {
149-
events "passed", "skipped", "failed"
150-
}
150+
testLogging {
151+
events "passed", "skipped", "failed"
152+
}
151153
}
152154

153155
check.dependsOn integrationTest
@@ -163,7 +165,7 @@ spotbugsMain {
163165
enabled(true)
164166
}
165167
}
166-
excludeFilter.set(file("spotbugs/exclude.xml"))
168+
excludeFilter.set(file("spotbugs/exclude.xml"))
167169
}
168170

169171
pitest {
@@ -175,7 +177,7 @@ pitest {
175177
features = ["+GIT(from[HEAD~1])"]
176178

177179
// PRs which don't introduce any production code changes, shouldn't fail the Mutation Testing Actions Workflow
178-
failWhenNoMutations = false
180+
failWhenNoMutations = false
179181

180182
mutators = ['STRONGER', 'EXTENDED_ALL']
181183

@@ -198,4 +200,3 @@ sonar {
198200
bootJar {
199201
exclude("**/TransformJsonToXml*")
200202
}
201-

0 commit comments

Comments
 (0)