Update dependencies, gradle wrapper

This commit is contained in:
AsamK 2018-05-03 21:49:52 +02:00
parent 925d8db468
commit 8127eaaf9d
3 changed files with 39 additions and 2 deletions

View file

@ -12,6 +12,7 @@ version = '0.5.6'
compileJava.options.encoding = 'UTF-8' compileJava.options.encoding = 'UTF-8'
repositories { repositories {
mavenLocal()
maven { maven {
url "https://raw.github.com/AsamK/maven/master/releases/" url "https://raw.github.com/AsamK/maven/master/releases/"
} }
@ -19,7 +20,7 @@ repositories {
} }
dependencies { dependencies {
compile 'com.github.turasa:signal-service-java:2.7.3_unofficial_1' compile 'com.github.turasa:signal-service-java:2.7.5_unofficial_1'
compile 'org.bouncycastle:bcprov-jdk15on:1.59' compile 'org.bouncycastle:bcprov-jdk15on:1.59'
compile 'net.sourceforge.argparse4j:argparse4j:0.8.1' compile 'net.sourceforge.argparse4j:argparse4j:0.8.1'
compile 'org.freedesktop.dbus:dbus-java:2.7.0' compile 'org.freedesktop.dbus:dbus-java:2.7.0'
@ -34,3 +35,39 @@ jar {
) )
} }
} }
// 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 << {
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 = "http://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
}
}
}
}
}

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip