-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
107 lines (77 loc) · 2.39 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
plugins {
alias(libs.plugins.runPaper)
alias(libs.plugins.minotaur)
alias(libs.plugins.shadow)
`java-library`
}
rootProject.group = "com.ryderbelserion.simpleflags"
rootProject.version = "1.0.1"
rootProject.description = "A plugin that adds simple worldguard flags."
repositories {
maven("https://repo.papermc.io/repository/maven-public")
maven("https://repo.crazycrew.us/libraries")
maven("https://maven.enginehub.org/repo")
}
dependencies {
compileOnly(libs.vital.paper)
compileOnly(libs.worldguard)
compileOnly(libs.paper)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of("21"))
}
tasks {
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(21)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
assemble {
dependsOn(shadowJar)
doLast {
copy {
from(shadowJar.get())
into(rootProject.projectDir.resolve("jars"))
}
}
}
shadowJar {
archiveClassifier.set("")
}
runServer {
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
defaultCharacterEncoding = Charsets.UTF_8.name()
minecraftVersion(libs.versions.minecraft.get())
}
modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set(rootProject.name)
versionType.set("release")
versionName.set("${rootProject.name} ${rootProject.version}")
versionNumber.set(rootProject.version as String)
changelog.set(rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8))
uploadFile.set(shadowJar.get())
gameVersions.set(listOf(libs.versions.minecraft.get()))
loaders.addAll(listOf("purpur", "paper", "folia"))
syncBodyFrom.set(rootProject.file("README.md").readText(Charsets.UTF_8))
autoAddDependsOn.set(false)
detectLoaders.set(false)
}
processResources {
val props = mapOf(
"name" to rootProject.name,
"version" to rootProject.version,
"group" to rootProject.group,
"description" to rootProject.description,
"apiVersion" to libs.versions.minecraft.get()
)
filesMatching("paper-plugin.yml") {
expand(props)
}
}
}