This repository has been archived by the owner on Oct 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
97 lines (86 loc) · 3.08 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Enzo Bot, a multipurpose discord bot
*
* Copyright (c) 2018 William "Enzo" Johnstone
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
plugins {
id'java'
id'application'
id'maven'
id'com.github.johnrengelman.shadow' version '2.0.2'
id 'de.fuerstenau.buildconfig' version '1.1.8'
id 'idea'
}
group = 'ml.enzodevelopment'
version = "2.9.0_${getGitHashShort()}"
mainClassName = 'ml.enzodevelopment.enzobot.EnzoBot'
sourceCompatibility = 1.8
targetCompatibility = 1.8
shadowJar {
baseName = "EnzoBot"
classifier = null
version = null
libsDirName = "../out"
}
repositories {
maven { url 'http://jcenter.bintray.com' }
maven { url 'https://jitpack.io' }
maven { url 'mvnrepository.com' }
maven { url 'http://repo.maven.apache.org/maven2' }
}
buildConfig {
appName = project.name
version = project.version
buildConfigField("String", "OWNER_ID", "205056315351891969")
buildConfigField("String", "GH_COMMIT", "${getGitHash()}")
buildConfigField("String", "GH_COMMIT_SHORT", "${getGitHashShort()}")
packageName = 'ml.enzodevelopment.enzobot'
charset = 'UTF-8'
clsName = 'BuildConfig'
}
dependencies {
compile group: 'joda-time', name: 'joda-time', version: '2.8'
compile group: 'net.dv8tion', name: 'JDA', version:'3.7.1_385'
compile group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.3'
compile group: 'com.sedmelluq', name: 'lavaplayer', version:'1.3.7'
compile group: 'commons-io', name: 'commons-io', version:'2.6'
compile group: 'org.codehaus.groovy', name: 'groovy-all', version:'2.4.13'
compile group: 'mysql', name: 'mysql-connector-java', version:'8.0.8-dmr'
compile group: 'com.github.binaryoverload', name: 'JSON-Config', version:'2.7.8'
compile group: 'io.sentry', name: 'sentry-logback', version:'1.7.2'
compile group: 'org.apache.commons', name:'commons-lang3', version:'3.7'
}
compileJava.options.encoding = 'UTF-8'
def getGitHash() {
def stdout = new ByteArrayOutputStream()
exec {
//commandLine "cmd","/c",'git', 'rev-parse', 'master'
commandLine 'git', 'rev-parse', 'master'
standardOutput = stdout
}
return stdout.toString().trim()
}
def getGitHashShort() {
def stdout = new ByteArrayOutputStream()
exec {
// commandLine "cmd","/c",'git', 'rev-parse', '--short', 'master'
commandLine 'git', 'rev-parse', '--short', 'master'
standardOutput = stdout
}
return stdout.toString().trim()
}