42 lines
1.0 KiB
Kotlin
42 lines
1.0 KiB
Kotlin
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
|
|
|
plugins {
|
|
id("com.github.ben-manes.versions") version "0.44.0"
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
gradlePluginPortal()
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
|
|
classpath("com.android.tools.build:gradle:8.3.1")
|
|
classpath( "com.squareup.sqldelight:gradle-plugin:1.5.5")
|
|
}
|
|
}
|
|
|
|
group = "org.example"
|
|
version = "3.0.7"
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
|
|
}
|
|
}
|
|
|
|
tasks.withType<DependencyUpdatesTask> {
|
|
rejectVersionIf {
|
|
isNonStable(candidate.version)
|
|
}
|
|
}
|
|
|
|
fun isNonStable(version: String): Boolean {
|
|
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
|
|
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
|
|
val isStable = stableKeyword || regex.matches(version)
|
|
return isStable.not()
|
|
} |