Skip to content

Commit e5db434

Browse files
authored
FACT-1798 changes for 17 to 21 (#3333)
* FACT-1798 changes for 17 to 21 * changed workflow and readme
1 parent 5304fb2 commit e5db434

File tree

7 files changed

+24
-14
lines changed

7 files changed

+24
-14
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
path: ~/.gradle/caches
1717
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
1818
restore-keys: ${{ runner.os }}-gradle-
19-
- name: Set up JDK 17
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v4
2121
with:
22-
java-version: 17
22+
java-version: 21
2323
distribution: 'zulu'
2424
- name: Run checks
2525
run: ./gradlew check

.github/workflows/publish-openapi.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
SWAGGER_PUBLISHER_API_TOKEN: ${{ secrets.SWAGGER_PUBLISHER_API_TOKEN }}
1212
with:
1313
test_to_run: 'uk.gov.hmcts.reform.bulkscanprocessor.config.SwaggerPublisher'
14-
java_version: 17
14+
java_version: 21

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ARG APP_INSIGHTS_AGENT_VERSION=3.4.8
1+
ARG APP_INSIGHTS_AGENT_VERSION=3.5.2
22

3-
FROM hmctspublic.azurecr.io/base/java:17-distroless
3+
FROM hmctspublic.azurecr.io/base/java:21-distroless
44

55
COPY lib/applicationinsights.json /opt/app/
66

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services fetch the new data.
1313
## Getting Started
1414
### Prerequisites
1515

16-
- [JDK 17](https://www.oracle.com/java)
16+
- [JDK 21](https://www.oracle.com/java)
1717
- Project requires Spring Boot v3.x to be present
1818

1919
### Installation

build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins {
1919
id 'org.springframework.boot' version '3.3.3'
2020
id 'org.owasp.dependencycheck' version '9.1.0'
2121
id 'com.github.ben-manes.versions' version '0.51.0'
22-
id 'org.sonarqube' version '4.4.1.3373'
22+
id 'org.sonarqube' version '5.0.0.4638'
2323
id 'info.solidsoft.pitest' version '1.15.0'
2424
id 'au.com.dius.pact' version '4.3.14'
2525
}
@@ -29,7 +29,7 @@ version = '0.1.0' // all the time it was 0.0.1. 0.1.0 marks migration to java 11
2929

3030
java {
3131
toolchain {
32-
languageVersion = JavaLanguageVersion.of(17)
32+
languageVersion = JavaLanguageVersion.of(21)
3333
}
3434
}
3535

@@ -131,17 +131,17 @@ pmd {
131131
toolVersion = "6.55.0"
132132
ignoreFailures = true
133133
sourceSets = [sourceSets.main, sourceSets.test, sourceSets.functionalTest, sourceSets.integrationTest, sourceSets.smokeTest]
134-
reportsDir = file("$project.buildDir/reports/pmd")
134+
reportsDir = layout.buildDirectory.dir("reports/pmd").get().asFile
135135
ruleSetFiles = files("config/pmd/ruleset.xml")
136136
ruleSets = []
137137
}
138138

139139
jacocoTestReport {
140140
executionData(test, integration)
141141
reports {
142-
xml.enabled = true
143-
csv.enabled = false
144-
xml.destination = file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
142+
xml.required.set(true)
143+
csv.required.set(false)
144+
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacocoTestReport.xml"))
145145
}
146146
afterEvaluate {
147147
getClassDirectories().from = getClassDirectories().files.collect {
@@ -193,7 +193,7 @@ pitest {
193193
sonarqube {
194194
properties {
195195
property "sonar.projectName", "Reform :: Bulk Scan Processor"
196-
property "sonar.coverage.jacoco.xmlReportPaths", jacocoTestReport.reports.xml.destination.path
196+
property "sonar.coverage.jacoco.xmlReportPaths", jacocoTestReport.reports.xml.outputLocation.get().asFile.absolutePath
197197
property "sonar.pitest.mode", "reuseReport"
198198
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
199199
property "sonar.exclusions", "**/model/out/*,**/config/**,**/LeaseAcquirer.java"
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

src/test/resources/application.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
case_document_am:
3+
url: ${CASE_DOCUMENT_AM_URL:http://localhost:4452}
4+
5+
idam:
6+
api:
7+
url: ${IDAM_API_URL:http://localhost:4501}
8+
s2s-auth:
9+
url: ${S2S_URL:http://localhost:4552}

0 commit comments

Comments
 (0)