-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.gradle
More file actions
119 lines (103 loc) · 3.39 KB
/
build.gradle
File metadata and controls
119 lines (103 loc) · 3.39 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.7'
id 'io.spring.dependency-management' version '1.1.7'
id "io.freefair.lombok" version "8.11"
id "checkstyle"
id "com.github.spotbugs" version "6.0.27"
id "jacoco"
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'checkstyle'
apply plugin: "com.github.spotbugs"
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.apache.qpid:qpid-jms-client:2.6.1'
implementation 'org.springframework:spring-jms'
implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3:5.7.2'
implementation 'uk.nhs.connect.iucds:iucds-schema:3.0.RC1.2'
implementation 'org.apache.xmlbeans:xmlbeans:3.1.0'
implementation 'com.rabbitmq.jms:rabbitmq-jms:3.4.0'
testImplementation 'org.mockito:mockito-core:4.4.0'
testImplementation 'org.assertj:assertj-core:3.27.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured:5.5.0'
testImplementation 'io.rest-assured:json-path:5.5.0'
testImplementation 'io.rest-assured:xml-path:5.5.0'
testImplementation 'ca.uhn.hapi.fhir:hapi-fhir-validation-resources-dstu3:7.6.1'
testImplementation 'pl.pragmatists:JUnitParams:1.1.1'
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources {
srcDir file('src/integration-test/resources')
}
}
}
configurations {
integrationTestCompileOnly.extendsFrom testCompileOnly
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
integrationTestAnnotationProcessor.extendsFrom testAnnotationProcessor
}
test {
useJUnitPlatform()
}
jacocoTestReport {
reports {
xml.required = true
}
dependsOn test // tests are required to run before generating the report
}
task integrationTest(type: Test) {
useJUnitPlatform() {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
mustRunAfter(checkstyleMain)
mustRunAfter(checkstyleTest)
mustRunAfter(checkstyleIntegrationTest)
mustRunAfter(spotbugsMain)
mustRunAfter(spotbugsTest)
mustRunAfter(spotbugsIntegrationTest)
}
task staticCodeAnalysis(type: GradleBuild) {
tasks = [
'clean',
'checkstyleMain',
'checkstyleTest',
'checkstyleIntegrationTest',
'spotbugsMain',
'spotbugsTest',
'spotbugsIntegrationTest',
]
}
tasks.withType(com.github.spotbugs.snom.SpotBugsTask) {
excludeFilter = rootProject.file('config/spotbugs/exclude.xml')
reports {
xml.enabled = true
html.enabled = false
}
}
integrationTest.mustRunAfter test
check.dependsOn integrationTest