-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
57 lines (44 loc) · 1.3 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
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
}
group 'com.github.damianw345'
//version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
//spark
compile group: 'com.sparkjava', name: 'spark-core', version: '2.8.0'
compile "com.sparkjava:spark-kotlin:1.0.0-alpha"
// slf4j - with logs
compile "org.slf4j:slf4j-simple:1.7.26"
//slf4j - suppress logs
// compile group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.26'
//archives
compile group: 'org.rauschig', name: 'jarchivelib', version: '1.0.0'
//cli
compile group: 'info.picocli', name: 'picocli', version: '3.9.5'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
jar{
manifest {
attributes(
'Main-Class': 'com.damianw345.woof4j.Woof4jCli'
)
}
// This line of code recursively collects and copies all of a project's files
// and adds them to the JAR itself. One can extend this task, to skip certain
// files or particular types at will
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
task copyJar(type: Copy) {
from jar
into 'src/main/resources'
}
build.dependsOn copyJar