@@ -3,12 +3,13 @@ plugins {
33 id ' checkstyle'
44 id ' jacoco'
55 id ' java'
6- id " io.freefair.lombok" version " 8.10.2"
7- id ' io.spring.dependency-management' version ' 1.1.0'
8- id ' org.springframework.boot' version ' 2.7.18'
9- id ' com.github.kt3k.coveralls' version ' 2.12.2'
106 id ' com.github.ben-manes.versions' version ' 0.51.0'
11- id ' org.sonarqube' version ' 5.1.0.4882'
7+ id ' com.github.kt3k.coveralls' version ' 2.12.2'
8+ id ' io.freefair.lombok' version ' 8.12'
9+ id ' io.spring.dependency-management' version ' 1.1.7'
10+ id ' org.owasp.dependencycheck' version ' 11.1.1'
11+ id ' org.sonarqube' version ' 6.0.1.5171'
12+ id ' org.springframework.boot' version ' 3.4.1'
1213 id ' uk.gov.hmcts.java' version ' 0.12.63'
1314}
1415
@@ -21,6 +22,10 @@ java {
2122 }
2223}
2324
25+ application {
26+ mainClass = ' uk.gov.hmcts.ccd.casemigration.CaseMigrationRunner'
27+ }
28+
2429sourceSets {
2530 functionalTest {
2631 java {
@@ -61,13 +66,6 @@ configurations {
6166 smokeTestRuntimeOnly. extendsFrom runtimeOnly
6267}
6368
64- // configurations.all {
65- // resolutionStrategy.dependencySubstitution {
66- // substitute module("ch.qos.logback:logback-classic:1.2.12") with project('ch.qos.logback:logback-classic:1.3.14')
67- // substitute module("ch.qos.logback:logback-core:1.2.12") with project('ch.qos.logback:logback-core:1.3.14')
68- // }
69- // }
70-
7169tasks. withType(JavaCompile ) {
7270 options. compilerArgs << " -Xlint:unchecked" << " -Werror"
7371}
@@ -85,10 +83,6 @@ tasks.withType(Test) {
8583 }
8684}
8785
88- test {
89- failFast = true
90- }
91-
9286task functional (type : Test ) {
9387 description = " Runs functional tests"
9488 group = " Verification"
@@ -139,7 +133,7 @@ sonarqube {
139133 property " sonar.projectName" , " ccd-case-migration-starter"
140134 property " sonar.projectKey" , " ccd-case-migration-starter"
141135 property " sonar.exclusions" , " **/exception/*.java,**/domain/*.java,**/common/*.java,**/migration/auth/AuthTokenGeneratorConfiguration.java,**/migration/CaseMigrationRunner.java,**/ccd/HttpMessageConverterConfiguration.java"
142- property " sonar.coverage.jacoco.xmlReportPaths" , " ${ jacocoTestReport. reports.xml.outputLocation } "
136+ property " sonar.coverage.jacoco.xmlReportPaths" , " ${ project.buildDir } / reports/jacoco/test/jacocoTestReport .xml"
143137 }
144138}
145139
@@ -164,102 +158,76 @@ dependencyCheck {
164158repositories {
165159 mavenLocal()
166160 mavenCentral()
167- maven { url ' https://jitpack.io' }
161+ maven { url = ' https://jitpack.io' }
168162}
169163
170164ext {
171- log4JVersion = " 2.20.0"
172- restAssuredVersion = ' 4.3.0!!'
173- lombokVersion = " 1.18.34"
174- junit_version = " 4.12"
175- junitJupiterVersion = ' 5.9.3'
176- junitVintageVersion = ' 5.9.3'
177- powermockVersion = ' 2.0.9'
178- springSecurity = ' 5.8.15'
179- springCloudVersion = ' 2021.0.7'
165+ set(' springCloudVersion' , ' 2024.0.0' )
166+ set(' spring-framework.version' , ' 6.2.1' )
167+ set(' spring-security.version' , ' 6.4.2' )
168+ set(' jackson.version' , ' 2.18.2' )
169+ set(' snakeyaml.version' , ' 2.3' )
170+ log4JVersion = ' 2.24.3'
171+ junitVersion = ' 5.11.4'
172+ junitPlatform = ' 1.11.4'
173+
174+ libraries = [
175+ junit5 : [
176+ " org.junit.jupiter:junit-jupiter-api:${ junitVersion} " ,
177+ " org.junit.jupiter:junit-jupiter-engine:${ junitVersion} " ,
178+ " org.junit.jupiter:junit-jupiter-params:${ junitVersion} " ,
179+ " org.junit.platform:junit-platform-commons:${ junitPlatform} " ,
180+ " org.junit.platform:junit-platform-engine:${ junitPlatform} " ,
181+ " org.apiguardian:apiguardian-api:1.1.2"
182+ ]
183+ ]
180184}
181185
182- ext[' jackson.version' ] = ' 2.16.0'
183- ext[' snakeyaml.version' ] = ' 2.0'
184- ext[' spring-security.version' ] = ' 5.8.15'
185-
186186dependencies {
187- // implementation group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '9.37.2' //Fix for CVE-2023-52428
188-
189- implementation(" org.springframework.cloud:spring-cloud-starter-bootstrap" )
190- implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-actuator'
191-
192- implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-aop'
193- implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-json'
194- implementation group : ' org.springframework' , name : ' spring-context-support'
195- implementation group : ' com.github.hmcts' , name : ' idam-java-client' , version : ' 1.5.5'
196- implementation group : ' com.github.hmcts' , name : ' service-auth-provider-java-client' , version : ' 3.1.4'
197- implementation group : ' com.github.hmcts' , name : ' core-case-data-store-client' , version : ' 4.9.2'
198187
199- testImplementation group : ' org.springframework.boot' , name : ' spring-boot-starter-test'
200- testImplementation group : ' com.github.tomakehurst' , name : ' wiremock' , version : ' 2.33.2'
188+ // start::CVE Vulnerability dependency overrides // MAIN PARENT DEPENDEDNCY
189+ implementation group : ' commons-fileupload' , name : ' commons-fileupload' , version : ' 1.5' // idam-java-client
190+ implementation group : ' commons-io' , name : ' commons-io' , version : ' 2.17.0' // idam-java-client
191+ implementation group : ' org.apache.logging.log4j' , name : ' log4j-api' , version : log4JVersion // spring-cloud-starter-bootstrap
192+ implementation group : ' org.apache.logging.log4j' , name : ' log4j-to-slf4j' , version : log4JVersion // spring-cloud-starter-bootstrap
201193
202- implementation group : ' org.springdoc ' , name : ' springdoc-openapi-ui ' , version : ' 1.7.0 '
194+ testImplementation group : ' org.mockito ' , name : ' mockito-junit-jupiter ' , version :' 5.15.2 ' // spring-boot-starter-test
203195
204- implementation group : ' com.github.hmcts.java-logging' , name : ' logging' , version : ' 6.0.1'
205- implementation group : ' ch.qos.logback' , name : ' logback-classic' , version : ' 1.5.6'
206- implementation group : ' ch.qos.logback' , name : ' logback-core' , version : ' 1.5.6'
196+ // end::CVE Vulnerability dependency overrides // MAIN PARENT DEPENDEDNCY
207197
208- implementation group : ' org.apache.logging.log4j ' , name : ' log4j-api ' , version : log4JVersion
209- implementation group : ' org.apache.logging.log4j ' , name : ' log4j-to-slf4j ' , version : log4JVersion
210- testImplementation group : ' io.rest-assured ' , name : ' rest-assured ' , version : ' 4.5.1 '
198+ // SPRING
199+ implementation group : ' org.springframework ' , name : ' spring-context-support '
200+ implementation group : ' org.springframework.boot ' , name : ' spring-boot-starter-actuator '
211201
202+ implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-aop'
203+ implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-json'
204+ implementation group : ' org.springframework.cloud' , name : ' spring-cloud-starter-bootstrap'
205+ implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-resource-server'
206+ implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-client'
207+ implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-jose'
208+ implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-core'
209+ implementation group : ' org.springframework.security' , name : ' spring-security-config'
210+
211+ implementation group : ' org.springdoc' , name : ' springdoc-openapi-starter-webmvc-ui' , version : ' 2.8.1'
212+
213+ // HMCTS
214+ implementation group : ' com.github.hmcts' , name : ' ccd-client' , version : ' 5.0.3'
215+ implementation group : ' com.github.hmcts' , name : ' idam-java-client' , version : ' 3.0.3'
216+ implementation group : ' com.github.hmcts' , name : ' service-auth-provider-java-client' , version : ' 5.2.0'
217+ implementation group : ' com.github.hmcts.java-logging' , name : ' logging' , version : ' 6.1.6'
218+
219+ testImplementation libraries. junit5
220+ testImplementation group : ' com.github.hmcts' , name : ' fortify-client' , version : ' 1.4.6' , classifier : ' all'
221+ testImplementation group : ' io.rest-assured' , name : ' rest-assured' , version : ' 5.5.0'
212222 testImplementation group : ' org.springframework.boot' , name : ' spring-boot-starter-test'
223+ testImplementation group : ' org.springframework.cloud' , name : ' spring-cloud-starter-contract-stub-runner' , version : ' 4.1.4'
213224
214- testImplementation(' org.junit.jupiter:junit-jupiter:5.9.3' )
215- testImplementation " org.junit.jupiter:junit-jupiter-api:${ junitJupiterVersion} "
216- testRuntimeOnly " org.junit.jupiter:junit-jupiter-engine:${ junitJupiterVersion} "
217- testRuntimeOnly " org.junit.vintage:junit-vintage-engine:${ junitVintageVersion} "
218- testImplementation group :' org.mockito' , name : ' mockito-junit-jupiter' , version :' 3.12.4'
219- testImplementation group : ' org.powermock' , name : ' powermock-api-mockito2' , version : powermockVersion
220- testImplementation group : ' org.powermock' , name : ' powermock-module-junit4' , version : powermockVersion
221- testRuntimeOnly " org.junit.platform:junit-platform-commons:1.9.3"
222- implementation group : ' org.projectlombok' , name : ' lombok' , version : lombokVersion
223- annotationProcessor group : ' org.projectlombok' , name : ' lombok' , version : lombokVersion
224- testAnnotationProcessor group : ' org.projectlombok' , name : ' lombok' , version : lombokVersion
225-
226- testImplementation ' com.github.hmcts:fortify-client:1.3.0:all'
227-
228- implementation group : ' commons-fileupload' , name : ' commons-fileupload' , version : ' 1.5'
229- implementation group : ' commons-io' , name : ' commons-io' , version : ' 2.12.0'
230- implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-resource-server' , version : springSecurity
231- implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-client' , version : springSecurity
232- implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-jose' , version : springSecurity
233- implementation group : ' org.springframework.security' , name : ' spring-security-oauth2-core' , version : springSecurity
234- implementation group : ' org.springframework.security' , name : ' spring-security-config' , version : springSecurity
235225}
236226
237227dependencyManagement {
238228 imports {
239229 mavenBom " org.springframework.cloud:spring-cloud-dependencies:${ springCloudVersion} "
240230 }
241-
242- dependencies {
243- dependency ' com.google.guava:guava:30.1.1-jre'
244-
245- dependencySet(group : ' commons-beanutils' , version : ' 1.9.4' ) {
246- entry ' commons-beanutils'
247- }
248-
249- dependencySet(group : ' io.rest-assured' , version : ' 4.5.1' ) {
250- entry ' json-path'
251- entry ' xml-path'
252- }
253- dependencySet(group : ' org.codehaus.groovy' , version : ' 3.0.17' ) {
254- entry ' groovy'
255- entry ' groovy-xml'
256- entry ' groovy-json'
257- }
258- }
259- }
260-
261- application {
262- mainClass = ' uk.gov.hmcts.reform.migration.CaseMigrationRunner'
263231}
264232
265233bootJar {
@@ -272,27 +240,21 @@ wrapper {
272240 distributionType = Wrapper.DistributionType . ALL
273241}
274242
275- configurations. all {
276- exclude group : ' org.bouncycastle' , module : ' bcprov-jdk15on'
277- exclude group : ' org.springframework.boot' , module : ' spring-boot-starter-logging'
278- exclude group : ' org.springframework.security' , module : ' spring-security-rsa'
279- exclude group : ' ch.qos.logback' , module : ' logback-classic'
280- }
281-
282243test {
283244 timeout = Duration . ofMinutes(30 )
284245 environment(" AZURE_APPLICATIONINSIGHTS_INSTRUMENTATIONKEY" , " some-key" )
285246 systemProperty ' java.locale.providers' , ' COMPAT'
247+ failFast = true
286248
287249 useJUnitPlatform()
288250
289251 testLogging {
290252 events " failed"
291- exceptionFormat " short"
253+ exceptionFormat = " short"
292254
293255 debug {
294256 events " passed" , " started" , " skipped" , " failed"
295- exceptionFormat " full"
257+ exceptionFormat = " full"
296258 }
297259
298260 info. events = [" failed" , " skipped" ]
0 commit comments