1
1
plugins {
2
2
id ' io.spring.dependency-management' version " 1.0.4.RELEASE"
3
3
id ' org.scoverage'
4
+ id ' jvm-test-suite'
4
5
}
5
6
6
7
repositories {
@@ -27,39 +28,35 @@ dependencies {
27
28
testImplementation group : ' org.scalatest' , name : " scalatest_${ scalaVersionMajor} .${ scalaVersionMinor} " , version : scalatestVersion
28
29
}
29
30
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
+ }
46
56
}
47
57
}
48
58
}
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)
63
60
64
61
scoverage {
65
62
minimumRate = 0.6
0 commit comments