-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
94 lines (80 loc) · 2.51 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
plugins {
`java-library`
`maven-publish`
id("com.gradleup.shadow") version "8.3.5"
}
group = "cn.dreeam.surf"
version = "5.0.0"
description = "Fix exploits and remove illegal/NBT items for anarchy servers"
repositories {
mavenCentral()
flatDir {
dirs("./libs")
}
// PaperMC
maven {
name = "papermc-repo"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
// NBT-API
maven {
name = "codemc-repo"
url = uri("https://repo.codemc.io/repository/maven-public/")
}
// ConfigurationMaster
maven {
name = "cm-repo"
url = uri("https://ci.pluginwiki.us/plugin/repository/everything/")
}
// JitPack
maven {
name = "jitpack.io"
url = uri("https://jitpack.io/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
implementation("com.github.thatsmusic99:ConfigurationMaster-API:v2.0.0-rc.2") {
exclude(group = "org.yaml", module = "snakeyaml")
}
implementation("org.bstats:bstats-bukkit:3.1.0")
implementation("com.github.technicallycoded:FoliaLib:0.4.3")
implementation("com.github.cryptomorin:XSeries:12.1.0")
implementation("de.tr7zw:item-nbt-api:2.14.1")
compileOnly(files("libs/RoseStacker-1.5.22.jar"))
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
build.configure {
dependsOn(shadowJar)
}
shadowJar {
archiveFileName = "${project.name}-${project.version}.${archiveExtension.get()}"
exclude("META-INF/**") // Dreeam - Avoid to include META-INF/maven in Jar
relocate("io.github.thatsmusic99.configurationmaster", "${project.group}.libs.configurationmaster")
relocate("org.bstats", "${project.group}.libs.bstats")
relocate("com.tcoded.folialib", "${project.group}.libs.folialib")
relocate("com.cryptomorin.xseries", "${project.group}.libs.xseries")
relocate("de.tr7zw.changeme.nbtapi", "${project.group}.libs.nbtapi")
}
processResources {
filesMatching("**/plugin.yml") {
expand(
"name" to project.name,
"version" to project.version,
"description" to project.description
)
}
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}