Skip to content

Commit d3662e3

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

File tree

2 files changed

+28
-31
lines changed

2 files changed

+28
-31
lines changed

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

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'io.spring.dependency-management' version "1.0.4.RELEASE"
33
id 'org.scoverage'
4+
id 'jvm-test-suite'
45
}
56

67
repositories {
@@ -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

6461
scoverage {
6562
minimumRate = 0.6

src/main/groovy/org/scoverage/ScoveragePlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class ScoveragePlugin implements Plugin<PluginAware> {
212212

213213
compileTask.configure {
214214
doFirst {
215-
destinationDir.deleteDir()
215+
destinationDirectory.get().getAsFile().deleteDir()
216216
}
217217

218218
// delete non-instrumented classes by comparing normally compiled classes to those compiled with scoverage

0 commit comments

Comments
 (0)