mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-21 08:07:16 +00:00
add versions plugin
This commit is contained in:
parent
2ddfffa6a9
commit
bd2b5ae5fc
@ -17,6 +17,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
alias(libs.plugins.versions)
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
@ -38,3 +42,4 @@ allprojects {
|
|||||||
|
|
||||||
apply from: "./extensions.gradle"
|
apply from: "./extensions.gradle"
|
||||||
apply from: "./github_release.gradle"
|
apply from: "./github_release.gradle"
|
||||||
|
apply from: "./versions_plugin_setup.gradle"
|
||||||
|
@ -24,6 +24,8 @@ okio = "3.3.0"
|
|||||||
ksp = "1.8.20-1.0.11"
|
ksp = "1.8.20-1.0.11"
|
||||||
kotlin-poet = "1.14.2"
|
kotlin-poet = "1.14.2"
|
||||||
|
|
||||||
|
versions = "0.47.0"
|
||||||
|
|
||||||
android-gradle = "7.4.2"
|
android-gradle = "7.4.2"
|
||||||
dexcount = "4.0.0"
|
dexcount = "4.0.0"
|
||||||
|
|
||||||
@ -109,3 +111,5 @@ buildscript-android-dexcount = { module = "com.getkeepsafe.dexcount:dexcount-gra
|
|||||||
[plugins]
|
[plugins]
|
||||||
|
|
||||||
jb-compose = { id = "org.jetbrains.compose", version.ref = "jb-compose" }
|
jb-compose = { id = "org.jetbrains.compose", version.ref = "jb-compose" }
|
||||||
|
|
||||||
|
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
|
||||||
|
11
versions_plugin_setup.gradle
Normal file
11
versions_plugin_setup.gradle
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
def isNonStable = { String version ->
|
||||||
|
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
|
||||||
|
def regex = /^[0-9,.v-]+(-r)?$/
|
||||||
|
return !stableKeyword && !(version ==~ regex)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("dependencyUpdates").configure {
|
||||||
|
rejectVersionIf {
|
||||||
|
isNonStable(it.candidate.version)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user