This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
98 lines (73 loc) · 2.34 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
plugins {
id("io.papermc.paperweight.userdev") version "1.5.9"
id("xyz.jpenilla.run-paper") version "2.2.3"
`java-library`
}
base {
archivesName.set(rootProject.name)
}
repositories {
maven("https://repo.papermc.io/repository/maven-public/")
exclusiveContent {
forRepository {
maven("https://api.modrinth.com/maven/")
}
filter { includeGroup("maven.modrinth") }
}
}
rootProject.version = if (System.getenv("BUILD_NUMBER") != null) "${rootProject.version}-${System.getenv("BUILD_NUMBER")}" else rootProject.version
val mcVersion = providers.gradleProperty("minecraftVersion").get()
dependencies {
paperweight.paperDevBundle("$mcVersion-R0.1-SNAPSHOT")
compileOnly("maven.modrinth", "pl3xmap", providers.gradleProperty("pl3xmapVersion").get())
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of("17"))
}
tasks {
javadoc {
options.encoding = "UTF-8"
}
compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
runServer {
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
defaultCharacterEncoding = Charsets.UTF_8.name()
minecraftVersion(mcVersion)
downloadPlugins {
hangar("Chunky", "1.3.136")
modrinth("pl3xmap", providers.gradleProperty("pl3xmapVersion").get())
url("https://ci.lucko.me/job/spark/401/artifact/spark-bukkit/build/libs/spark-1.10.60-bukkit.jar")
}
}
val jarsDir = File("$rootDir/jars")
assemble {
doFirst {
delete(jarsDir)
jarsDir.mkdirs()
}
dependsOn(reobfJar)
doLast {
copy {
from(rootProject.layout.buildDirectory.files("libs/${rootProject.name}-${rootProject.version}.jar"))
into(jarsDir)
}
}
}
processResources {
val props = mapOf(
"name" to rootProject.name,
"group" to rootProject.group,
"version" to rootProject.version,
"description" to rootProject.description,
"authors" to rootProject.properties["authors"],
"website" to rootProject.properties["website"],
"apiVersion" to rootProject.properties["apiVersion"],
)
filesMatching("plugin.yml") {
expand(props)
}
}
}