-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathbuild.gradle
44 lines (37 loc) · 933 Bytes
/
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
apply plugin: 'java'
apply plugin: 'eclipse'
compileJava {
sourceCompatibility = 17
}
compileTestJava {
sourceCompatibility = 17
}
jar {
manifest {
attributes 'Main-Class': 'ro.polak.http.cli.DefaultCliServerGui'
}
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'StandaloneHTTP server',
'Main-Class': 'ro.polak.http.cli.DefaultCliServerGui'
}
// baseName = project.name + '-all'
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':http')
}
task(bootRun, dependsOn: fatJar) {
doLast {
print "$buildDir/libs/cli.jar"
javaexec {
main = "-jar"
args = [
"$buildDir/libs/cli-all.jar"
]
}
}
}