-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (49 loc) · 1.42 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'java'
id 'application'
}
// Include dependent libraries in archive.
mainClassName = 'com.justinnelson.harmonymod.core.HarmonyMod'
group 'com.justinnelson'
repositories {
mavenCentral()
}
def jdaVersion = '5.0.0-alpha.17'
def appVersion = "current"
dependencies {
implementation("ch.qos.logback:logback-classic:1.2.8")
implementation 'org.mongodb:mongodb-driver-sync:4.7.1'
implementation group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.7.35'
implementation 'com.google.code.gson:gson:2.9.1'
implementation ("net.dv8tion:JDA:$jdaVersion") {
exclude module: 'opus-java'
}
}
shadowJar {
manifest {
attributes(
'Main-Class': 'com.justinnelson.harmonymod.core.HarmonyMod', 'Implementation-Version': appVersion
)
}
archiveBaseName.set('../../out/release')
archiveClassifier.set('')
archiveVersion.set(appVersion)
new File(projectDir, "run.bat").text = """
java -jar out/release-${appVersion}.jar
cmd /k
"""
new File(projectDir, "run.sh").text = """
java -jar out/release-${appVersion}.jar
cmd /k
"""
}
task stage(dependsOn: ['clean', 'shadowJar'])
build.mustRunAfter clean
jar {
manifest {
attributes(
'Main-Class': 'com.justinnelson.HarmonyMod.core.HarmonyMod', 'Implementation-Version': archiveVersion
)
}
}