-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
572 lines (498 loc) · 25.3 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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'net.serenity-bdd:serenity-gradle-plugin:2.4.34'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.15.0'
}
}
plugins {
id 'application'
id 'uk.gov.hmcts.java' version '0.12.63'
id 'pmd'
id 'jacoco'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.springframework.boot' version '2.7.18'
id 'info.solidsoft.pitest' version '1.15.0'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'org.sonarqube' version '4.4.1.3373'
id 'com.github.spacialcircumstances.gradle-cucumber-reporting' version '0.1.25'
id 'au.com.dius.pact' version '4.3.12' //don't upgrade or downgrade this or serenity reports will fail to generate
id 'org.owasp.dependencycheck' version '10.0.3'
id 'org.flywaydb.flyway' version '8.5.13'
}
apply plugin: 'info.solidsoft.pitest'
apply plugin: 'java'
apply plugin: 'net.serenity-bdd.aggregator'
apply plugin: 'project-report'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
ext['snakeyaml.version'] = '2.0'
def versions = [
junit : '5.9.3',
lombok : '1.18.36',
gradlePitest : '1.3.0',
pitest : '1.17.0',
reformLogging : '6.1.7',
reformS2sClient : '4.0.2',
serenity : '2.2.12',
sonarPitest : '0.5',
springBoot : '2.7.18',
spring : '5.3.39',
springSecurity : '5.8.16',
springHystrix : '2.1.1.RELEASE',
swagger2Version : '3.0.0',
tomcat : '9.0.97',
pact_version : '4.1.7',
rest_assured : '3.3.0',
cucumber : '5.7.0',
feign_jackson : '13.5',
jacksondata : '2.18.2',
log4JVersion : '2.24.2',
logbackVersion : '1.2.13'
]
mainClassName = 'uk.gov.hmcts.reform.judicialbooking.JudicialBookingApplication'
def jarName = 'am-judicial-booking-service.jar'
pmd {
toolVersion = '6.55.0'
sourceSets = []
}
group = 'uk.gov.hmcts.reform.judicialbooking'
version = '0.0.1'
tasks.withType(JavaExec).configureEach {
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.0
}
}
}
}
configurations {
functionalTestCompile.extendsFrom testCompile
functionalTestRuntime.extendsFrom testRuntime
cucumberRuntime.extendsFrom(functionalRuntime)
contractTestCompile.extendsFrom testCompile
contractTestRuntime.extendsFrom testRuntime
}
sourceSets {
functionalTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/functionalTest/java')
}
resources.srcDir file('src/functionalTest/resources')
}
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integrationTest/java')
}
resources.srcDir file('src/integrationTest/resources')
}
smokeTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/smokeTest/java')
}
resources.srcDir file('src/smokeTest/resources')
}
contractTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/contractTest/java')
}
resources.srcDir file('src/contractTest/resources')
}
}
idea {
module {
// config to allow Intelij to mark test source and resource files correctly to help linting tools
testSources.from(java.sourceSets.functionalTest.java.srcDirs)
testSources.from(java.sourceSets.integrationTest.java.srcDirs)
testSources.from(java.sourceSets.smokeTest.java.srcDirs)
testSources.from(java.sourceSets.contractTest.java.srcDirs)
testResources.from(java.sourceSets.functionalTest.resources.srcDirs)
testResources.from(java.sourceSets.integrationTest.resources.srcDirs)
testResources.from(java.sourceSets.smokeTest.resources.srcDirs)
testResources.from(java.sourceSets.contractTest.resources.srcDirs)
}
}
project.ext {
pacticipant = 'accessMgmt_judicialBooking'
if (System.env.GIT_COMMIT) {
// DTSAM-379 canIDeploy Index 0 out of bounds for length 0 Issue
pacticipantVersion = System.env.GIT_COMMIT.substring(0,9)
} else {
// DTSAM-382 GIT_COMMIT null in local build fix
pacticipantVersion = getCheckedOutGitCommitHash()
}
}
static def getCheckedOutGitCommitHash() {
'git rev-parse --verify --short HEAD'.execute().text.trim()
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Werror"
}
task functional(type: JavaExec) {
description = "Runs the functional tests"
group = "Verification"
generateCucumberReports.enabled = false
main("uk.gov.hmcts.reform.judicialbooking.befta.JudicialBookingAmBeftaMain")
classpath += configurations.cucumberRuntime + sourceSets.functionalTest.runtimeClasspath + sourceSets.main.output + sourceSets.test.output
args = ['--strict', '--tags', 'not @Ignore',
'--plugin', "json:${rootDir}/target/cucumber.json", '--plugin', "junit:${buildDir}/test-results/functional/cucumber.xml",
'--glue', 'uk.gov.hmcts.befta.player', 'src/functionalTest/resources/features'
]
// '--add-opens=...' added to suppress 'WARNING: An illegal reflective access operation has occurred' in uk.gov.hmcts.befta.util.CucumberStepAnnotationUtils
jvmArgs '--add-opens=java.base/java.lang.reflect=ALL-UNNAMED'
// Configure array order in FTAs
environment "DEFAULT_COLLECTION_ASSERTION_MODE", "UNORDERED"
finalizedBy {
generateCucumberReports.enabled = true
generateCucumberReports {
doLast{
def functionalReportsFolder = "${rootDir}/target/cucumber/functional-html-reports/"
delete functionalReportsFolder
new File(functionalReportsFolder).mkdirs()
file("${rootDir}/target/cucumber/cucumber-html-reports").renameTo(file(functionalReportsFolder))
logger.quiet("Functional test report moved to ---> file://$functionalReportsFolder/overview-features.html")
}
}
}
outputs.upToDateWhen { false }
}
task integration(type: Test, description: 'Runs the integration tests.', group: 'Verification') {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
serenity.outputDirectory = file("${projectDir}/integrationTest/site/reports")
finalizedBy aggregate
}
check.dependsOn integration
task smoke(type: Test, description: 'Runs the smoke tests.', group: 'Verification') {
testClassesDirs = sourceSets.smokeTest.output.classesDirs
classpath = sourceSets.smokeTest.runtimeClasspath
finalizedBy aggregate
}
task fortifyScan(type: JavaExec) {
main("uk.gov.hmcts.fortifyclient.FortifyClientMainApp")
classpath += sourceSets.test.runtimeClasspath
jvmArgs = ['--add-opens=java.base/java.lang.reflect=ALL-UNNAMED']
// The line below prevents the build from failing if the Fortify scan detects issues
ignoreExitValue(true)
}
task contract(type: Test) {
description = 'Runs the consumer Pact tests'
useJUnitPlatform()
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
include "uk/gov/hmcts/reform/orgrolemapping/**"
systemProperty 'pact.rootDir', "pacts"
}
task runAndPublishConsumerPactTests(type: Test, description: 'Publish pact test to broker.', group: 'Verification') {
useJUnitPlatform()
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
include "uk/gov/hmcts/reform/judicialbooking/**"
include "uk/gov/hmcts/reform/orgrolemapping/**"
systemProperty 'pact.rootDir', "pacts"
}
runAndPublishConsumerPactTests.finalizedBy pactPublish
task runProviderPactVerification(type: Test) {
useJUnitPlatform()
logger.lifecycle("Runs provider pact Tests")
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
if (project.hasProperty('pact.verifier.publishResults')) {
systemProperty 'pact.verifier.publishResults', project.property('pact.verifier.publishResults')
}
systemProperty 'pact.provider.version', project.pacticipantVersion
include "uk/gov/hmcts/reform/judicialbooking/**"
}
runProviderPactVerification.dependsOn contract
runProviderPactVerification.finalizedBy pactVerify
pact {
broker {
pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:9292'
}
publish {
pactDirectory = 'pacts'
version = project.pacticipantVersion
tags = [System.getenv("PACT_BRANCH_NAME") ?: 'Dev']
}
}
jacocoTestReport {
executionData(test)
reports {
xml.required = true
csv.required = false
xml.outputLocation = file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
}
project.tasks['sonarqube'].dependsOn jacocoTestReport
jacoco {
toolVersion = "0.8.8"
}
task migratePostgresDatabase(type: org.flywaydb.gradle.task.FlywayMigrateTask) {
baselineOnMigrate = true
outOfOrder = true
if (project.hasProperty("dburl")) {
url = "jdbc:postgresql://${dburl}"
}
}
pitest {
pitestVersion = versions.pitest
targetClasses = ['uk.gov.hmcts.reform.*']
excludedClasses = ['uk.gov.hmcts.reform.judicialbooking.JudicialBookingApplication',
'uk.gov.hmcts.reform.judicialbooking.util.Swagger2SpringBoot',
'uk.gov.hmcts.reform.judicialbooking.config.*',
'uk.gov.hmcts.reform.judicialbooking.controller.advice.ErrorConstants',
'uk.gov.hmcts.reform.judicialbooking.configuration.*',
'uk.gov.hmcts.reform.judicialbooking.apihelper.*',
'uk.gov.hmcts.reform.judicialbooking.model.*',
'uk.gov.hmcts.reform.judicialbooking.util.Swagger2SpringBoot$ExitException']
threads = 15
outputFormats = ['XML', 'HTML']
timestampedReports = true
mutationThreshold = 40
}
sonarqube {
properties {
property "sonar.projectName", "tempered:am-judicial-booking-service"
property "sonar.projectKey", "tempered:am-judicial-booking-service"
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
property "sonar.exclusions",
"src/main/java/uk/gov/hmcts/reform/judicialbooking/*Application.java," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/util/*Swagger2SpringBoot.java," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/controller/advice/*ErrorConstants.java," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/controller/advice/exception/**," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/config/**," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/model/enums/**," +
"src/main/java/uk/gov/hmcts/reform/judicialbooking/apihelper/**"
property "sonar.junit.reportPaths", "${project.buildDir}/test-results/junit-platform"
}
}
project.tasks['sonarqube'].dependsOn test, integration, jacocoTestReport
project.tasks['sonarqube'].group = "Verification"
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all {
def isNonStable = { String version ->
['alpha', 'beta', 'rc', 'cr', 'm', 'preview', 'b', 'ea'].any { qualifier ->
version ==~ /(?i).*[.-]\$qualifier[.\\d-+]*/
}
}
if (isNonStable(candidate.version) && !isNonStable(currentVersion)) {
selection.reject('Release candidate')
}
}
}
}
//https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html
dependencyCheck {
suppressionFile = 'config/owasp/suppressions.xml'
}
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://jitpack.io'
}
}
tasks.named('integration') {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
dependencies {
implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: versions.springBoot) {
exclude group: 'org.glassfish', module: 'jakarta.el'
}
implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: versions.springBoot)
implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: versions.springBoot)
implementation(group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: versions.springBoot)
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-cache'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-client'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-resource-server'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: '3.1.9'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix', version: '2.2.10.RELEASE'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '2.2.10.RELEASE'
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '2.0.10'
implementation group: 'org.springframework.security', name: 'spring-security-core', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-web', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-config', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-client', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-core', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-jose', version: versions.springSecurity
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-resource-server', version: versions.springSecurity
implementation group: 'org.springframework', name: 'spring-core', version: versions.spring
implementation group: 'org.springframework', name: 'spring-beans', version: versions.spring
implementation group: 'org.springframework', name: 'spring-aop', version: versions.spring
implementation group: 'org.springframework', name: 'spring-aspects', version: versions.spring
implementation group: 'org.springframework', name: 'spring-context', version: versions.spring
implementation group: 'org.springframework', name: 'spring-context-support', version: versions.spring
implementation group: 'org.springframework', name: 'spring-expression', version: versions.spring
implementation group: 'org.springframework', name: 'spring-jcl', version: versions.spring
implementation group: 'org.springframework', name: 'spring-jdbc', version: versions.spring
implementation group: 'org.springframework', name: 'spring-orm', version: versions.spring
implementation group: 'org.springframework', name: 'spring-tx', version: versions.spring
implementation group: 'org.springframework', name: 'spring-web', version: versions.spring
implementation group: 'org.springframework', name: 'spring-webmvc', version: versions.spring
implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.8.0'
implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
implementation 'commons-io:commons-io:20030203.000550'
implementation group: 'org.flywaydb', name: 'flyway-core', version: '8.5.13'
implementation group: 'com.google.guava', name: 'guava', version: '33.3.1-jre'
implementation group: 'javax.inject', name: 'javax.inject', version: '1'
implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.1.8'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: versions.tomcat
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: versions.tomcat
implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.4'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jacksondata
implementation group: 'com.fasterxml.jackson', name: 'jackson-bom', version: versions.jacksondata, ext: 'pom'
implementation group: 'com.nimbusds', name: 'lang-tag', version: '1.7'
implementation group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '9.47'
implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.5'
//Added for S2S and User Authentication
implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: versions.reformS2sClient
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '2.0.1'
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: versions.reformLogging
implementation group: 'com.microsoft.azure', name: 'applicationinsights-spring-boot-starter', version: '2.6.4'
implementation group: 'io.projectreactor', name: 'reactor-core', version: '3.6.11'
testImplementation('org.springframework.cloud:spring-cloud-contract-wiremock:3.1.10')
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: versions.springBoot
testImplementation('com.opentable.components:otj-pg-embedded:1.1.0')
testImplementation('com.github.tomakehurst:wiremock-jre8:2.35.2')
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.16'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: versions.junit
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: versions.junit
testImplementation group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.9.3'
testImplementation group: 'org.pitest', name: 'pitest', version: versions.pitest
testImplementation group: 'info.solidsoft.gradle.pitest', name:'gradle-pitest-plugin', version: '1.15.0'
testImplementation 'org.codehaus.sonar-plugins:sonar-pitest-plugin:0.5'
testImplementation group: 'io.cucumber', name: 'cucumber-java', version: versions.cucumber
testImplementation group: 'io.cucumber', name: 'cucumber-junit', version: versions.cucumber
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: versions.rest_assured
testImplementation group: 'io.github.openfeign', name: 'feign-jackson', version: versions.feign_jackson
testImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
testImplementation group: 'net.serenity-bdd', name: 'serenity-junit', version: versions.serenity
testImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
testImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
testImplementation 'com.github.hmcts:befta-fw:9.1.0'
testImplementation 'com.github.hmcts:fortify-client:1.4.5:all'
smokeTestImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
smokeTestImplementation group: 'net.serenity-bdd', name: 'serenity-junit', version: versions.serenity
smokeTestImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
smokeTestImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
smokeTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: versions.rest_assured
smokeTestImplementation group: 'commons-io', name: 'commons-io', version: '20030203.000550'
// AM-467-Serenity report for Integration test
integrationTestImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
integrationTestImplementation group: 'net.serenity-bdd', name: 'serenity-junit', version: versions.serenity
integrationTestImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
integrationTestImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
integrationTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: versions.rest_assured
implementation group: 'org.pitest', name: 'pitest-junit5-plugin', version: '1.2.1'
compileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok
smokeTestCompileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
smokeTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok
contractTestImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: versions.springBoot
contractTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: versions.pact_version
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'java8', version: versions.pact_version
contractTestImplementation group: 'au.com.dius.pact.provider', name: 'junit5', version: versions.pact_version
contractTestImplementation group: 'au.com.dius.pact.provider', name: 'spring', version: versions.pact_version
contractTestImplementation group: 'au.com.dius.pact.provider', name: 'junit5spring', version: versions.pact_version
integrationTestImplementation sourceSets.main.runtimeClasspath
integrationTestImplementation sourceSets.test.runtimeClasspath
functionalTestImplementation sourceSets.main.runtimeClasspath
functionalTestImplementation sourceSets.test.runtimeClasspath
smokeTestImplementation sourceSets.main.runtimeClasspath
smokeTestImplementation sourceSets.test.runtimeClasspath
contractTestImplementation sourceSets.main.runtimeClasspath
contractTestImplementation sourceSets.test.runtimeClasspath
}
test {
generateCucumberReports.enabled = false
useJUnitPlatform()
failFast = true
}
bootJar {
archiveFileName = jarName
manifest {
attributes('Implementation-Version': project.version.toString())
}
}
dependencyManagement {
dependencies {
dependencySet(group: 'org.apache.logging.log4j', version: versions.log4JVersion) {
entry 'log4j-api'
entry 'log4j-to-slf4j'
}
dependencySet(group: 'ch.qos.logback', version: versions.logbackVersion) {
entry 'logback-classic'
entry 'logback-core'
}
dependencySet(group: 'com.fasterxml.jackson.core', version: versions.jacksondata) {
entry 'jackson-databind'
entry 'jackson-core'
entry 'jackson-annotations'
}
}
}
configurations.all {
exclude group: "org.glassfish", module: "jakarta.el"
exclude group: 'io.github.x-stream', module: 'mxparser'
exclude group: 'io.netty', module: 'netty-tcnative-classes'
}
cucumberReports {
outputDir = file("${projectDir}/target/cucumber")
reports = files("${projectDir}/target/cucumber.json")
}
// Gradle 7.x issue, workaround from: https://github.com/gradle/gradle/issues/17236#issuecomment-894768083
rootProject.tasks.named("processSmokeTestResources") {
duplicatesStrategy = 'include'
}
rootProject.tasks.named("processFunctionalTestResources") {
duplicatesStrategy = 'include'
}
rootProject.tasks.named("processIntegrationTestResources") {
duplicatesStrategy = 'include'
}
rootProject.tasks.named("processContractTestResources") {
duplicatesStrategy = 'include'
}