mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Fix multi-jdk testing setup (#1086)
This changes the Gradle build to always create multi-jdk tasks, and instead use the `enabled` property to determine whether the task is actually ran or not. The has the following benefits: * IntelliJ and other tools understand the task execution graph (e.g. testJdk20 shows up as a task) * JDK-specific Gradle configurations always exist, so `updateDependencyLocks` is consistent.
This commit is contained in:
@@ -20,6 +20,7 @@ import org.gradle.accessors.dm.LibrariesForLibs
|
||||
plugins {
|
||||
`java-library`
|
||||
`jvm-toolchains`
|
||||
`jvm-test-suite`
|
||||
id("pklKotlinTest")
|
||||
id("com.diffplug.spotless")
|
||||
}
|
||||
@@ -135,4 +136,4 @@ tasks.test { configureJdkTestTask(info.javaTestLauncher) }
|
||||
// inherits the configuration of the default `test` task (aside from an overridden launcher).
|
||||
val jdkTestTasks = info.multiJdkTestingWith(tasks.test) { (_, jdk) -> configureJdkTestTask(jdk) }
|
||||
|
||||
if (info.multiJdkTesting) tasks.check { dependsOn(jdkTestTasks) }
|
||||
tasks.check { dependsOn(jdkTestTasks) }
|
||||
|
||||
Reference in New Issue
Block a user