-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
60 lines (48 loc) · 1.29 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
plugins {
id 'java'
id 'application'
}
group 'org.example'
version '0.1'
repositories {
mavenCentral()
}
dependencies {
compile "com.sparkjava:spark-core:2.8.0"
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.3'
compile 'org.postgresql:postgresql:42.2.12.jre7'
compile 'org.mockito:mockito-core:3.3.3'
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.6.2")
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes(
'Main-Class': 'traveler.RestTravelerMain'
)
}
}
run {
standardInput = System.in
}
task customFatJarRestTraveler(type: Jar) {
manifest {
attributes 'Main-Class': 'traveler.RestTravelerMain'
}
baseName = 'all-in-one-jar-rest-traveler'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task customFatJarStandaloneTraveler(type: Jar) {
manifest {
attributes 'Main-Class': 'traveler.TravelerMain'
}
baseName = 'all-in-one-jar-standalone-traveler'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
mainClassName="traveler/RestTravelerMain"