-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
95 lines (83 loc) · 2.83 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
plugins {
id "java"
id "net.kyori.blossom" version "1.3.0"
id "signing"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = "io.github.lxgaming"
archivesBaseName = "DiscordMusic"
version = "2.5.3"
blossom {
replaceToken("@version@", version)
}
configurations {
}
repositories {
jcenter()
mavenCentral()
maven {
name = "dv8tion"
url = "https://m2.dv8tion.net/releases"
}
}
dependencies {
implementation("com.google.code.gson:gson:2.9.0")
implementation("com.google.guava:guava:31.1-jre")
implementation("com.jagrosh:jda-utilities-menu:3.0.+")
implementation("com.sedmelluq:lavaplayer:1.3.+")
implementation("io.github.lxgaming:common:1.1.2")
implementation("net.dv8tion:JDA:4.4.+")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("org.apache.commons:commons-text:1.10.0")
annotationProcessor("org.apache.logging.log4j:log4j-core:2.19.0")
implementation("org.apache.logging.log4j:log4j-core:2.19.0")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.19.0")
implementation("org.fusesource.jansi:jansi:2.4.0")
}
jar {
duplicatesStrategy(DuplicatesStrategy.INCLUDE)
manifest {
attributes("Main-Class": "io.github.lxgaming.discordmusic.Main")
}
from {
configurations.runtimeClasspath.findAll({
it.isDirectory() || it.name.endsWith(".jar")
}).collect({
it.isDirectory() ? it : zipTree(it)
})
}
}
processResources {
from("LICENSE")
rename("LICENSE", "LICENSE-${archivesBaseName}")
}
task signJar {
doFirst {
if (!project.hasProperty("signing.keyStorePath") || !project.hasProperty("signing.secretKeyRingFile")) {
project.logger.warn("========== [WARNING] ==========")
project.logger.warn("")
project.logger.warn(" This build is not signed! ")
project.logger.warn("")
project.logger.warn("========== [WARNING] ==========")
throw new StopExecutionException()
}
}
doLast {
configurations.archives.allArtifacts.files.each {
ant.signjar(
jar: it,
alias: project.property("signing.alias"),
storepass: project.property("signing.keyStorePassword"),
keystore: project.property("signing.keyStorePath"),
keypass: project.property("signing.keyStorePassword"),
preservelastmodified: project.property("signing.preserveLastModified"),
tsaurl: project.property("signing.timestampAuthority"),
digestalg: project.property("signing.digestAlgorithm")
)
project.logger.lifecycle("JAR Signed: ${it.name}")
signing.sign(it)
project.logger.lifecycle("PGP Signed: ${it.name}")
}
}
}