-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
80 lines (72 loc) · 2.28 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
group 'net.arrowgene.dance'
version gradle.ext.dance_version
apply plugin: 'java'
apply plugin: 'application'
mainClassName = "net.arrowgene.dance.Starter"
run {
args += 'server'
}
sourceCompatibility = 1.7
jar {
manifest {
attributes 'Name': 'arrowgene/dance/',
'Specification-Title': 'Server for Dance! Online',
'Specification-Version': version,
'Specification-Vendor': gradle.ext.dance_vendor,
'Implementation-Title': 'arrowgene.dance',
'Implementation-Version': version,
'Implementation-Vendor': gradle.ext.dance_vendor,
'Main-Class': 'net.arrowgene.dance.Starter'
}
}
repositories {
mavenCentral()
}
sourceSets {
main {
output.resourcesDir = 'bin/'
output.classesDir = 'bin/'
}
}
dependencies {
compile project(':server')
compile project(':editor')
compile project(':query')
testCompile group: 'junit', name: 'junit', version: '4.11'
}
/*
* This task builds and bundles the project to a single executable .jar-file.
*
* Run it with 'gradle fatJar' or 'gradlew fatJar'.
* The file can be found in './dance-bundle-VERSION.jar'.
*
* For arguments used in this task see the following documentation:
* https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html
*
* This task was tested with gradle 3.4.1
*
* Notice:
* The 'manifest'-property is 'incubating' so it may change in future gradle-versions.
*/
task fatJar(type: Jar) {
manifest {
attributes 'Name': 'arrowgene/dance/',
'Specification-Title': 'Server for Dance! Online',
'Specification-Version': version,
'Specification-Vendor': gradle.ext.dance_vendor,
'Implementation-Title': 'arrowgene.dance',
'Implementation-Version': version,
'Implementation-Vendor': gradle.ext.dance_vendor,
'Main-Class': 'net.arrowgene.dance.Starter'
}
if (project.hasProperty('server')) {
// `gradle fatjar -Pserver`
// Create a fatJar without version number in the name.
archiveName = project.name + ".jar"
} else {
baseName = project.name
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
destinationDir = file("$rootDir/")
with jar
}