This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (55 loc) · 2.02 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
import xyz.jpenilla.resourcefactory.bukkit.BukkitPluginYaml
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "1.7.1"
id("xyz.jpenilla.run-paper") version "2.3.0"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.1.1"
}
val groupStringSeparator = "."
val kebabcaseStringSeparator = "-"
val snakecaseStringSeparator = "_"
fun capitaliseFirstLetter(string: String): String {
return string.first().uppercase() + string.slice(IntRange(1, string.length - 1))
}
fun snakecase(kebabcaseString: String): String {
return kebabcaseString.lowercase().replace(kebabcaseStringSeparator, snakecaseStringSeparator).replace(" ", snakecaseStringSeparator)
}
fun pascalcase(kebabcaseString: String): String {
var pascalCaseString = ""
val splitString = kebabcaseString.split(kebabcaseStringSeparator)
for (part in splitString) {
pascalCaseString += capitaliseFirstLetter(part)
}
return pascalCaseString
}
val mainProjectAuthor = "Esoteric Foundation"
val topLevelDomain = "foundation"
val projectAuthors = listOfNotNull(mainProjectAuthor, "rolyPolyVole", "Esoteric Enderman")
description = "A simple Minecraft plugin that prevents the use of rocket-boosted elytra in the overworld. Made for the SLIME SMP!"
group = topLevelDomain + groupStringSeparator + "esoteric"
version = "1.0.0"
val javaVersion = 21
val paperApiVersion = "1.21"
java {
toolchain.languageVersion = JavaLanguageVersion.of(javaVersion)
}
dependencies {
paperweight.paperDevBundle("$paperApiVersion-R0.1-SNAPSHOT")
}
tasks {
compileJava {
options.release = javaVersion
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
}
bukkitPluginYaml {
name = "BalancedElytra"
description = project.description
authors = projectAuthors
version = project.version.toString()
apiVersion = paperApiVersion
main = project.group.toString() + groupStringSeparator + "minecraft.smps.slime.plugins.elytra.balance" + groupStringSeparator + pascalcase(rootProject.name)
load = BukkitPluginYaml.PluginLoadOrder.STARTUP
}