forked from R3alCl0ud/DiscLoader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·69 lines (58 loc) · 1.36 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
mainClassName = 'io.discloader.discloader.common.start.Main'
version = ""
repositories {
mavenCentral()
jcenter()
}
jar {
baseName = 'discloader'
version = version
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.mashape.unirest:unirest-java:1.4.9'
compile 'org.json:json:20160810'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.neovisionaries:nv-websocket-client:1.31'
compile group: 'com.neovisionaries', name: 'nv-websocket-client', version: '1.31'
compile "joda-time:joda-time:2.2"
compile 'com.sedmelluq:lavaplayer:1.2.24'
testCompile "junit:junit:4.12"
}
sourceSets {
main {
resources {
srcDir 'assets'
}
java {
srcDir 'java'
}
}
}
task buildInfo {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
proc.waitFor()
if (proc.exitValue() == 0) {
ext.revision = proc.text.trim()
} else {
ext.revision = "GITBORK"
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = "build${System.getenv().BUILD_NUMBER}"
} else {
ext.buildNum = "DEV.${project.buildInfo.revision}"
}
version = ext.buildNum
}
build {
dependsOn clean
dependsOn buildInfo
dependsOn jar
buildInfo.mustRunAfter clean
jar.mustRunAfter buildInfo
}