]> nmode's Git Repositories - signal-cli/blob - build.gradle.kts
Return json response if available in error data field
[signal-cli] / build.gradle.kts
1 plugins {
2 java
3 application
4 eclipse
5 `check-lib-versions`
6 id("org.graalvm.buildtools.native") version "0.9.6"
7 }
8
9 version = "0.9.2"
10
11 java {
12 sourceCompatibility = JavaVersion.VERSION_17
13 targetCompatibility = JavaVersion.VERSION_17
14 }
15
16 application {
17 mainClass.set("org.asamk.signal.Main")
18 }
19
20 graalvmNative {
21 binaries {
22 this["main"].run {
23 configurationFileDirectories.from(file("graalvm-config-dir"))
24 buildArgs.add("--allow-incomplete-classpath")
25 buildArgs.add("--report-unsupported-elements-at-runtime")
26 }
27 }
28 }
29
30 repositories {
31 mavenLocal()
32 mavenCentral()
33 maven {
34 url = uri("https://raw.github.com/AsamK/maven/master/releases/")
35 }
36 }
37
38 dependencies {
39 implementation("org.bouncycastle:bcprov-jdk15on:1.69")
40 implementation("net.sourceforge.argparse4j:argparse4j:0.9.0")
41 implementation("com.github.hypfvieh:dbus-java-transport-native-unixsocket:4.0.0-beta")
42 implementation("org.slf4j:slf4j-simple:1.7.32")
43 implementation("org.slf4j", "jul-to-slf4j", "1.7.32")
44 implementation(project(":lib"))
45 }
46
47 configurations {
48 implementation {
49 resolutionStrategy.failOnVersionConflict()
50 }
51 }
52
53
54 tasks.withType<AbstractArchiveTask>().configureEach {
55 isPreserveFileTimestamps = false
56 isReproducibleFileOrder = true
57 }
58
59 tasks.withType<JavaCompile> {
60 options.encoding = "UTF-8"
61 }
62
63 tasks.withType<Jar> {
64 manifest {
65 attributes(
66 "Implementation-Title" to project.name,
67 "Implementation-Version" to project.version,
68 "Main-Class" to application.mainClass.get()
69 )
70 }
71 }
72
73 task("fatJar", type = Jar::class) {
74 archiveBaseName.set("${project.name}-fat")
75 exclude(
76 "META-INF/*.SF",
77 "META-INF/*.DSA",
78 "META-INF/*.RSA",
79 "META-INF/NOTICE",
80 "META-INF/LICENSE",
81 "**/module-info.class"
82 )
83 from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
84 with(tasks.jar.get() as CopySpec)
85 }