Skip to content

Commit f6cb878

Browse files
Updating Gradle to 9.0.0 (#330)
* Updating Gradle to 9.0.0
1 parent 333729a commit f6cb878

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ RUN mkdir -p /home/gradle/cache_home
33
ENV GRADLE_USER_HOME /home/gradle/cache_home
44
COPY build.gradle /home/gradle/src/
55
WORKDIR /home/gradle/src
6-
RUN gradle -b build.gradle clean build -i --stacktrace
6+
RUN gradle clean build -i --stacktrace
77

88
FROM gradle:jdk21 AS build
99
COPY --from=cache /home/gradle/cache_home /home/gradle/.gradle
1010
COPY --chown=gradle:gradle . /home/gradle/src
1111
WORKDIR /home/gradle/src
12-
RUN gradle --no-daemon -b build.gradle bootJar -i --stacktrace
12+
RUN gradle --no-daemon bootJar -i --stacktrace
1313

1414
FROM eclipse-temurin:21-jre-jammy
1515

build.gradle

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,28 @@ apply plugin: 'checkstyle'
1313
apply plugin: 'org.springframework.boot'
1414

1515
group = 'uk.nhs.digital.nhsconnect.nhais'
16-
sourceCompatibility = '21'
1716

18-
mainClassName = 'uk.nhs.digital.nhsconnect.nhais.IntegrationAdaptorNhaisApplication'
17+
18+
java {
19+
toolchain {
20+
languageVersion = JavaLanguageVersion.of(21)
21+
}
22+
}
23+
24+
application {
25+
mainClass = 'uk.nhs.digital.nhsconnect.nhais.IntegrationAdaptorNhaisApplication'
26+
}
27+
1928

2029
repositories {
2130
mavenCentral()
2231
}
2332

2433
sourceSets {
25-
intTest {
34+
intTest {
2635
compileClasspath += sourceSets.main.output
2736
runtimeClasspath += sourceSets.main.output
28-
}
37+
}
2938

3039
recepResponder {
3140
compileClasspath += sourceSets.main.output
@@ -67,9 +76,9 @@ dependencies {
6776
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
6877
}
6978

70-
testImplementation "org.testcontainers:testcontainers:1.21.1"
71-
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'
72-
testImplementation("org.assertj:assertj-core:3.27.3")
79+
testImplementation "org.testcontainers:testcontainers:1.21.1"
80+
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'
81+
testImplementation("org.assertj:assertj-core:3.27.3")
7382
}
7483

7584
test {
@@ -79,24 +88,27 @@ test {
7988
}
8089

8190
jacocoTestReport {
82-
dependsOn test // tests are required to run before generating the report
91+
dependsOn test // tests are required to run before generating the report
8392
}
8493

85-
task componentTest(type: Test) {
94+
tasks.register('componentTest', Test) {
8695
useJUnitPlatform() {
8796
includeTags 'component'
97+
98+
testClassesDirs = testing.suites.test.sources.output.classesDirs
99+
classpath = testing.suites.test.sources.runtimeClasspath
88100
}
89101
}
90102

91-
task integrationTest(type: Test) {
103+
tasks.register('integrationTest', Test) {
92104
useJUnitPlatform() {
93105
description = 'Runs integration tests.'
94106
group = 'verification'
95107

96108
testClassesDirs = sourceSets.intTest.output.classesDirs
97109
classpath = sourceSets.intTest.runtimeClasspath
98-
shouldRunAfter test
99110
}
111+
shouldRunAfter test
100112
}
101113

102114
check.dependsOn componentTest

docker-compose.lb.override.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
nhais-lb:
53
image: nginx:latest

docker-compose.override.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
nhais:
53
ports:

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
nhais:
53
image: local/nhais:${BUILD_TAG}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)