Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 41 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
flywayVersion = '11.20.3'
flywayVersion = '12.5.0'
postgresqlVersion = '42.7.11'
}
dependencies {
Expand All @@ -16,10 +16,10 @@ plugins {
id 'jacoco'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.flywaydb.flyway' version "$flywayVersion"
id 'org.springframework.boot' version '3.5.14'
id 'org.owasp.dependencycheck' version '12.2.1'
id 'com.github.ben-manes.versions' version '0.53.0'
id 'org.sonarqube' version '6.3.1.5724'
id 'org.springframework.boot' version '4.0.6'
id 'org.owasp.dependencycheck' version '12.2.2'
id 'com.github.ben-manes.versions' version '0.54.0'
id 'org.sonarqube' version '7.3.0.8198'
}

group = 'uk.gov.hmcts.reform'
Expand Down Expand Up @@ -58,6 +58,9 @@ sourceSets {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Werror"
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += "-parameters"
}

tasks.withType(JavaExec).configureEach {
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
Expand Down Expand Up @@ -91,7 +94,7 @@ tasks.withType(Test) {
}
}

task fortifyScan(type: JavaExec) {
tasks.register('fortifyScan', JavaExec) {
main = "uk.gov.hmcts.fortifyclient.FortifyClientMainApp"
classpath += sourceSets.test.runtimeClasspath
jvmArgs = ['--add-opens=java.base/java.lang.reflect=ALL-UNNAMED']
Expand Down Expand Up @@ -160,7 +163,7 @@ dependencyCheck {
}

def versions = [
reformLogging: '6.1.9',
reformLogging: '8.0.0',
flyway: "$flywayVersion",
postgresql: "$postgresqlVersion"
]
Expand All @@ -175,63 +178,66 @@ repositories {
}

dependencies {
implementation group:'org.springframework.boot', name:'spring-boot-flyway'
runtimeOnly group: 'org.flywaydb', name: 'flyway-database-postgresql', version: versions.flyway
implementation group: 'org.flywaydb', name: 'flyway-core', version: versions.flyway
implementation group: 'org.postgresql', name: 'postgresql', version: versions.postgresql
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-spring', version: '6.10.0'
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-provider-jdbc', version: '6.10.0'
implementation group: 'com.azure', name: 'azure-storage-blob', version: '12.30.1'
implementation group: 'com.azure', name: 'azure-messaging-servicebus', version: '7.17.17'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-spring', version: '7.7.0'
implementation group: 'net.javacrumbs.shedlock', name: 'shedlock-provider-jdbc', version: '7.7.0'
implementation group: 'com.azure', name: 'azure-storage-blob', version: '12.33.4'
implementation group: 'com.azure', name: 'azure-messaging-servicebus', version: '7.17.18'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webmvc'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-activemq'
implementation group: 'com.github.java-json-tools', name: 'json-schema-validator', version: '2.2.14'
implementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.6.1'
implementation group: 'org.apache.httpcomponents.core5', name: 'httpcore5', version: '5.4.2'
implementation group: 'org.apache.httpcomponents.core5', name: 'httpcore5-h2', version: '5.4.2'
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.17'
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '3.0.3'
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: versions.reformLogging
implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: versions.reformLogging
implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '8.1'
implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: '6.1.9'
implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '9.0'
implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '5.3.3'
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '3.0.5'
implementation group: 'com.github.hmcts', name: 'ccd-case-document-am-client', version: '1.59.2'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.20.0'
implementation group: 'commons-io', name: 'commons-io', version: '2.21.0'
implementation group: 'io.vavr', name: 'vavr', version: '0.11.0'
implementation group: 'commons-io', name: 'commons-io', version: '2.22.0'
implementation group: 'io.vavr', name: 'vavr', version: '1.0.1'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.14.1'
implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.2.4'
implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '7.13.4'
implementation group: 'org.checkerframework', name: 'checker-qual', version: '3.55.1'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '4.3.2'
implementation group: 'org.checkerframework', name: 'checker-qual', version: '4.1.0'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '5.0.1'
implementation group: 'com.github.hmcts', name: 'fortify-client', version: '1.4.10', classifier: 'all'

testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-webmvc-test'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa-test'
testImplementation group: 'org.apiguardian', name: 'apiguardian-api', version: '1.1.2'
testImplementation group: 'com.jayway.awaitility', name: 'awaitility', version: '1.7.0'
testImplementation group: 'io.github.netmikey.logunit', name: 'logunit-core', version: '2.0.0'
testImplementation group: 'com.icegreen', name: 'greenmail', version: '2.1.8'
testRuntimeOnly group: 'io.github.netmikey.logunit', name: 'logunit-logback', version: '2.0.0'
testImplementation "org.wiremock:wiremock-standalone:3.6.0"

integrationTestImplementation sourceSets.main.runtimeClasspath
integrationTestImplementation sourceSets.test.runtimeClasspath

integrationTestImplementation group: 'org.springframework.cloud', name: 'spring-cloud-contract-wiremock', version: '4.3.3'
integrationTestImplementation group: 'org.springframework.cloud', name: 'spring-cloud-contract-wiremock', version: '5.0.2'
integrationTestImplementation group: 'org.testcontainers', name: 'postgresql', version: '1.21.4'
integrationTestImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.21.4'

smokeTestImplementation sourceSets.main.runtimeClasspath
smokeTestImplementation sourceSets.test.runtimeClasspath
smokeTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: '5.5.7'
smokeTestImplementation group: 'io.rest-assured', name: 'rest-assured', version: '6.0.0'

functionalTestImplementation sourceSets.main.runtimeClasspath
functionalTestImplementation sourceSets.smokeTest.runtimeClasspath
functionalTestImplementation group: 'com.typesafe', name: 'config', version: '1.4.8'
}

mainClassName = 'uk.gov.hmcts.reform.bulkscanprocessor.Application'

application {
mainClass = 'uk.gov.hmcts.reform.bulkscanprocessor.Application'
}
bootJar {
getArchiveFileName().set(provider {
'bulk-scan-processor.jar'
Expand All @@ -258,3 +264,13 @@ task migratePostgresDatabase(type: FlywayMigrateTask) {
url = "jdbc:postgresql://${dburl}"
}
}
//dependencyManagement {
// imports {
// mavenBom "org.springframework.boot:spring-boot-dependencies:4.0.6"
// }
//}
//dependencyManagement {
// imports {
// mavenBom "org.springframework.cloud:spring-cloud-dependencies:2024.0.1"
// }
//}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-all.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 2 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 10 additions & 22 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.test.web.servlet.MockMvc;

import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.http.HttpHeaders;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.http.MediaType;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
import org.springframework.context.annotation.Import;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.apache.http.client.utils.URLEncodedUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import uk.gov.hmcts.reform.bulkscanprocessor.config.IntegrationTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.webmvc.test.autoconfigure.WebMvcTest;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
import uk.gov.hmcts.reform.bulkscanprocessor.model.out.BlobInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.mockito.ArgumentCaptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoBean;
import org.springframework.test.web.servlet.MockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest;
import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import uk.gov.hmcts.reform.bulkscanprocessor.entity.reports.EnvelopeCountSummaryItem;
import uk.gov.hmcts.reform.bulkscanprocessor.entity.reports.EnvelopeCountSummaryRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest;
import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import uk.gov.hmcts.reform.bulkscanprocessor.model.common.Classification;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest;
import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import uk.gov.hmcts.reform.bulkscanprocessor.helper.EnvelopeCreator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.data.jpa.test.autoconfigure.DataJpaTest;
import org.springframework.boot.jdbc.test.autoconfigure.AutoConfigureTestDatabase;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import uk.gov.hmcts.reform.bulkscanprocessor.helper.EnvelopeCreator;
Expand Down Expand Up @@ -34,7 +34,7 @@ class PaymentRepositoryTest {
public void cleanUp() {
envelopeRepository.deleteAll();
}

@Test
void should_update_payment_status() {

Expand Down
Loading