mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-05 13:40:38 +00:00
try to merge again
This commit is contained in:
parent
6d18f311e6
commit
685fce477c
184 changed files with 14906 additions and 1705 deletions
96
build.gradle.kts
Normal file
96
build.gradle.kts
Normal file
|
@ -0,0 +1,96 @@
|
|||
plugins {
|
||||
java
|
||||
application
|
||||
eclipse
|
||||
`check-lib-versions`
|
||||
}
|
||||
|
||||
version = "0.8.1"
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass.set("org.asamk.signal.Main")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
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")
|
||||
implementation(project(":lib"))
|
||||
}
|
||||
|
||||
configurations {
|
||||
implementation {
|
||||
resolutionStrategy.failOnVersionConflict()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
manifest {
|
||||
attributes(
|
||||
"Implementation-Title" to project.name,
|
||||
"Implementation-Version" to project.version,
|
||||
"Main-Class" to application.mainClass.get()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaExec> {
|
||||
val appArgs: String? by project
|
||||
if (appArgs != null) {
|
||||
// allow passing command-line arguments to the main application e.g.:
|
||||
// $ gradle run -PappArgs="['-u', '+...', 'daemon', '--json']"
|
||||
args = groovy.util.Eval.me(appArgs) as MutableList<String>
|
||||
}
|
||||
}
|
||||
|
||||
val assembleNativeImage by tasks.registering {
|
||||
dependsOn("assemble")
|
||||
|
||||
var graalVMHome = ""
|
||||
doFirst {
|
||||
graalVMHome = System.getenv("GRAALVM_HOME")
|
||||
?: throw GradleException("Required GRAALVM_HOME environment variable not set.")
|
||||
}
|
||||
|
||||
doLast {
|
||||
val nativeBinaryOutputPath = "$buildDir/native-image"
|
||||
val nativeBinaryName = "signal-cli"
|
||||
|
||||
mkdir(nativeBinaryOutputPath)
|
||||
|
||||
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())
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue