-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
564 lines (485 loc) · 23.1 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
plugins {
id 'application'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.springframework.boot' version '3.3.5'
id 'uk.gov.hmcts.java' version '0.12.64'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.gorylenko.gradle-git-properties' version '2.4.2'
id 'info.solidsoft.pitest' version '1.15.0'
id 'jacoco'
id 'project-report'
id 'au.com.dius.pact' version '4.6.16'
id 'net.serenity-bdd.serenity-gradle-plugin' version '4.2.12'
id 'org.sonarqube' version '6.0.1.5171'
id 'com.github.hmcts.rse-cft-lib' version '0.19.1537'
}
application {
mainClass = 'uk.gov.hmcts.probate.BusinessRulesValidationApplication'
group = 'uk.gov.hmcts.probate'
version = "4.0.0"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
jacoco {
toolVersion = '0.8.12'
}
sonarqube {
properties {
property "sonar.projectName", "PROBATE :: BACK-OFFICE"
property "sonar.exclusions", "**/SecurityConfiguration.java,**/BusinessRulesValidationApplication.java,**/AuthCheckerConfiguration.java"
property "sonar.projectKey", "Sols-CCD-Service-API"
property "sonar.jacoco.reportPath", "${layout.buildDirectory.get()}/jacoco/test.exec"
property "sonar.host.url", "https://sonar.reform.hmcts.net/"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
property "sonar.cpd.exclusions", "**/test/**,**/CallbackResponseTransformer.java,**/ResponseCaseData.java,**/CaseData.java,**/BlobUpload.java" +
",**/BusinessRulesValidationApplication.java"
}
}
test.finalizedBy jacocoTestReport
dependencyCheck {
suppressionFile = 'config/owasp/suppressions.xml'
}
pitest {
targetClasses = ['uk.gov.hmcts.probate.*']
threads = 10
outputFormats = ['XML', 'HTML']
timestampedReports = false
mutationThreshold = 50
timeoutConstInMillis = 30000
}
sourceSets {
testSmoke {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/smokeTest/java')
}
resources.srcDir file('src/smokeTest/resources')
}
testFunctional {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/functionalTest/java')
}
resources.srcDir file('src/functionalTest/resources')
}
testCaseCreator {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/caseCreator/java')
}
resources.srcDir file('src/caseCreator/resources')
}
contractTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/contractTest/java')
}
resources.srcDir file('src/contractTest/resources')
}
integrationTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/integrationTest/java')
}
resources.srcDir file('src/integrationTest/resources')
}
}
tasks.withType(Test) {
maxHeapSize = "1024m"
useJUnitPlatform()
}
task smoke(type: Test) {
description = "Runs Smoke Tests"
testClassesDirs = sourceSets.testSmoke.output.classesDirs
classpath = sourceSets.testSmoke.runtimeClasspath
}
task functional(type: Test) {
// PACT_BRANCH_NAME is only set in non-dev environments
if (System.getenv("PACT_BRANCH_NAME") == null) {
doFirst() {
"sh bin/variables/load-local-environment-variables.sh".execute()
}
if (project.file('./.aat-env').exists()) {
project.file('./.aat-env').readLines().each() {
def index = it.indexOf("=")
def key = it.substring(0, index)
def value = it.substring(index + 1)
environment key, value
}
}
}
description = "Runs functional Tests"
testClassesDirs = sourceSets.testFunctional.output.classesDirs
classpath = sourceSets.testFunctional.runtimeClasspath
finalizedBy aggregate
}
functional.finalizedBy(aggregate)
task caseCreator(type: Test) {
description = "Runs functional Case creator Tests"
testClassesDirs = sourceSets.testCaseCreator.output.classesDirs
classpath = sourceSets.testCaseCreator.runtimeClasspath
finalizedBy aggregate
}
task integration(type: Test) {
description = "Runs integration tests"
group = "Verification"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
gitProperties {
gitPropertiesDir = new File("${project.rootDir}/src/main/resources/uk/gov/hmcts/probate/sol")
keys = ['git.commit.id','git.commit.time']
dateFormat = "yyyy-MM-dd'T'HH:mmZ"
dateFormatTimeZone = "GMT"
}
def versions = [
authCheckerLib : '3.0.1',
ccdClient : '5.0.3',
commonsIO : '2.18.0',
commonsValidator : '1.9.0',
documentClient : '1.8.1',
elasticSearchVersion : '7.17.24',
hmctsJavaLogging : '6.1.7',
jacksonDatabind : '2.17.1',
lombok : '1.18.36',
mapStruct : '1.2.0.Final',
pact_version : '4.1.34',
probateCommonsVersion : '2.0.33',
probatePactCommonsVersion : '1.0.2',
restAssured : '5.5.0',
serenity : '4.2.12',
serenityreporter : '4.2.12',
serviceAuthVersion : '5.3.0',
springBootVersion : '3.3.5',
springBootStarterHateoas : '3.3.5',
springCloud : '4.1.4',
springCloudStarterNetflixHystrix: '4.1.3',
springDocOpenUi : '2.6.0',
springSecurityVersion : '6.4.2'
]
jacocoTestReport {
executionData(test,integration)
reports {
xml.required = true
csv.required = false
xml.outputLocation = file("${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.xml")
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.3"
}
}
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: versions.springBootVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web-services', version: versions.springBootVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: versions.springBootVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: versions.springBootVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: versions.springBootVersion
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '2.0.11'
implementation group: 'com.github.hmcts', name: 'probate-commons', version: versions.probateCommonsVersion
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: versions.springCloud
implementation group: 'com.github.hmcts', name: 'ccd-case-document-am-client', version: versions.documentClient
implementation group: 'io.github.openfeign', name: 'feign-jackson', version: '13.5'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: versions.springCloudStarterNetflixHystrix
implementation ('io.github.openfeign.form:feign-form-spring')
implementation group: 'com.google.guava', name: 'guava', version: '33.4.0-jre'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-hateoas', version: versions.springBootStarterHateoas
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: versions.hmctsJavaLogging
implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: versions.hmctsJavaLogging
implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: versions.serviceAuthVersion
implementation group: 'com.github.hmcts', name: 'auth-checker-lib', version: versions.authCheckerLib
implementation group: 'com.github.hmcts', name: 'cmc-pdf-service-client', version: '8.0.1'
implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '4.0.4'
implementation group: 'com.github.hmcts', name: 'life-events-client', version: '1.2.4'
implementation group: 'com.azure', name: 'azure-storage-blob', version: '12.29.0'
implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '8.0'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versions.jacksonDatabind
implementation group: 'commons-io', name: 'commons-io', version: versions.commonsIO
implementation group: 'commons-validator', name: 'commons-validator', version: versions.commonsValidator
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jacksonDatabind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versions.jacksonDatabind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jacksonDatabind
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: versions.springDocOpenUi
implementation group: 'org.projectlombok', name: 'lombok', version: versions.lombok
implementation group:'org.projectlombok', name: 'lombok', version: versions.lombok
annotationProcessor group:'org.projectlombok', name:'lombok', version: versions.lombok
implementation group: 'org.projectlombok', name: 'lombok-mapstruct-binding', version: '0.2.0'
implementation group: 'org.elasticsearch.client', name: 'elasticsearch-rest-high-level-client', version: versions.elasticSearchVersion
implementation group: 'org.elasticsearch.client', name: 'elasticsearch-rest-client', version: versions.elasticSearchVersion
implementation group: 'org.elasticsearch', name: 'elasticsearch', version: versions.elasticSearchVersion
implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '6.3.0'
implementation group: 'io.github.openfeign', name: 'feign-hc5', version: '13.5'
implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.10.0'
implementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.3.1'
implementation group: 'org.pitest', name: 'pitest', version: '1.17.4'
implementation group: 'org.commonmark', name: 'commonmark', version: '0.24.0'
implementation 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.15.0'
implementation 'org.codehaus.sonar-plugins:sonar-pitest-plugin:0.5'
implementation group: 'com.github.hmcts', name: 'core-case-data-store-client', version: versions.ccdClient
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.5'
implementation group: 'org.mapstruct', name: 'mapstruct-jdk8', version: versions.mapStruct
implementation group: 'org.mapstruct', name: 'mapstruct-processor', version: versions.mapStruct
// Notifications client API
implementation group: 'uk.gov.service.notify', name: 'notifications-java-client', version: '5.2.1-RELEASE'
implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.1.8'
annotationProcessor group: 'org.mapstruct', name: 'mapstruct-processor', version: versions.mapStruct
testAnnotationProcessor group:'org.projectlombok', name:'lombok', version: versions.lombok
testImplementation group: 'com.github.hmcts', name: 'probate-commons', version: versions.probateCommonsVersion
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: versions.springBootVersion
testImplementation group: 'com.h2database', name: 'h2', version: '2.3.232'
testImplementation group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.30'
testImplementation group: 'org.springframework.security', name: 'spring-security-test', version: versions.springSecurityVersion
testImplementation group: 'com.mitchellbosecke', name: 'pebble', version: '2.4.0'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-hateoas', version: versions.springBootStarterHateoas
testImplementation group: 'com.github.hmcts', name: 'auth-checker-lib', version: versions.authCheckerLib
testImplementation group: 'org.wiremock', name: 'wiremock-standalone', version: '3.10.0'
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.2.1'
testImplementation group: 'com.github.hmcts', name: 'fortify-client', version: '1.4.6', classifier: 'all'
testImplementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: versions.jacksonDatabind
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.14.2'
testSmokeImplementation group: 'io.rest-assured', name: 'rest-assured', version: versions.restAssured
testSmokeImplementation sourceSets.main.runtimeClasspath
testSmokeImplementation sourceSets.test.runtimeClasspath
testFunctionalImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
testFunctionalImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
testFunctionalImplementation group: 'net.serenity-bdd', name: 'serenity-junit5', version: versions.serenity
testFunctionalImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
testFunctionalImplementation group: 'org.awaitility', name: 'awaitility', version: '3.1.6'
testFunctionalImplementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.12.6'
testFunctionalImplementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: versions.serviceAuthVersion
testFunctionalImplementation group: 'com.github.hmcts', name: 'cmc-pdf-service-client', version: '8.0.1'
testFunctionalImplementation group: 'net.thucydides', name: 'thucydides-core', version: '0.9.275'
testFunctionalImplementation sourceSets.main.runtimeClasspath
testFunctionalImplementation sourceSets.test.runtimeClasspath
testFunctionalAnnotationProcessor group:'org.projectlombok', name: 'lombok', version: versions.lombok
testFunctionalCompileOnly group:'org.projectlombok', name: 'lombok', version: versions.lombok
testFunctionalImplementation group: 'io.github.openfeign.form', name: 'feign-form-spring'
testCaseCreatorImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
testCaseCreatorImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
testCaseCreatorImplementation group: 'net.serenity-bdd', name: 'serenity-junit5', version: versions.serenity
testCaseCreatorImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
testCaseCreatorImplementation group: 'net.serenity-bdd', name: 'serenity-single-page-report', version: versions.serenityreporter
testCaseCreatorImplementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.12.6'
testCaseCreatorImplementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: versions.serviceAuthVersion
testCaseCreatorImplementation sourceSets.main.runtimeClasspath
testCaseCreatorImplementation sourceSets.test.runtimeClasspath
testCaseCreatorAnnotationProcessor group:'org.projectlombok', name: 'lombok', version: versions.lombok
testCaseCreatorCompileOnly group:'org.projectlombok', name: 'lombok', version: versions.lombok
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jacksonDatabind
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versions.jacksonDatabind
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jacksonDatabind
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'java8', version: versions.pact_version
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: versions.pact_version
contractTestRuntimeOnly group: 'au.com.dius.pact.consumer', name: 'java8', version: versions.pact_version
contractTestRuntimeOnly group: 'au.com.dius.pact.consumer', name: 'junit5', version: versions.pact_version
contractTestRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.3")
contractTestImplementation('org.junit.jupiter:junit-jupiter-api:5.11.3')
contractTestRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.11.3'
contractTestImplementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '6.3.0'
contractTestImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
contractTestRuntimeOnly group: 'org.springframework.boot', name: 'spring-boot-starter-test'
contractTestImplementation group: 'com.github.hmcts', name: 'probate-pact-commons', version: versions.probatePactCommonsVersion
contractTestImplementation sourceSets.main.runtimeClasspath
contractTestImplementation sourceSets.test.runtimeClasspath
contractTestAnnotationProcessor group:'org.projectlombok', name: 'lombok', version: versions.lombok
// Provides fast-reload of the probate service upon edit & compile during local development
// cftlibImplementation 'org.springframework.boot:spring-boot-devtools'
integrationTestImplementation sourceSets.main.runtimeClasspath
integrationTestImplementation sourceSets.test.runtimeClasspath
}
configurations.all {
exclude group: 'commons-logging', module: 'commons-logging'
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
// https://github.com/gradle/gradle/issues/16791
tasks.withType(JavaExec).configureEach {
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
}
bootJar {
archiveFileName = 'back-office.jar'
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
}
task printVersion {
doLast {
print project.version
}
}
run {
if (debug == 'true') {
jvmArgs = ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005']
}
}
project.ext {
pacticipant = "probate_backOffice"
pacticipantVersion = getCheckedOutGitCommitHash()
}
task runAndPublishConsumerPactTests(type: Test){
logger.lifecycle("Runs consumer pact tests")
systemProperty 'pact.rootDir', "pacts"
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
}
task fortifyScan(type: JavaExec) {
mainClass.set("uk.gov.hmcts.fortifyclient.FortifyClientMainApp")
classpath += sourceSets.test.runtimeClasspath
jvmArgs = ['--add-opens=java.base/java.lang.reflect=ALL-UNNAMED']
}
task highLevelDataSetup(type: JavaExec) {
onlyIf {
return false
}
}
check.dependsOn(integration)
tasks.withType(Copy).all { duplicatesStrategy 'exclude' }
static def getCheckedOutGitCommitHash() {
'git rev-parse --verify --short HEAD'.execute().text.trim()
}
pact {
broker {
pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:80'
}
publish {
pactDirectory = 'pacts'
tags = [System.getenv("PACT_BRANCH_NAME") ?:'Dev']
version = project.pacticipantVersion
}
}
runAndPublishConsumerPactTests.finalizedBy pactPublish
// Build the back office excel file.
task buildBackOfficeXlsx(type: Exec) {
environment 'CCD_DEF_CASE_SERVICE_BASE_URL', 'localhost:4104'
def input = project.file('ccdImports/configFiles/CCD_Probate_Backoffice')
commandLine project.file("ccdImports/conversionScripts/convertJsonToXLS.sh")
args input
// Register the inputs and outputs so Gradle can skip if up-to-date.
inputs.dir input
outputs.file project.file('jsonToXLS/CCD_Probate_Backoffice.xlsx')
}
// Build the all excel files.
task buildAllXlsx(type: Exec) {
def input = 'localhost:4104'
def input2 = 'aac-manage-case-assignment-aat.service.core-compute-aat.internal'
commandLine project.file("ccdImports/conversionScripts/createAllXLS.sh")
args input, input2
// Register the inputs and outputs so Gradle can skip if up-to-date.
outputs.dir project.file('jsonToXLS')
}
// Force Build the all excel files.
task forceBuildAllXlsx(type: Exec) {
def input = 'localhost:4104'
def input2 = 'aac-manage-case-assignment-aat.service.core-compute-aat.internal'
commandLine project.file("ccdImports/conversionScripts/createAllXLS.sh")
args input, input2
}
//import all excel files.
task importAllXlsx(type: Exec) {
doFirst() {
"sh bin/variables/load-local-environment-variables.sh".execute()
}
if (project.file('./.aat-env').exists()) {
project.file('./.aat-env').readLines().each() {
def index = it.indexOf("=")
def key = it.substring(0, index)
def value = it.substring(index + 1)
environment key, value
}
}
commandLine project.file("ccdImports/conversionScripts/importAllXLS.sh")
}
task buildAndImportAllXlsx(type: Exec) {
dependsOn forceBuildAllXlsx
doFirst() {
"sh bin/variables/load-local-environment-variables.sh".execute()
}
if (project.file('./.aat-env').exists()) {
project.file('./.aat-env').readLines().each() {
def index = it.indexOf("=")
def key = it.substring(0, index)
def value = it.substring(index + 1)
environment key, value
}
}
commandLine project.file("ccdImports/conversionScripts/importAllXLS.sh")
}
bootWithCCD {
// Request the cftlib create the probate_man database
environment 'RSE_LIB_ADDITIONAL_DATABASES', 'probate_man'
environment 'PROBATE_POSTGRESQL_PORT', '6432'
environment 'PROBATE_POSTGRESQL_USER', 'postgres'
environment 'PROBATE_POSTGRESQL_PASSWORD', 'postgres'
if (new Boolean(System.getenv('USE_LOCAL_SUPPORT_SERVICES'))) {
dependsOn buildBackOfficeXlsx
authMode = uk.gov.hmcts.rse.AuthMode.Local
environment 'IDAM_S2S_URL', 'http://localhost:8489'
environment 'IDAM_SERVICE_HOST', 'http://localhost:5000'
} else {
doFirst() {
"sh bin/variables/load-local-environment-variables.sh".execute()
}
if (project.file('./.aat-env').exists()) {
project.file('./.aat-env').readLines().each() {
def index = it.indexOf("=")
def key = it.substring(0, index)
def value = it.substring(index + 1)
environment key, value
}
}
dependsOn buildAllXlsx
}
}
task reloadLocalEnvVars() {
doFirst() {
"sh bin/variables/load-local-environment-variables.sh".execute()
}
}
bootJar {
getArchiveFileName().set(provider {
'back-office.jar'
})
manifest {
attributes('Implementation-Version': project.version.toString())
}
dependencyCheck {
analyzers {
nodeAudit {
yarnEnabled = false
}
}
}
}
rootProject.tasks.named("processResources") {
dependsOn("generateGitProperties")
}
processContractTestResources {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
bootJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
distTar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
distZip {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}