11plugins {
22 id ' java'
3- id ' io.freefair.lombok' version ' 8.2.2 '
4- id ' org.springframework.boot' version ' 2.7.17 '
3+ id ' io.freefair.lombok' version ' 8.6 '
4+ id ' org.springframework.boot' version ' 2.7.18 '
55 id ' io.spring.dependency-management' version ' 1.1.4'
66 id ' jacoco'
7- id ' org.sonarqube' version ' 4.2.1.3168 '
7+ id ' org.sonarqube' version ' 5.0.0.4638 '
88 id ' maven-publish'
99}
1010
@@ -44,22 +44,6 @@ allprojects {
4444 }
4545}
4646
47- sourceSets {
48- integrationTest {
49- java {
50- compileClasspath + = sourceSets. main. output
51- runtimeClasspath + = sourceSets. main. output
52- srcDir ' src/itest/java'
53- }
54- resources. srcDir ' src/itest/resources'
55- }
56- }
57-
58- configurations {
59- integrationTestImplementation. extendsFrom testImplementation
60- integrationTestRuntimeOnly. extendsFrom runtimeOnly
61- }
62-
6347dependencies {
6448 // iexec
6549 implementation " com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion "
@@ -90,13 +74,6 @@ dependencies {
9074
9175 // expiring map
9276 implementation " net.jodah:expiringmap:0.5.11"
93-
94- // test
95- testImplementation ' org.springframework.boot:spring-boot-starter-test'
96- testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
97-
98- // awaitility
99- testImplementation ' org.awaitility:awaitility'
10077}
10178
10279springBoot {
@@ -110,17 +87,41 @@ tasks.named("bootJar") {
11087 }
11188}
11289
113- test {
114- useJUnitPlatform()
90+ testing {
91+ suites {
92+ configureEach {
93+ dependencies {
94+ implementation ' org.springframework.boot:spring-boot-starter-test'
95+ runtimeOnly ' com.h2database:h2:2.2.222'
96+ }
97+ }
98+ test {
99+ useJUnitJupiter()
100+ dependencies {
101+ implementation ' org.awaitility:awaitility'
102+ }
103+ }
104+ itest(JvmTestSuite ) {
105+ sources {
106+ java {
107+ srcDirs = [' src/itest/java' ]
108+ }
109+ }
110+ dependencies {
111+ implementation project()
112+ implementation project(' :iexec-sms-library' )
113+ implementation " com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion "
114+ implementation " com.iexec.common:iexec-common:$iexecCommonVersion "
115+ implementation ' org.apache.commons:commons-lang3'
116+ implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
117+ implementation ' org.springframework.boot:spring-boot-starter-web'
118+ }
119+ }
120+ }
115121}
116122
117- tasks. register(' itest' , Test ) {
118- group ' Verification'
119- description ' Runs the integration tests.'
120- testClassesDirs = sourceSets. integrationTest. output. classesDirs
121- classpath = sourceSets. integrationTest. runtimeClasspath
122- outputs. upToDateWhen { false } // run always
123- useJUnitPlatform()
123+ tasks. withType(Test ). configureEach {
124+ finalizedBy tasks. jacocoTestReport
124125}
125126
126127// sonarqube code coverage requires jacoco XML report
@@ -129,7 +130,6 @@ jacocoTestReport {
129130 xml. required = true
130131 }
131132}
132- tasks. test. finalizedBy tasks. jacocoTestReport
133133tasks. sonarqube. dependsOn tasks. jacocoTestReport
134134
135135publishing {
0 commit comments