Files
AFFiNE-Mirror/packages/frontend/apps/android/App/buildscripts/toml-updater-config.gradle

28 lines
711 B
Groovy

versionCatalogUpdate {
sortByKey = true
versionCatalogs {
special {
keep {
keepUnusedVersions = true
}
}
}
}
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 {
resolutionStrategy {
componentSelection {
all {
if (isNonStable(it.candidate.version) && !isNonStable(it.currentVersion)) {
reject('Release candidate')
}
}
}
}
}