apply plugin: 'application'
apply plugin: 'eclipse'
-sourceCompatibility = JavaVersion.VERSION_1_8
-targetCompatibility = JavaVersion.VERSION_1_8
+sourceCompatibility = JavaVersion.VERSION_11
+targetCompatibility = JavaVersion.VERSION_11
mainClassName = 'org.asamk.signal.Main'
-version = '0.6.4'
+version = '0.7.4'
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.13.9_unofficial_1'
- compile 'org.bouncycastle:bcprov-jdk15on:1.64'
- compile 'net.sourceforge.argparse4j:argparse4j:0.8.1'
- compile 'org.freedesktop.dbus:dbus-java:2.7.0'
+ implementation 'com.google.protobuf:protobuf-javalite:3.10.0'
+ implementation 'com.github.turasa:signal-service-java:2.15.3_unofficial_18'
+ 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 {
// 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 = [:]
configurations.each { configuration ->
configuration.allDependencies.each { dependency ->
def version = dependency.version
- if (!version.contains('SNAPSHOT') && !checked[dependency]) {
+ 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 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"
+ 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"
}
}
}
+
+task assembleNativeImage {
+ dependsOn("assemble")
+ doLast {
+ def graalVMHome = System.getenv("GRAALVM_HOME")
+ if (!graalVMHome) {
+ throw new GradleException('Required GRAALVM_HOME environment variable not set.')
+ }
+ def nativeBinaryOutputPath = "$buildDir/native-image"
+ def nativeBinaryName = "signal-cli"
+
+ mkdir nativeBinaryOutputPath
+
+ exec {
+ workingDir "."
+ commandLine "$graalVMHome/bin/native-image",
+ "-H:Path=$nativeBinaryOutputPath",
+ "-H:Name=$nativeBinaryName",
+ "-H:JNIConfigurationFiles=graalvm-config-dir/jni-config.json",
+ "-H:DynamicProxyConfigurationFiles=graalvm-config-dir/proxy-config.json",
+ "-H:ResourceConfigurationFiles=graalvm-config-dir/resource-config.json",
+ "-H:ReflectionConfigurationFiles=graalvm-config-dir/reflect-config.json",
+ "--no-fallback",
+ "--allow-incomplete-classpath",
+ "--report-unsupported-elements-at-runtime",
+ "--enable-url-protocols=http,https",
+ "--enable-https",
+ "--enable-all-security-services",
+ "-cp",
+ sourceSets.main.runtimeClasspath.asPath,
+ project.mainClassName
+ }
+ }
+}