-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
118 lines (98 loc) · 3.7 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
plugins {
java
id("com.gradleup.shadow") version ("8.3.2")
id("io.papermc.paperweight.userdev") version ("1.7.4")
id("xyz.wagyourtail.jvmdowngrader") version ("1.2.0")
}
group = "me.xginko"
version = "1.3.2"
description = "Make snowball fights fun and engaging."
repositories {
mavenCentral()
maven("https://ci.pluginwiki.us/plugin/repository/everything/") {
name = "configmaster-repo"
}
maven("https://repo.codemc.io/repository/maven-releases/") {
name = "codemc-repo"
}
maven("https://repo.papermc.io/repository/maven-public/") {
name = "papermc-repo"
}
maven("https://oss.sonatype.org/content/groups/public/") {
name = "sonatype"
}
maven("https://mvn-repo.arim.space/lesser-gpl3/") {
name = "arim-mvn-lgpl3"
}
}
dependencies {
paperweight.foliaDevBundle("1.20.6-R0.1-SNAPSHOT");
compileOnly("org.apache.logging.log4j:log4j-core:2.23.1")
implementation("com.github.thatsmusic99:ConfigurationMaster-API:v2.0.0-rc.1")
implementation("com.github.ben-manes.caffeine:caffeine:2.9.3")
implementation("org.reflections:reflections:0.10.2")
implementation("space.arim.morepaperlib:morepaperlib:0.4.3")
implementation("com.github.cryptomorin:XSeries:11.3.0")
implementation("org.bstats:bstats-bukkit:3.0.2")
implementation("net.kyori:adventure-api:4.17.0")
implementation("net.kyori:adventure-text-serializer-ansi:4.17.0")
implementation("net.kyori:adventure-text-logger-slf4j:4.17.0")
implementation("net.kyori:adventure-text-minimessage:4.17.0")
implementation("net.kyori:adventure-platform-bukkit:4.3.4")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
build.configure {
dependsOn("shadowJar")
}
shadowJar {
archiveFileName.set("SnowballFight-${version}.jar")
relocate("io.github.thatsmusic99.configurationmaster", "me.xginko.snowballfight.libs.configmaster")
relocate("com.github.cryptomorin.xseries", "me.xginko.snowballfight.libs.xseries")
exclude(
"com/cryptomorin/xseries/XBiome*",
"com/cryptomorin/xseries/NMSExtras*",
"com/cryptomorin/xseries/NoteBlockMusic*",
"com/cryptomorin/xseries/SkullCacheListener*"
)
relocate("com.github.benmanes.caffeine", "me.xginko.snowballfight.libs.caffeine")
relocate("space.arim.morepaperlib", "me.xginko.snowballfight.libs.morepaperlib")
relocate("org.reflections", "me.xginko.snowballfight.libs.reflections")
relocate("org.bstats", "me.xginko.snowballfight.libs.bstats")
relocate("net.kyori", "me.xginko.snowballfight.libs.kyori")
}
processResources {
filesMatching("plugin.yml") {
expand(
mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description!!.replace('"'.toString(), "\\\""),
"url" to "https://github.com/xGinko/SnowballFight"
)
)
}
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn(shadowJar.get())
from(zipTree(shadowJar.get().archiveFile))
finalizedBy("shadeDowngradedApi")
}
shadeDowngradedApi {
archiveFileName = shadowJar.get().archiveFileName
destinationDirectory = projectDir.resolve("build/libs")
downgradeTo = JavaVersion.VERSION_1_8
shadePath = { _ -> "me/xginko/shadow/jvmdowngrader" }
}
}