-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
173 lines (145 loc) · 5.8 KB
/
build.gradle
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
plugins {
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id 'jacoco'
id 'com.github.spotbugs' version '6.0.6'
id 'org.sonarqube' version '4.3.1.3277'
}
group = 'uk.nhs.prm.repo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '21'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
compile.exclude module: 'activemq-broker'
}
repositories {
mavenCentral()
}
//Without this task two jars are built, the additional "-plain.jar" is not needed
// for more details refer to: https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.and-plain-archives
jar {
enabled = false
}
configurations {
integrationImplementation.extendsFrom testImplementation
integrationRuntime.extendsFrom testRuntime
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-activemq'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation('io.netty:netty-buffer') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec-http') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-codec-http2') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-common') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-handler') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-resolver') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport-classes-epoll') { version { strictly '4.1.104.Final' } }
implementation('io.netty:netty-transport-native-unix-common') { version { strictly '4.1.104.Final' } }
implementation 'org.yaml:snakeyaml:2.2'
implementation 'net.logstash.logback:logstash-logback-encoder:7.0.1'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.2'
implementation 'com.sun.mail:javax.mail:1.6.2'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.github.spotbugs:spotbugs-annotations:4.8.3'
implementation 'junit:junit:4.13.2'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:3.0.1'
implementation 'org.apache.qpid:proton-j:0.34.1'
implementation platform('software.amazon.awssdk:bom:2.20.130')
implementation 'software.amazon.awssdk:cloudwatch'
implementation 'software.amazon.awssdk:sns'
implementation 'software.amazon.awssdk:sqs'
implementation 'software.amazon.awssdk:s3'
implementation 'software.amazon.awssdk:dynamodb'
implementation 'com.amazonaws:amazon-sqs-java-extended-client-lib:1.2.2'
implementation 'software.amazon.sns:sns-extended-client:1.1.3'
implementation 'software.amazon.payloadoffloading:payloadoffloading-common:1.1.1'
// Once we upgrade amazon-sqs-java-messaging-lib to v2 we can remove aws-java-sdk-core and sqs.
implementation 'com.amazonaws:amazon-sqs-java-messaging-lib:1.1.2'
implementation 'com.amazonaws:aws-java-sdk-core:1.12.368'
implementation 'com.amazonaws:aws-java-sdk-sqs:1.12.533'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.hamcrest:hamcrest:2.2'
testImplementation(platform('org.junit:junit-bom:5.10.1'))
testImplementation('org.junit.jupiter:junit-jupiter')
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
testImplementation 'commons-fileupload:commons-fileupload:1.5'
testImplementation 'org.wiremock:wiremock-standalone:3.3.1'
testImplementation 'com.google.guava:guava:33.0.0-jre'
testImplementation 'org.awaitility:awaitility:4.2.0'
integrationImplementation 'com.swiftmq:swiftmq-client:12.5.4'
}
test {
useJUnitPlatform()
}
test.outputs.upToDateWhen { false }
sourceSets {
integration {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
compileClasspath += sourceSets.test.output
runtimeClasspath += sourceSets.test.output
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
task integration(type: Test) {
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
mustRunAfter tasks.test
}
integration.outputs.upToDateWhen { false }
integration {
systemProperty "javax.xml.parsers.SAXParserFactory", "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
shouldRunAfter integration
}
jacocoTestCoverageVerification {
dependsOn jacocoTestReport
}
spotbugsMain {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/main/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsTest {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/test/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsIntegration {
ignoreFailures = true
reports {
html {
enabled = true
destination = file("$buildDir/reports/spotbugs/integration/spotbugs.html")
stylesheet = 'fancy-hist.xsl'
}
}
}
sonar {
properties {
property 'sonar.projectKey', 'prm-orphaned-record-continuity_prm-repo-ehr-transfer-service'
property 'sonar.organization', 'prm-orphaned-record-continuity'
property 'sonar.host.url', 'https://sonarcloud.io'
}
}
check.dependsOn integration