Skip to content

Commit

Permalink
build: versions plugin added for routine checks of dependency updates…
Browse files Browse the repository at this point in the history
…, excluding unstable dependencies (#51)
  • Loading branch information
morisil authored Nov 12, 2023
1 parent 2477ce7 commit d97e80c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ plugins {
alias(libs.plugins.shadow)
alias(libs.plugins.runtime)
alias(libs.plugins.gitarchive.tomarkdown).apply(false)
alias(libs.plugins.versions)
}

repositories {
Expand Down Expand Up @@ -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 {
val openrndrVersion = libs.versions.openrndr.get()
val orxVersion = libs.versions.orx.get()
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
runtime = { id = "org.beryx.runtime", version = "1.13.0" }
gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" }
versions = { id = "com.github.ben-manes.versions", version = "0.49.0" }

0 comments on commit d97e80c

Please sign in to comment.