mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
81 lines
2.8 KiB
Groovy
81 lines
2.8 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'application'
|
|
apply plugin: 'eclipse'
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
|
targetCompatibility = JavaVersion.VERSION_1_7
|
|
|
|
mainClassName = 'org.asamk.signal.Main'
|
|
|
|
version = '0.6.0'
|
|
|
|
compileJava.options.encoding = 'UTF-8'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven {
|
|
url "https://raw.github.com/AsamK/maven/master/releases/"
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.github.turasa:signal-service-java:2.12.2_unofficial_2'
|
|
compile 'org.bouncycastle:bcprov-jdk15on:1.60'
|
|
compile 'net.sourceforge.argparse4j:argparse4j:0.8.1'
|
|
compile 'org.freedesktop.dbus:dbus-java:2.7.0'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Implementation-Title': project.name,
|
|
'Implementation-Version': project.version,
|
|
'Main-Class': project.mainClassName,
|
|
)
|
|
}
|
|
}
|
|
|
|
run {
|
|
if (project.hasProperty("appArgs")) {
|
|
// allow passing command-line arguments to the main application e.g.:
|
|
// $ gradle run -PappArgs="['-u', '+...', 'daemon', '--json']"
|
|
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 << {
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|