Remove version check which isn't working correctly

This commit is contained in:
AsamK 2020-05-06 09:18:48 +02:00
parent 00777a469c
commit d8ef312b5f

View file

@ -41,41 +41,3 @@ run {
args Eval.me(appArgs) args Eval.me(appArgs)
} }
} }
// Find any 3rd party libraries which have released new versions
// to the central Maven repo since we last upgraded.
// http://daniel.gredler.net/2011/08/08/gradle-keeping-libraries-up-to-date/
task checkLibVersions {
doLast {
def checked = [:]
allprojects {
configurations.each { configuration ->
configuration.allDependencies.each { dependency ->
def version = dependency.version
if (!version.contains('SNAPSHOT') && !checked[dependency]) {
def group = dependency.group
def path = group.replace('.', '/')
def name = dependency.name
def url = "https://repo1.maven.org/maven2/$path/$name/maven-metadata.xml"
try {
def metadata = new XmlSlurper().parseText(url.toURL().text)
def versions = metadata.versioning.versions.version.collect { it.text() }
versions.removeAll { it.toLowerCase().contains('alpha') }
versions.removeAll { it.toLowerCase().contains('beta') }
versions.removeAll { it.toLowerCase().contains('rc') }
def newest = versions.max()
if (version != newest) {
println "$group:$name $version -> $newest"
}
} catch (FileNotFoundException e) {
logger.debug "Unable to download $url: $e.message"
} catch (org.xml.sax.SAXParseException e) {
logger.debug "Unable to parse $url: $e.message"
}
checked[dependency] = true
}
}
}
}
}
}