Set gradle release channel in versions plugin

Stops it suggesting release candidate builds.
This commit is contained in:
Michael Bull 2021-10-26 17:21:07 +01:00
parent 4df9985f15
commit 623a360e21

View File

@ -1,4 +1,5 @@
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper import org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper
@ -23,6 +24,8 @@ plugins {
} }
tasks.withType<DependencyUpdatesTask> { tasks.withType<DependencyUpdatesTask> {
gradleReleaseChannel = GradleReleaseChannel.CURRENT.id
rejectVersionIf { rejectVersionIf {
listOf("alpha", "beta", "rc", "cr", "m", "eap", "pr", "dev").any { listOf("alpha", "beta", "rc", "cr", "m", "eap", "pr", "dev").any {
candidate.version.contains(it, ignoreCase = true) candidate.version.contains(it, ignoreCase = true)