@@ -13,19 +13,28 @@ apply plugin: 'checkstyle'
1313apply plugin : ' org.springframework.boot'
1414
1515group = ' 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
2029repositories {
2130 mavenCentral()
2231}
2332
2433sourceSets {
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
7584test {
@@ -79,24 +88,27 @@ test {
7988}
8089
8190jacocoTestReport {
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
102114check. dependsOn componentTest
0 commit comments