This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
108 lines (89 loc) · 3.31 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
plugins {
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.2'
id 'com.gorylenko.gradle-git-properties' version '1.4.17'
}
apply plugin: 'java'
apply plugin: 'idea'
version = '0.1.0'
group = 'com.avairebot'
description = 'AvaIre Music - 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 Music: 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
}
dependencies {
compile group: 'com.avairebot', name: 'Shared', version: 'c5c9b06aa9'
compile group: 'net.dv8tion', name: 'JDA', version: '3.6.0_375'
compile group: 'com.sedmelluq', name: 'lavaplayer', version: '1.2.62'
compile group: 'com.sedmelluq', name: 'jda-nas', version: '1.0.6'
compile group: 'com.github.Frederikam', name: 'Lavalink', version: '56719cf59e106daec3ba6ec3e012a8e955d0f24f'
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.yaml', name: 'snakeyaml', version: '1.19'
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: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'io.sentry', name: 'sentry-logback', version: '1.6.4'
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
]
}
}