-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
105 lines (80 loc) · 2.23 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
plugins {
with(libs.plugins) {
alias(kotlin)
alias(shadow)
alias(minotaur)
alias(runPaper)
alias(changelog)
alias(spotless)
}
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.md5lukas.de/public/")
}
dependencies {
implementation(libs.paper)
implementation(libs.stdlib)
implementation(libs.konfig)
implementation(libs.schedulers)
implementation(libs.pointers)
implementation(libs.bStats)
}
kotlin { jvmToolchain(libs.versions.jvmToolchain.get().toInt()) }
tasks {
compileKotlin {
compilerOptions.freeCompilerArgs.addAll(
"-Xjvm-default=all",
"-Xlambdas=indy",
)
}
shadowJar {
archiveClassifier = ""
minimize()
exclude("META-INF/")
dependencies {
include(dependency(libs.pointers.get()))
include(dependency(libs.schedulers.get()))
include(dependency(libs.konfig.get()))
include(dependency("org.bstats::"))
}
arrayOf(
"de.md5lukas.konfig",
"de.md5lukas.schedulers",
"de.md5lukas.waypoints.pointers",
"org.bstats")
.forEach { relocate(it, "de.md5lukas.questpointers.libs.${it.substringAfterLast('.')}") }
manifest { attributes("paperweight-mappings-namespace" to "mojang+yarn") }
}
processResources {
val properties =
mapOf(
"version" to project.version,
"kotlinVersion" to libs.versions.kotlin.get(),
)
inputs.properties(properties)
filteringCharset = "UTF-8"
filesMatching("plugin.yml") {
expand(properties)
}
}
runServer { minecraftVersion(libs.versions.paper.get().substringBefore('-')) }
}
spotless { kotlin { ktfmt() } }
modrinth {
val modrinthToken: String? by project
token = modrinthToken
projectId = "questpointers"
versionType = "release"
uploadFile.set(tasks.shadowJar)
gameVersions.addAll("1.20.2", libs.versions.paper.get().substringBefore('-'))
loaders.addAll("paper", "folia")
syncBodyFrom = provider { project.file("README.md").readText() }
changelog.set(
provider {
with(project.changelog) {
renderItem(getLatest().withEmptySections(false).withHeader(false))
}
})
}