-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
112 lines (99 loc) · 3.56 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
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm") version "2.1.0"
id("com.gradleup.shadow") version "8.3.5"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
}
group = "net.guizhanss"
description = "InfinityExpansion2"
val mainPackage = "net.guizhanss.infinityexpansion2"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://s01.oss.sonatype.org/content/groups/public/")
maven("https://repo.alessiodp.com/releases/")
maven("https://jitpack.io")
}
dependencies {
compileOnly(kotlin("stdlib")) // loaded through library loader
compileOnly(kotlin("reflect")) // loaded through library loader
compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
compileOnly("com.github.Slimefun:Slimefun4:d12ae8580b")
compileOnly("net.guizhanss:SlimefunTranslation:e03b01a7b7")
compileOnly("com.github.schntgaispock:SlimeHUD:1.3.0")
implementation("net.guizhanss:guizhanlib-all:2.2.0-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.1.0")
implementation("it.unimi.dsi:fastutil:8.5.15")
implementation("com.jeff-media:MorePersistentDataTypes:2.4.0")
implementation("io.github.seggan:sf4k:0.8.0") {
exclude(group = "org.jetbrains.kotlin")
exclude(group = "com.github.Slimefun")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlin {
compilerOptions {
javaParameters = true
jvmTarget = JvmTarget.JVM_21
}
}
tasks.shadowJar {
fun doRelocate(from: String, to: String? = null) {
val last = to ?: from.split(".").last()
relocate(from, "$mainPackage.libs.$last")
}
doRelocate("net.byteflux.libby")
doRelocate("net.guizhanss.guizhanlib")
doRelocate("org.bstats")
doRelocate("io.github.seggan.sf4k")
doRelocate("io.papermc.lib", "paperlib")
doRelocate("it.unimi.dsi.fastutil")
doRelocate("com.jeff_media.morepersistentdatatypes")
minimize()
archiveClassifier = ""
}
bukkit {
main = "$mainPackage.InfinityExpansion2"
apiVersion = "1.20"
authors = listOf("ybw0014")
description = "More Slimefun content"
depend = listOf("Slimefun")
softDepend = listOf("GuizhanLibPlugin", "SlimefunTranslation", "InfinityExpansion", "SlimeHUD")
loadBefore = listOf("SlimeCustomizer", "RykenSlimeCustomizer")
commands {
register("infinityexpansion2") {
description = "InfinityExpansion2 command"
aliases = listOf("ie", "ie2", "infinityexpansion")
}
}
permissions {
register("infinityexpansion2.command.giverecipe") {
default = BukkitPluginDescription.Permission.Default.OP
}
register("infinityexpansion2.command.guide") {
default = BukkitPluginDescription.Permission.Default.TRUE
}
register("infinityexpansion2.command.printitem") {
default = BukkitPluginDescription.Permission.Default.OP
}
}
}
tasks {
runServer {
downloadPlugins {
// Slimefun
url("https://blob.build/dl/Slimefun4/Dev/latest")
// SlimeHUD
url("https://blob.build/dl/SlimeHUD/Dev/latest")
// GuizhanCraft for testing convenient
url("https://builds.guizhanss.com/api/download/ybw0014/GuizhanCraft/master/latest")
}
jvmArgs("-Dcom.mojang.eula.agree=true")
minecraftVersion("1.20.6")
}
}