11plugins {
22 id ' io.spring.dependency-management' version " 1.0.4.RELEASE"
33 id ' org.scoverage'
4+ id ' jvm-test-suite'
45}
56
67repositories {
@@ -27,39 +28,35 @@ dependencies {
2728 testImplementation group : ' org.scalatest' , name : " scalatest_${ scalaVersionMajor} .${ scalaVersionMinor} " , version : scalatestVersion
2829}
2930
30- test {
31- useJUnitPlatform()
32- }
33-
34-
35- configurations {
36- intTestImplementation. extendsFrom testImplementation
37- intTestRuntimeOnly. extendsFrom testRuntimeOnly
38- }
39- sourceSets {
40- intTest {
41- resources. srcDir file(' src/intTest/resources' )
42- scala {
43- compileClasspath + = main. output + test. output
44- runtimeClasspath + = main. output + test. output
45- srcDir file(" ${ projectDir} /src/intTest/scala" )
31+ testing {
32+ suites {
33+ configureEach {
34+ useJUnit()
35+ targets. configureEach {
36+ testTask. configure {
37+ maxParallelForks = 1
38+ }
39+ }
40+ }
41+ intTest(JvmTestSuite ) {
42+ testType = TestSuiteType . INTEGRATION_TEST
43+ // dependencies { ... } does not appear to work as advertised?
44+ sources {
45+ scala {
46+ compileClasspath + = sourceSets. test. compileClasspath + sourceSets. main. output + sourceSets. test. output
47+ runtimeClasspath + = sourceSets. test. runtimeClasspath
48+ }
49+ }
50+ targets. configureEach {
51+ testTask. configure{
52+ outputs. upToDateWhen { false }
53+ mustRunAfter(test)
54+ }
55+ }
4656 }
4757 }
4858}
49-
50- test {
51- maxParallelForks = 1
52- }
53-
54- task intTest (type : Test ) {
55- testClassesDirs = sourceSets. intTest. output. classesDirs
56- classpath = sourceSets. intTest. runtimeClasspath
57- outputs. upToDateWhen { false }
58-
59- maxParallelForks = 1
60- }
61- check. dependsOn(intTest)
62- intTest. mustRunAfter(test)
59+ check. dependsOn(testing. suites. intTest)
6360
6461scoverage {
6562 minimumRate = 0.6
0 commit comments