X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/4adb11dada29ac6ca2d12270fd7e617007ff9bf3..8ebca0d7fb37489e1b3109519b9ff76067295007:/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts index b2bd53e4..37b94492 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,9 +2,10 @@ plugins { java application eclipse + `check-lib-versions` } -version = "0.7.4" +version = "0.9.0" java { sourceCompatibility = JavaVersion.VERSION_11 @@ -21,12 +22,11 @@ repositories { } dependencies { - 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.bouncycastle:bcprov-jdk15on:1.69") + implementation("net.sourceforge.argparse4j:argparse4j:0.9.0") + implementation("com.github.hypfvieh:dbus-java:3.3.0") implementation("org.slf4j:slf4j-simple:1.7.30") + implementation(project(":lib")) } configurations { @@ -35,6 +35,12 @@ configurations { } } + +tasks.withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true +} + tasks.withType { options.encoding = "UTF-8" } @@ -42,9 +48,9 @@ tasks.withType { tasks.withType { manifest { attributes( - "Implementation-Title" to project.name, - "Implementation-Version" to project.version, - "Main-Class" to application.mainClass.get() + "Implementation-Title" to project.name, + "Implementation-Version" to project.version, + "Main-Class" to application.mainClass.get() ) } } @@ -58,46 +64,13 @@ tasks.withType { } } -// Find any 3rd party libraries which have released new versions -// to the central Maven repo since we last upgraded. -val checkLibVersions by tasks.registering { - doLast { - val checked = kotlin.collections.HashSet() - allprojects { - configurations.forEach { configuration -> - configuration.allDependencies.forEach { dependency -> - val version = dependency.version - if (!checked.contains(dependency)) { - val group = dependency.group - val path = group?.replace(".", "/") ?: "" - val name = dependency.name - val metaDataUrl = "https://repo1.maven.org/maven2/$path/$name/maven-metadata.xml" - try { - val url = org.codehaus.groovy.runtime.ResourceGroovyMethods.toURL(metaDataUrl) - val metaDataText = org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(url) - val metadata = groovy.util.XmlSlurper().parseText(metaDataText) - val newest = (metadata.getProperty("versioning") as groovy.util.slurpersupport.GPathResult).getProperty("latest") - if (version != newest.toString()) { - println("UPGRADE {\"group\": \"$group\", \"name\": \"$name\", \"current\": \"$version\", \"latest\": \"$newest\"}") - } - } catch (e: Throwable) { - logger.debug("Unable to download or parse $metaDataUrl: $e.message") - } - checked.add(dependency) - } - } - } - } - } -} - val assembleNativeImage by tasks.registering { dependsOn("assemble") var graalVMHome = "" doFirst { graalVMHome = System.getenv("GRAALVM_HOME") - ?: throw GradleException("Required GRAALVM_HOME environment variable not set.") + ?: throw GradleException("Required GRAALVM_HOME environment variable not set.") } doLast { @@ -108,22 +81,24 @@ val assembleNativeImage by tasks.registering { exec { workingDir = File(".") - 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.get().runtimeClasspath.asPath, - application.mainClass.get()) + 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.get().runtimeClasspath.asPath, + application.mainClass.get() + ) } } }