-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
122 lines (101 loc) · 4 KB
/
build.gradle.kts
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
val plasmoVoiceVersion: String by rootProject
plugins {
kotlin("jvm") version(libs.versions.kotlin.get())
alias(libs.plugins.shadow)
alias(libs.plugins.pv.entrypoints)
alias(libs.plugins.pv.java.templates)
`maven-publish`
}
if (properties.containsKey("snapshot")) {
version = "$version-SNAPSHOT"
}
repositories {
mavenCentral()
mavenLocal()
maven("https://repo.plasmoverse.com/snapshots")
maven("https://repo.plasmoverse.com/releases")
maven("https://jitpack.io/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://maven.lavalink.dev/snapshots")
maven("https://maven.lavalink.dev/releases")
// maven("https://maven.topi.wtf/releases")
}
dependencies {
compileOnly(kotlin("stdlib-jdk8"))
compileOnly(libs.pv.server)
compileOnly(libs.pv.proxy)
shadow(libs.lavaplayer.youtube)
// shadow("com.github.topi314.lavasrc:lavasrc:4.3.0") {
// exclude("org.jetbrains.kotlin")
// exclude("org.jetbrains.kotlinx")
// }
// shadow("com.github.topi314.lavasrc:lavasrc-protocol:4.3.0") {
// exclude("org.jetbrains.kotlin")
// exclude("org.jetbrains.kotlinx")
// }
shadow(libs.lavaplayer) {
exclude("org.slf4j")
}
}
tasks {
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(11)) // lavaplayer supports only java 11
withSourcesJar()
}
shadowJar {
configurations = listOf(project.configurations.shadow.get())
mergeServiceFiles()
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
archiveAppendix.set("")
relocate("org.apache", "su.plo.voice.lavaplayer.libs.org.apache")
relocate("org.jsoup", "su.plo.voice.lavaplayer.libs.org.jsoup")
relocate("com.fasterxml", "su.plo.voice.lavaplayer.libs.com.fasterxml")
relocate("com.fasterxml", "su.plo.voice.lavaplayer.libs.com.fasterxml")
relocate("net.iharder", "su.plo.voice.lavaplayer.libs.net.iharder")
relocate("ibxm", "su.plo.voice.lavaplayer.libs.ibxm")
relocate("net.sourceforge", "su.plo.voice.lavaplayer.libs.net.sourceforge")
relocate("org.json", "su.plo.voice.lavaplayer.libs.org.json")
relocate("org.intellij", "su.plo.voice.lavaplayer.libs.org.intellij")
relocate("org.jetbrains", "su.plo.voice.lavaplayer.libs.org.jetbrains")
// relocate("org.mozilla", "su.plo.voice.lavaplayer.libs.org.mozilla")
relocate("dev.lavalink", "su.plo.voice.lavaplayer.libs.dev.lavalink")
relocate("com.grack", "su.plo.voice.lavaplayer.libs.com.grack")
relocate("com.github.topi314", "su.plo.voice.lavaplayer.libs.com.github.topi314")
relocate("com.auth0", "su.plo.voice.lavaplayer.libs.com.auth0")
relocate("dev.schlaubi", "su.plo.voice.lavaplayer.libs.dev.schlaubi")
exclude("lavalink-plugins/**")
relocate("com.sedmelluq", "su.plo.voice.lavaplayer.libs.com.sedmelluq") {
exclude("com/sedmelluq/discord/lavaplayer/natives/**")
}
relocate("mozilla", "su.plo.voice.lavaplayer.libs.mozilla")
relocate("certificates", "su.plo.voice.lavaplayer.libs.certificates")
}
build {
dependsOn(shadowJar)
}
}
configure<PublishingExtension> {
publications.create<MavenPublication>(project.name) {
from(components["java"])
}
repositories {
if (properties.containsKey("snapshot")) {
maven("https://repo.plasmoverse.com/snapshots") {
name = "PlasmoVerseSnapshots"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
} else {
maven("https://repo.plasmoverse.com/releases") {
name = "PlasmoVerseReleases"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
}