i was thinking how to integrate it with the newest feature
we could have
rejectVersionContaining ("alpha","beta",...)
which would be a shorter version of
rejectVersionIf { candidate ->
listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea").any { qualifier ->
candidate.version.matches(Regex("(?i).*[.-]\$qualifier[.\\d-+]*"))
}
}
which would be a shorter version of
resolutionStrategy {
componentSelection {
all {
fun isNonStable(version: String) = listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea").any { qualifier ->
version.matches(Regex("(?i).*[.-]\$qualifier[.\\d-+]*"))
}
if (isNonStable(candidate.version) && !isNonStable(currentVersion)) {
reject("Release candidate")
}
}
}
}