diff --git a/build.gradle.kts b/build.gradle.kts index 0675c2db3..8e7ad44a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,8 +4,27 @@ plugins { alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.jetbrainsCompose) apply false + + alias(libs.plugins.versions) } // Set the build directory to not /build to prevent accidental deletion through the clean action // Can be deleted after the migration to Gradle is complete -layout.buildDirectory = file(".build") \ No newline at end of file +layout.buildDirectory = file(".build") + +// Configure the dependencyUpdates task +tasks { + dependencyUpdates { + gradleReleaseChannel = "current" + + val nonStableKeywords = listOf("alpha", "beta", "rc") + + fun isNonStable(version: String) = nonStableKeywords.any { + version.lowercase().contains(it) + } + + rejectVersionIf { + isNonStable(candidate.version) && !isNonStable(currentVersion) + } + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 236949d8c..050502f4c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -43,4 +43,5 @@ compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = " serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } download = { id = "de.undercouch.download", version = "5.6.0" } mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.30.0" } -gradlePublish = { id = "com.gradle.plugin-publish", version = "1.2.1" } \ No newline at end of file +versions = { id = "com.github.ben-manes.versions", version = "0.52.0" } +gradlePublish = { id = "com.gradle.plugin-publish", version = "1.2.1" }