forked from avaire/avaire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (103 loc) · 4.29 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'com.gorylenko.gradle-git-properties' version '2.0.0'
}
apply plugin: 'java'
apply plugin: 'idea'
version = '0.10.5'
group = 'com.avairebot'
description = 'AvaIre Discord Bot'
mainClassName = 'com.avairebot.Main'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
moduleName = 'AvaIre'
}
shadowJar {
archiveName = "AvaIre.jar"
doLast {
copy {
from 'build/libs/AvaIre.jar'
into '.'
}
}
}
tasks.withType(JavaCompile) {
dependsOn 'clean'
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:-unchecked"
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'AvaIre: Discord Bot',
'Implementation-Version': version,
'Main-Class': 'com.avairebot.Main'
}
baseName = project.name
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
javadoc {
failOnError = false
options.memberLevel = JavadocMemberLevel.PUBLIC
options.author()
options.encoding = 'UTF-8'
options.addStringOption('-html5')
}
repositories {
mavenCentral() // Main maven repo
jcenter() // JDA and some other stuff
mavenLocal() // Useful for developing
maven { url "https://jitpack.io" } // Build projects directly from github
// Used for pulling down Lavaplayer plugins/extensions
maven { url 'https://dl.bintray.com/sedmelluq/com.sedmelluq' }
}
dependencies {
compile group: 'com.avairebot', name: 'Shared', version: '80809049d2'
compile group: 'net.dv8tion', name: 'JDA', version: '4.2.0_168'
compile group: 'com.sedmelluq', name: 'lavaplayer', version: '1.3.50'
compile group: 'com.sedmelluq', name: 'lavaplayer-ext-youtube-rotator', version: '0.2.3'
compile group: 'com.sedmelluq', name: 'jda-nas', version: '1.1.0'
compile group: 'com.github.FredBoat', name: 'Lavalink-Client', version: '4.0'
compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
compile group: 'org.apache.commons', name: 'commons-text', version: '1.1'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
compile group: 'org.yaml', name: 'snakeyaml', version: '1.19'
compile group: 'org.jsoup', name: 'jsoup', version: '1.11.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.46'
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
compile group: 'ai.api', name: 'libai', version: '1.6.12'
compile group: 'com.sparkjava', name: 'spark-core', version: '2.7.1'
compile group: 'io.prometheus', name: 'simpleclient', version: '0.1.0'
compile group: 'io.prometheus', name: 'simpleclient_servlet', version: '0.1.0'
compile group: 'io.prometheus', name: 'simpleclient_logback', version: '0.1.0'
compile group: 'io.prometheus', name: 'simpleclient_hotspot', version: '0.1.0'
compile group: 'io.prometheus', name: 'simpleclient_guava', version: '0.1.0'
compile group: 'com.udojava', name: 'EvalEx', version: '1.18'
compile group: 'com.vdurmont', name: 'emoji-java', version: '4.0.0'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'io.sentry', name: 'sentry-logback', version: '1.7.10'
compile group: 'org.reflections', name: 'reflections', version: '0.9.11'
// Tests
// Only needed to run tests in a version of IntelliJ IDEA that bundles older versions
compile("org.junit.platform:junit-platform-launcher:1.1.0")
compile("org.junit.jupiter:junit-jupiter-engine:5.1.0")
compile("org.junit.vintage:junit-vintage-engine:5.1.0")
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
filesMatching("**/app.properties") {
filter ReplaceTokens, tokens: [
"project.version" : project.version,
"project.groupId" : project.group,
"project.artifactId": project.ext.moduleName
]
}
}