-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
69 lines (58 loc) · 1.82 KB
/
build.gradle.kts
File metadata and controls
69 lines (58 loc) · 1.82 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
plugins {
kotlin("jvm") version "2.3.20-Beta1"
id("com.gradleup.shadow") version "8.3.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
}
version = properties["version"].toString()
group = properties["group"].toString()
description = properties["description"].toString()
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.tcoded.com/releases")
}
dependencies {
implementation("de.exlll:configlib-yaml:4.6.1")
implementation("com.tcoded:FoliaLib:0.5.1")
implementation("org.bstats:bstats-bukkit:3.1.0")
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
}
kotlin {
jvmToolchain(21)
}
tasks {
runServer {
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.21.8")
}
register("package") {
dependsOn(clean, shadowJar)
val outputDir = rootDir.resolve("outputs")
outputDir.mkdirs()
doLast {
val shadowJarFile = shadowJar.get().outputs.files.singleFile
shadowJarFile.copyTo(outputDir.resolve(shadowJarFile.name), overwrite = true)
}
}
shadowJar {
archiveFileName = "${rootProject.name}-paper-${project.version}.${archiveExtension.get()}"
exclude("META-INF/**")
relocate("org.bstats", "${project.group}.libs.bstats")
relocate("de.exlll.configlib", "${project.group}.libs.configlib")
relocate("com.tcoded.folialib", "${project.group}.lib.folialib")
}
processResources {
filesMatching("**/plugin.yml") {
expand(
"name" to rootProject.name,
"version" to project.version,
"description" to project.description
)
}
}
withType<JavaCompile> {
options.encoding = "UTF-8"
}
}