Skip to content

Commit 8947141

Browse files
committed
Activate cross-version testing
1 parent cad3a9d commit 8947141

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

build.gradle.kts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,23 @@ pluginPublishConventions {
3131
}
3232
}
3333

34-
tasks.test {
35-
useJUnitPlatform()
36-
maxParallelForks = 4
37-
inputs.dir(layout.projectDirectory.dir("samples"))
34+
testing.suites.named<JvmTestSuite>("test") {
35+
useJUnitJupiter()
36+
listOf("7.4", "7.6.4", "8.0.2").forEach { gradleVersionUnderTest ->
37+
targets.register("test${gradleVersionUnderTest}") {
38+
testTask {
39+
group = LifecycleBasePlugin.VERIFICATION_GROUP
40+
description = "Runs tests against Gradle $gradleVersionUnderTest"
41+
systemProperty("gradleVersionUnderTest", gradleVersionUnderTest)
42+
exclude("**/*SamplesTest.class") // Not yet cross-version ready
43+
}
44+
}
45+
}
46+
targets.all {
47+
testTask {
48+
maxParallelForks = 4
49+
inputs.dir(layout.projectDirectory.dir("samples"))
50+
inputs.dir("samples")
51+
}
52+
}
3853
}

0 commit comments

Comments
 (0)