Skip to content

Commit

Permalink
Remove unnecessary jenkins version filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
welandaz committed Nov 14, 2024
1 parent c8f83db commit b855a78
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions acceptance-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,13 @@ dependencies {
add(gradlePlugin.name, project(path = ":", configuration = "gradlePluginJpi"))
}

val currentJava = JavaVersion.current()

val jenkinsVersions = listOf(
JenkinsVersion.LATEST,
JenkinsVersion.LATEST_LTS,
JenkinsVersion.V2_401
)

jenkinsVersions
.filter { jenkinsVersion ->
jenkinsVersion.isDefault || currentJava.isCompatibleWith(jenkinsVersion.requiredJavaVersion)
}
.forEach { jenkinsVersion ->
val downloadJenkinsTask =
tasks.register<Download>("downloadJenkins${jenkinsVersion.label}") {
Expand Down Expand Up @@ -154,7 +149,4 @@ data class JenkinsVersion(val version: String, val downloadUrl: URL, val javaVer
} else {
version.split("-").joinToString(separator = "") { it.capitalized() }
}

val requiredJavaVersion: JavaVersion
get() = JavaVersion.toVersion(javaVersion.toString())
}

0 comments on commit b855a78

Please sign in to comment.