Browse Source

build: versions plugin added for routine checks of dependency updates, excluding unstable dependencies (#51)

master^2
Kazik Pogoda 1 year ago
committed by Abe Pazos
parent
commit
5242dae526
  1. 25
      build.gradle.kts
  2. 1
      gradle/libs.versions.toml

25
build.gradle.kts

@ -98,6 +98,7 @@ plugins {
alias(libs.plugins.shadow) alias(libs.plugins.shadow)
alias(libs.plugins.runtime) alias(libs.plugins.runtime)
alias(libs.plugins.gitarchive.tomarkdown).apply(false) alias(libs.plugins.gitarchive.tomarkdown).apply(false)
alias(libs.plugins.versions)
} }
repositories { repositories {
@ -218,6 +219,30 @@ tasks.register<org.openrndr.extra.gitarchiver.GitArchiveToMarkdown>("gitArchiveT
// ------------------------------------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------------------------------------ //
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)
}
}
}
// ------------------------------------------------------------------------------------------------------------------ //
class Openrndr { class Openrndr {
val openrndrVersion = libs.versions.openrndr.get() val openrndrVersion = libs.versions.openrndr.get()
val orxVersion = libs.versions.orx.get() val orxVersion = libs.versions.orx.get()

1
gradle/libs.versions.toml

@ -31,3 +31,4 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
runtime = { id = "org.beryx.runtime", version = "1.13.0" } runtime = { id = "org.beryx.runtime", version = "1.13.0" }
gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" } gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" }
versions = { id = "com.github.ben-manes.versions", version = "0.49.0" }

Loading…
Cancel
Save