build: Allow alpha/beta/rc dependencies

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2019-07-04 12:10:24 +05:30
parent 2e8fe06b2b
commit 2b23dea904
No known key found for this signature in database
GPG key ID: C2E74282C2133D62

View file

@ -28,12 +28,8 @@ tasks {
resolutionStrategy {
componentSelection {
all {
val blacklistedGroups = listOf("commons-io", "org.eclipse.jgit")
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview")
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") }
.any { it.matches(candidate.version) || blacklistedGroups.contains(candidate.group) }
if (rejected) {
reject("Release candidate")
if (listOf("commons-io", "org.eclipse.jgit").contains(candidate.group)) {
reject("Blacklisted package")
}
}
}