mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> Co-authored-by: eyhn <cneyhn@gmail.com>
30 lines
899 B
Groovy
30 lines
899 B
Groovy
versionCatalogUpdate {
|
|
sortByKey.set(true)
|
|
|
|
keep {
|
|
// keep versions without any library or plugin reference
|
|
keepUnusedVersions.set(true)
|
|
// keep all libraries that aren't used in the project
|
|
keepUnusedLibraries.set(true)
|
|
// keep all plugins that aren't used in the project
|
|
keepUnusedPlugins.set(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')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |