mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 11:47:04 +05:30
fix(build-logic): tweak DependencyUpdates configuration
This commit is contained in:
parent
3cc74f9bcf
commit
ed8528aea4
1 changed files with 10 additions and 1 deletions
|
@ -26,13 +26,22 @@ class DependencyUpdatesPlugin : Plugin<Project> {
|
||||||
when (candidate.group) {
|
when (candidate.group) {
|
||||||
"com.squareup.okhttp3",
|
"com.squareup.okhttp3",
|
||||||
"org.jetbrains.kotlin" -> true
|
"org.jetbrains.kotlin" -> true
|
||||||
else -> false
|
else -> isNonStable(candidate.version) && !isNonStable(currentVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
checkConstraints = true
|
||||||
|
checkBuildEnvironmentConstraints = true
|
||||||
checkForGradleUpdate = true
|
checkForGradleUpdate = true
|
||||||
}
|
}
|
||||||
project.extensions.configure<VersionCatalogUpdateExtension> {
|
project.extensions.configure<VersionCatalogUpdateExtension> {
|
||||||
keep.keepUnusedLibraries.set(true)
|
keep.keepUnusedLibraries.set(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private 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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue