mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 14:27:02 +05:30
gradle: migrate to build-logic
This commit is contained in:
parent
4cef244d71
commit
3097eaf82f
26 changed files with 501 additions and 182 deletions
|
@ -0,0 +1,27 @@
|
|||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions")
|
||||
id("nl.littlerobots.version-catalog-update")
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
tasks.withType<DependencyUpdatesTask>().configureEach {
|
||||
rejectVersionIf {
|
||||
when (candidate.group) {
|
||||
"com.android.application", "com.android.library" -> true
|
||||
else -> isNonStable(candidate.version) && !isNonStable(currentVersion)
|
||||
}
|
||||
}
|
||||
checkForGradleUpdate = false
|
||||
checkBuildEnvironmentConstraints = true
|
||||
outputFormatter = "json"
|
||||
outputDir = "build/dependencyUpdates"
|
||||
reportfileName = "report"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue