forked from AsamK/signal-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
84 lines (72 loc) · 2.08 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
plugins {
java
application
eclipse
`check-lib-versions`
id("org.graalvm.buildtools.native") version "0.9.9"
}
version = "0.10.2"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
mainClass.set("org.asamk.signal.Main")
}
graalvmNative {
binaries {
this["main"].run {
configurationFileDirectories.from(file("graalvm-config-dir"))
buildArgs.add("--allow-incomplete-classpath")
buildArgs.add("--report-unsupported-elements-at-runtime")
}
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("org.bouncycastle", "bcprov-jdk15on", "1.70")
implementation("com.fasterxml.jackson.core", "jackson-databind", "2.13.1")
implementation("net.sourceforge.argparse4j", "argparse4j", "0.9.0")
implementation("com.github.hypfvieh", "dbus-java-transport-native-unixsocket", "4.0.0")
implementation("org.slf4j", "slf4j-api", "1.7.32")
implementation("ch.qos.logback", "logback-classic", "1.2.10")
implementation("org.slf4j", "jul-to-slf4j", "1.7.32")
implementation(project(":lib"))
}
configurations {
implementation {
resolutionStrategy.failOnVersionConflict()
}
}
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}
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()
)
}
}
task("fatJar", type = Jar::class) {
archiveBaseName.set("${project.name}-fat")
exclude(
"META-INF/*.SF",
"META-INF/*.DSA",
"META-INF/*.RSA",
"META-INF/NOTICE",
"META-INF/LICENSE",
"**/module-info.class"
)
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
with(tasks.jar.get() as CopySpec)
}