-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
199 lines (161 loc) · 5.06 KB
/
build.gradle
File metadata and controls
199 lines (161 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
plugins {
id 'org.springframework.boot' version '3.5.1'
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id "checkstyle"
id "com.github.spotbugs" version "6.4.2"
id "io.freefair.lombok" version "8.14.2"
id 'jacoco'
id 'org.sonarqube' version '6.3.1.5724'
// Mutation testing
id 'info.solidsoft.pitest' version '1.15.0'
id 'com.arcmutate.github' version '2.2.3'
}
spotbugs {
toolVersion = '4.9.5'
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'checkstyle'
apply plugin: "com.github.spotbugs"
apply plugin: 'application'
application {
mainClassName = 'uk.nhs.adaptors.gp2gp.Gp2gpApplication'
}
group = 'uk.nhs.adaptors'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
checkstyle {
toolVersion '10.18.2'
configDirectory = 'checkstyle' as File
}
repositories {
mavenCentral()
}
dependencies {
// Spring
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework:spring-jms'
// Use version specified in spring-boot-starter-web
implementation 'com.fasterxml.jackson.core:jackson-databind'
// WebClient
implementation ('org.springframework.boot:spring-boot-starter-webflux')
// Logging
implementation 'org.springframework.boot:spring-boot-starter-logging'
// Infrastructure
implementation 'software.amazon.awssdk:s3:2.34.0'
implementation ('com.azure:azure-storage-blob:12.31.3')
implementation 'org.apache.qpid:qpid-jms-client:2.9.0'
// Utils
implementation 'org.apache.commons:commons-lang3:3.19.0'
implementation 'javax.xml.soap:javax.xml.soap-api:1.4.0'
implementation 'com.github.spullara.mustache.java:compiler:0.9.14'
implementation 'org.apache.tika:tika-core:3.2.3'
// Fhir
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:7.6.1'
// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation "org.assertj:assertj-core:3.27.5"
testImplementation 'org.apache.commons:commons-compress:1.28.0'
testImplementation 'org.testcontainers:testcontainers:1.21.3'
testImplementation 'org.testcontainers:junit-jupiter:1.21.3'
testImplementation 'org.awaitility:awaitility:4.3.0'
testImplementation 'org.wiremock:wiremock-standalone:3.13.1'
testImplementation 'com.squareup.okhttp3:okhttp:5.1.0'
testImplementation 'com.squareup.okhttp3:mockwebserver3:5.1.0'
testImplementation 'com.adobe.testing:s3mock-testcontainers:4.7.0'
spotbugs 'com.github.spotbugs:spotbugs:4.9.6'
spotbugs 'com.github.spotbugs:spotbugs-annotations:4.9.6'
pitest 'com.arcmutate:base:1.3.2'
pitest 'com.arcmutate:pitest-git-plugin:2.1.0'
}
test {
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
}
dependsOn test // tests are required to run before generating the report
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/intTest/java')
}
resources {
srcDir file('src/intTest/resources')
}
}
}
tasks.register('interoperabilityTestingToolJsonToXml', JavaExec) {
dependsOn 'classes'
mainClass.set('uk.nhs.adaptors.gp2gp.transformjsontoxmltool.TransformJsonToXml')
classpath = sourceSets.main.runtimeClasspath
}
configurations {
integrationTestCompileOnly.extendsFrom testCompileOnly
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
integrationTestAnnotationProcessor.extendsFrom testAnnotationProcessor
}
tasks.register('integrationTest', Test) {
useJUnitPlatform() {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
}
}
tasks.withType(Test).configureEach {
testLogging {
events "passed", "skipped", "failed"
}
}
check.dependsOn integrationTest
spotbugsTest.enabled = false
spotbugsIntegrationTest.enabled = false
spotbugsMain {
reports {
html {
enabled(true)
}
xml {
enabled(true)
}
}
excludeFilter.set(file("spotbugs/exclude.xml"))
}
pitest {
pitestVersion = '1.16.3'
junit5PluginVersion = '1.2.1'
outputFormats = ['gitci']
// git feature limits analysis to contents of PR only
features = ["+GIT(from[HEAD~1])"]
// PRs which don't introduce any production code changes, shouldn't fail the Mutation Testing Actions Workflow
failWhenNoMutations = false
mutators = ['STRONGER', 'EXTENDED_ALL']
threads = project.getGradle().getStartParameter().getMaxWorkerCount()
}
pitestGithub {
deleteOldSummaries = true
}
sonar {
properties {
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.projectKey", "NHSDigital_integration-adaptor-gp2gp")
property("sonar.organization", "nhsdigital")
property("sonar.exclusions", "**/transformjsontoxmltool/*")
}
}
bootJar {
exclude("**/TransformJsonToXml*")
}