-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
62 lines (54 loc) · 1.97 KB
/
build.gradle
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
plugins {
id 'java'
id 'application'
id('io.dinject.openapi') version('1.2')
id('com.github.sherter.google-java-format') version('0.9')
}
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
/*flatDir {
dirs '/home/vincent/Github/JRPClightning/build/libs'
}*/
}
dependencies {
//implementation name: 'jrpclightning-0.2.1-SNAPSHOT-with-dependencies'
implementation 'io.github.clightning4j:jrpclightning:0.2.2'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'io.javalin:javalin-bundle:4.6.0'
testImplementation 'com.squareup.okhttp3:okhttp:4.9.3'
testImplementation 'org.mockito:mockito-core:4.5.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.konghq:unirest-java:3.13.8'
testImplementation 'org.assertj:assertj-core:3.22.0'
testImplementation 'ch.qos.logback:logback-classic:1.2.11'
testImplementation 'ch.qos.logback:logback-core:1.2.11'
testImplementation 'org.slf4j:slf4j-api:1.7.36'
}
jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes(
'Class-Path': configurations.compileClasspath.collect { it.getName() }.join(' '),
'Main-Class': 'io.vincenzopalazzo.lightning.App'
)
}
from(configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
}
task createRunnableScript {
dependsOn("jar")
file("${projectDir}/${project.name}-gen.sh").createNewFile()
file("${projectDir}/${project.name}-gen.sh").write(
"""#!/bin/bash
# Script generated from gradle! By clightning4j
${System.getProperties().getProperty("java.home")}/bin/java -jar ${project.buildDir.absolutePath}/libs/${project.name}.jar
""")
}
application {
// Define the main class for the application.
mainClassName = 'io.vincenzopalazzo.lightning.App'
}