-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
74 lines (59 loc) · 1.7 KB
/
build.gradle
File metadata and controls
74 lines (59 loc) · 1.7 KB
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
plugins {
id 'java'
id 'io.github.goooler.shadow' version '8.1.8'
id 'xyz.jpenilla.run-paper' version '2.3.1'
}
group = 'com.sds.serverdiscord'
version = '1.0.0'
repositories {
mavenCentral()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
maven { url = 'https://repo.extendedclip.com/releases/' }
}
ext {
paperVersion = '1.21.8-R0.1-SNAPSHOT'
jdaVersion = '5.0.0'
placeholderApiVersion = '2.11.7'
}
dependencies {
compileOnly "io.papermc.paper:paper-api:${paperVersion}"
compileOnly "me.clip:placeholderapi:${placeholderApiVersion}"
implementation("net.dv8tion:JDA:${jdaVersion}") {
exclude module: 'opus-java'
}
}
def targetJavaVersion = 21
java {
toolchain {
languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
runServer {
minecraftVersion("1.21.8")
jvmArgs = ['-Xmx2G']
}
shadowJar {
archiveBaseName.set('ServerDiscordStatus')
archiveClassifier.set('')
// Relocate JDA и зависимости для избежания конфликтов
relocate 'net.dv8tion.jda', 'com.sds.serverdiscord.libs.jda'
relocate 'com.neovisionaries.ws', 'com.sds.serverdiscord.libs.ws'
relocate 'okhttp3', 'com.sds.serverdiscord.libs.okhttp3'
relocate 'okio', 'com.sds.serverdiscord.libs.okio'
mergeServiceFiles()
}
build {
dependsOn shadowJar
}
processResources {
filteringCharset = 'UTF-8'
filesMatching('plugin.yml') {
expand([version: project.version])
}
}