-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
45 lines (38 loc) · 1.1 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
plugins {
id 'java'
}
group 'com.github.luka5w.fileserver'
version 'pre0.0.3'
ext {
mainClass = project.group + '.Main'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'commons-cli:commons-cli:1.4'
compile 'org.ini4j:ini4j:0.5.4'
compile 'org.json:json:20171018'
compile 'org.jetbrains:annotations:13.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
}
jar {
manifest {
attributes (
'Implementation-Title': rootProject.name,
'Implementation-Version': project.version,
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
'Main-Class': project.ext.mainClass
)
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
task runMain(dependsOn: 'classes', type: JavaExec) {
main = project.ext.mainClass
classpath = sourceSets.main.runtimeClasspath
// arguments, the program (jar) should execute with
//args = ["--setup"]
args = [""]
}