Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ RUN mkdir -p /home/gradle/cache_home
ENV GRADLE_USER_HOME /home/gradle/cache_home
COPY build.gradle /home/gradle/src/
WORKDIR /home/gradle/src
RUN gradle -b build.gradle clean build -i --stacktrace
RUN gradle clean build -i --stacktrace

FROM gradle:jdk21 AS build
COPY --from=cache /home/gradle/cache_home /home/gradle/.gradle
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle --no-daemon -b build.gradle bootJar -i --stacktrace
RUN gradle --no-daemon bootJar -i --stacktrace

FROM eclipse-temurin:21-jre-jammy

Expand Down
34 changes: 23 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,28 @@ apply plugin: 'checkstyle'
apply plugin: 'org.springframework.boot'

group = 'uk.nhs.digital.nhsconnect.nhais'
sourceCompatibility = '21'

mainClassName = 'uk.nhs.digital.nhsconnect.nhais.IntegrationAdaptorNhaisApplication'

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

application {
mainClass = 'uk.nhs.digital.nhsconnect.nhais.IntegrationAdaptorNhaisApplication'
}


repositories {
mavenCentral()
}

sourceSets {
intTest {
intTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}

recepResponder {
compileClasspath += sourceSets.main.output
Expand Down Expand Up @@ -67,9 +76,9 @@ dependencies {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

testImplementation "org.testcontainers:testcontainers:1.21.1"
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'
testImplementation("org.assertj:assertj-core:3.27.3")
testImplementation "org.testcontainers:testcontainers:1.21.1"
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'
testImplementation("org.assertj:assertj-core:3.27.3")
}

test {
Expand All @@ -79,24 +88,27 @@ test {
}

jacocoTestReport {
dependsOn test // tests are required to run before generating the report
dependsOn test // tests are required to run before generating the report
}

task componentTest(type: Test) {
tasks.register('componentTest', Test) {
useJUnitPlatform() {
includeTags 'component'

testClassesDirs = testing.suites.test.sources.output.classesDirs
classpath = testing.suites.test.sources.runtimeClasspath
}
}

task integrationTest(type: Test) {
tasks.register('integrationTest', Test) {
useJUnitPlatform() {
description = 'Runs integration tests.'
group = 'verification'

testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
shouldRunAfter test
}
shouldRunAfter test
}

check.dependsOn componentTest
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.lb.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
nhais-lb:
image: nginx:latest
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
nhais:
ports:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
nhais:
image: local/nhais:${BUILD_TAG}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down