-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
98 lines (86 loc) · 2.78 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val javaVersion = "1.8"
val mcVersion = "1.8.8"
group = "de.hglabor"
version = "${mcVersion}_v1"
description = "Minecraft Hunger Games in $mcVersion"
plugins {
kotlin("jvm") version "1.6.21"
kotlin("plugin.serialization") version "1.6.0"
`java-library`
id("com.github.johnrengelman.shadow") version "7.0.0" // Used for building the plugin
id("net.minecrell.plugin-yml.bukkit") version "0.5.1" // Generates plugin.yml
}
repositories {
mavenLocal()
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/central")
maven("https://oss.sonatype.org/content/groups/public/")
}
dependencies {
implementation(kotlin("stdlib"))
// Spigot
compileOnly("org.spigotmc", "spigot-api", "$mcVersion-R0.1-SNAPSHOT")
// KSpigot
implementation(files("libs/KSpigot-1.8.0.jar"))
// KMONGO
implementation("org.litote.kmongo", "kmongo", "4.5.1")
implementation("org.litote.kmongo", "kmongo-serialization-mapping", "4.5.1")
// Kotlin
implementation("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.6.0-native-mt")
}
tasks {
shadowJar {
fun reloc(pkg: String) = relocate(pkg, "de.hglabor.dependency.$pkg")
reloc("net.axay")
//reloc("de.hglabor")
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = javaVersion
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
}
}
// Configure plugin.yml generation
bukkit {
load = net.minecrell.pluginyml.bukkit.BukkitPluginDescription.PluginLoadOrder.POSTWORLD
main = "de.hglabor.plugins.hungergames.HungerGames"
apiVersion = "1.8"
softDepend = listOf("WorldEdit")
authors = listOf("BestAuto")
commands {
register("start") {
description = "Start the next gamephase"
}
register("kit") {
description = "Choose a kit"
}
register("feast") {
description = "Point your compass towards the feast"
}
register("revive") {
description = "Revive a player"
}
register("settings") {
description = "Open the settings gui"
}
register("arenatp") {
description = "Teleport into arena world"
}
register("info") {
description = "Info about the game"
}
register("list") {
description = "Show all competing players"
}
register("staffmode") {
description = "Enter staffmode"
aliases = listOf("staff", "v", "vanish", "mod", "modmode")
}
register("banspecs") {
description = "Bans spectators for this game"
}
}
}