|
@@ -6,13 +6,6 @@ task checkDependencies << {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-task checkRepositories << {
|
|
|
- verifyNoRepositoriesMatching(".*snapshot.*")
|
|
|
- if(releaseBuild) {
|
|
|
- verifyNoRepositoriesMatching(".*milestone.*")
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
if(!snapshotBuild) {
|
|
|
tasks.findByPath('check')?.dependsOn checkRepositories, checkDependencies
|
|
|
}
|
|
@@ -22,11 +15,4 @@ def verifyNoDependenciesMatchingVersion(def pattern) {
|
|
|
if(dependencies) {
|
|
|
throw new GradleException("${project.name} cannot have dependencies with a version that matches $pattern when its version is ${project.version}. Got\n $dependencies")
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-def verifyNoRepositoriesMatching(def pattern) {
|
|
|
- def matchingRepositories = repositories.findAll { r -> r.url?.toString()?.matches(pattern) }.flatten().collect { it.url }.toSet().join("\n ")
|
|
|
- if(matchingRepositories) {
|
|
|
- throw new GradleException("${project.name} cannot have repositories with a version that matches $pattern when its version is ${project.version}. Got\n $matchingRepositories")
|
|
|
- }
|
|
|
}
|