-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
56 lines (47 loc) · 1.19 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'eclipse'
repositories {
mavenCentral()
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.google.code.gson:gson:2.8.5'
}
jar {
baseName = "$jarname"
}
mainClassName = "vertical_spawn_control_client.Main"
//create a single Jar with all dependencies
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Main-Class': mainClassName
}
baseName = "$jarname"
archiveName = "${jarname}-${version}.jar"
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task dist(type: Zip, dependsOn: fatJar) {
from("${buildDir}/libs") {
include "${jarname}-${version}.jar"
}
from("${projectDir}") {
include 'LICENSE'
include 'README.md'
}
from ("${projectDir}/Licenses") {
include "**/*"
into "Licenses"
}
from ("${projectDir}/docs") {
include "**/*"
into "docs"
}
destinationDir = file("${buildDir}/dist")
baseName = "${jarname}"
}