-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
97 lines (71 loc) · 2.7 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
97 lines (71 loc) · 2.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import java.io.ByteArrayOutputStream
plugins {
java
id("com.gradleup.shadow") version ("9.4.3")
id("io.papermc.paperweight.userdev") version ("2.0.0-beta.21")
}
group = "me.zetastormy"
description = "A modern Minecraft server hub core solution. Based on DeluxeHub by ItsLewizzz."
version = buildString {
fun git(vararg args: String): String {
return providers.exec {
commandLine("git", *args)
}.standardOutput.asText.get().trim()
}
val latestTag = git("describe", "--tags", "--abbrev=0").replace("v", "")
append(latestTag)
val branchName = git("rev-parse", "--abbrev-ref", "HEAD")
if (branchName != "stable" && !branchName.startsWith("release")) {
val commitHash = git("rev-parse", "--short", "HEAD")
append("+").append(commitHash)
val gitStatus = git("status", "--porcelain")
if (!gitStatus.isEmpty()) {
append(".dirty")
}
}
}
val scoreboardLibraryVersion = "2.8.0"
val libsPackage = property("libsPackage") as String
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
repositories {
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.codemc.org/repository/maven-public")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://jitpack.io")
}
dependencies {
paperweight.paperDevBundle("1.21.6-R0.1-SNAPSHOT")
implementation("net.megavex:scoreboard-library-api:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-implementation:$scoreboardLibraryVersion")
compileOnly(platform("net.kyori:adventure-bom:4.23.0"))
compileOnly("net.kyori:adventure-text-minimessage")
compileOnly("net.kyori:adventure-api")
compileOnly("me.clip:placeholderapi:2.12.2")
compileOnly("com.arcaniax:HeadDatabase-API:1.3.2")
implementation("com.github.cryptomorin:XSeries:13.7.1")
compileOnly("io.github.miniplaceholders:miniplaceholders-api:3.1.0")
compileOnly("com.github.koca2000:NoteBlockAPI:1.7.0")
}
configurations.implementation {
exclude("org.bukkit", "bukkit")
}
tasks {
val projectVersion = project.version.toString()
processResources {
filesMatching("paper-plugin.yml") {
expand("version" to projectVersion)
}
}
shadowJar {
archiveClassifier.set("")
archiveFileName.set("Akropolis-${projectVersion}.jar")
relocate("net.megavex.scoreboardlibrary", "${libsPackage}.scoreboardlibrary")
relocate("com.cryptomorin.xseries", "${libsPackage}.xseries")
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
}