Skip to content

Commit 143a211

Browse files
committed
fixup! fixup! fixup! upgrade to gradle 8.1.1 with scala 2.13 as default
1 parent d3662e3 commit 143a211

File tree

1 file changed

+26
-27
lines changed
  • src/functionalTest/resources/projects/scala-multi-module-multiple-test-tasks

1 file changed

+26
-27
lines changed

src/functionalTest/resources/projects/scala-multi-module-multiple-test-tasks/build.gradle

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,35 @@ allprojects {
2525
testImplementation group: 'org.scalatest', name: "scalatest_${scalaVersionMajor}.${scalaVersionMinor}", version: scalatestVersion
2626
}
2727

28-
test {
29-
useJUnitPlatform()
30-
maxParallelForks = 1
31-
}
32-
33-
configurations {
34-
intTestImplementation.extendsFrom testImplementation
35-
intTestRuntimeOnly.extendsFrom testRuntimeOnly
36-
}
37-
sourceSets {
38-
intTest {
39-
resources.srcDir file('src/intTest/resources')
40-
scala {
41-
compileClasspath += main.output + test.output
42-
runtimeClasspath += main.output + test.output
43-
srcDir file("${projectDir}/src/intTest/scala")
28+
testing {
29+
suites {
30+
configureEach {
31+
useJUnit()
32+
targets.configureEach {
33+
testTask.configure {
34+
maxParallelForks = 1
35+
}
36+
}
37+
}
38+
intTest(JvmTestSuite) {
39+
testType = TestSuiteType.INTEGRATION_TEST
40+
// dependencies { ... } does not appear to work as advertised?
41+
sources {
42+
scala {
43+
compileClasspath += sourceSets.test.compileClasspath + sourceSets.main.output + sourceSets.test.output
44+
runtimeClasspath += sourceSets.test.runtimeClasspath
45+
}
46+
}
47+
targets.configureEach {
48+
testTask.configure{
49+
outputs.upToDateWhen { false }
50+
mustRunAfter(test)
51+
}
52+
}
4453
}
4554
}
4655
}
47-
48-
49-
task intTest(type: Test) {
50-
testClassesDirs = sourceSets.intTest.output.classesDirs
51-
classpath = sourceSets.intTest.runtimeClasspath
52-
outputs.upToDateWhen { false }
53-
54-
maxParallelForks = 1
55-
}
56-
check.dependsOn(intTest)
57-
intTest.mustRunAfter(test)
56+
check.dependsOn(testing.suites.intTest)
5857

5958
scoverage {
6059
minimumRate = 0.5

0 commit comments

Comments
 (0)