Skip to content

Commit

Permalink
Disable testSpring3 when testJavaVersion is 8 or 11
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Jul 16, 2024
1 parent 506ee17 commit 9a6f5d4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ if (latestDepTest) {
}
}

val testJavaVersion = gradle.startParameter.projectProperties["testJavaVersion"]?.let(JavaVersion::toVersion)
val testSpring3 = (testJavaVersion == null || testJavaVersion.compareTo(JavaVersion.VERSION_17) >= 0)

testing {
suites {
val testLogbackAppender by registering(JvmTestSuite::class) {
Expand Down Expand Up @@ -204,6 +207,10 @@ tasks {
options.release.set(17)
}

named<Test>("testSpring3") {
isEnabled = testSpring3
}

withType(Jar::class) {
from(sourceSets["javaSpring3"].output)
}
Expand Down

0 comments on commit 9a6f5d4

Please sign in to comment.