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
23 changes: 0 additions & 23 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG APP_INSIGHTS_AGENT_VERSION=3.2.6
FROM hmctsprod.azurecr.io/base/java:17-distroless
FROM hmctsprod.azurecr.io/base/java:21-distroless

ENV APP prl-dgs-api.jar

Expand Down
34 changes: 24 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ version = '3.0.0'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(21)
}
}

Expand Down Expand Up @@ -86,7 +86,7 @@ bootJar {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version
}
archiveName 'prl-dgs-api.jar'
archiveFileName = 'prl-dgs-api.jar'
}

mainClassName = 'uk.gov.hmcts.reform.prl.documentgenerator.DocumentGeneratorApplication'
Expand Down Expand Up @@ -131,14 +131,25 @@ checkstyle {
tasks.withType(Checkstyle).each { checkstyleTask ->
checkstyleTask.doLast {
reports.all { report ->
def outputFile = report.destination
def outputFile = report.outputLocation.get().asFile
if (outputFile.exists() && outputFile.text.contains("<error ")) {
throw new GradleException("There were checkstyle warnings! For more info check $outputFile")
}
}
}
}

tasks.withType(Checkstyle) {
reports {
html.outputLocation = file("${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.html")
xml.outputLocation = file("${layout.buildDirectory.get()}/reports/jacoco/test/jacocoTestReport.xml")
}
}

tasks.withType(Test) {
jvmArgs '-Dnet.bytebuddy.experimental=true'
}

// https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html
dependencyCheck {
// Specifies if the build should be failed if a CVSS score above a specified level is identified.
Expand Down Expand Up @@ -198,7 +209,12 @@ ext['snakeyaml.version'] = '2.2'
ext['jackson.version'] = '2.16.0'
ext['spring-framework.version'] = '5.3.37'


configurations.all {
resolutionStrategy {
force 'commons-beanutils:commons-beanutils:1.11.0'
force 'org.springframework.security:spring-security-rsa:1.0.12.RELEASE'
}
}


dependencies {
Expand Down Expand Up @@ -238,11 +254,10 @@ dependencies {
testImplementation group: 'org.springframework.cloud', name: 'spring-cloud-contract-wiremock', version: '3.1.10'

implementation (group: 'commons-beanutils', name: 'commons-beanutils', version: versions.commonsBeanUtils) {
force = true

}

implementation (group: 'org.springframework.security', name: 'spring-security-rsa', version: versions.spring_security_rsa) {
force = true
exclude group: 'org.springframework.security', module: 'spring-security-crypto'
}

Expand Down Expand Up @@ -505,9 +520,8 @@ jacocoTestReport {
executionData(test)

reports {
xml.enabled = true
html.enabled = true
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.required = true
html.required = true
}
}

Expand Down Expand Up @@ -535,7 +549,7 @@ sonarqube {
property "sonar.projectName", "Family Private Law :: prl-dgs"
property "sonar.projectKey", "prl-dgs-api"
property "sonar.exclusions", sonarExclusions.join(", ")
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.destination.path}"
property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.outputLocation}"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
34 changes: 21 additions & 13 deletions gradlew

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

22 changes: 12 additions & 10 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 @@ -119,11 +119,10 @@ public void verifyGeneratePdfFromTemplatePact(MockServer mockServer) throws IOEx

HttpResponse generateDocumentResponse = httpClient.execute(request);

String responseContentType = generateDocumentResponse.getEntity().getContentType().toString();
String responseContentType = generateDocumentResponse.getEntity().getContentType().getValue();

assertEquals(200, generateDocumentResponse.getStatusLine().getStatusCode());
assertEquals("Content-Type: application/pdf", responseContentType);

assertEquals("application/pdf", responseContentType);
}

private File getFile(String fileName) throws FileNotFoundException {
Expand Down