X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/75351e6ab7aeb0ee9c52742020b35f2457936a4e..32c4086d1a05bbc02d25cf25ac1067d58836522a:/build.gradle diff --git a/build.gradle b/build.gradle index 1294600f..8c5a7655 100644 --- a/build.gradle +++ b/build.gradle @@ -1,21 +1,27 @@ apply plugin: 'java' apply plugin: 'application' +apply plugin: 'eclipse' -sourceCompatibility = "1.8"; +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 -mainClassName = 'cli.Main' +mainClassName = 'org.asamk.signal.Main' -version = '0.0.4' +version = '0.7.3' + +compileJava.options.encoding = 'UTF-8' repositories { + mavenLocal() mavenCentral() } dependencies { - compile 'org.whispersystems:textsecure-java:1.8.2' - compile 'com.madgag.spongycastle:prov:1.53.0.0' - compile 'commons-io:commons-io:2.4' - compile 'net.sourceforge.argparse4j:argparse4j:0.5.0' + implementation 'com.github.turasa:signal-service-java:2.15.3_unofficial_16' + implementation 'org.bouncycastle:bcprov-jdk15on:1.68' + implementation 'net.sourceforge.argparse4j:argparse4j:0.8.1' + implementation 'com.github.hypfvieh:dbus-java:3.2.4' + implementation 'org.slf4j:slf4j-simple:1.7.30' } jar { @@ -27,3 +33,44 @@ jar { ) } } + +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. +task checkLibVersions { + doLast { + def checked = [:] + allprojects { + configurations.each { configuration -> + configuration.allDependencies.each { dependency -> + def version = dependency.version + if (!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 newest = metadata.versioning.latest; + if ("$version" != "$newest") { + println "UPGRADE {\"group\": \"$group\", \"name\": \"$name\", \"current\": \"$version\", \"latest\": \"$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 + } + } + } + } + } +}