-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
107 lines (84 loc) · 2.98 KB
/
build.gradle.kts
File metadata and controls
107 lines (84 loc) · 2.98 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
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("com.gradleup.shadow") version "8.3.2"
id("java")
id("org.jetbrains.kotlin.jvm") version "2.0.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
}
group = "org.alexdev"
version = "1.0"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
}
dependencies {
compileOnly(libs.paperApi)
compileOnly(libs.bstatsBukkit)
compileOnly(libs.configlib)
compileOnly(libs.configlibPaper)
compileOnly(libs.bstatsBukkit)
implementation(libs.universalScheduler)
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
version = rootProject.version
tasks.named<Jar>("jar").configure {
dependsOn("shadowJar")
archiveBaseName.set("${rootProject.name}-${project.name.replaceFirstChar { it.uppercase() }}")
}
tasks.named<Delete>("clean").configure {
}
tasks.named<ShadowJar>("shadowJar") {
val relocation = "org.alexdev.itemcomponents.libraries."
relocate("com.github.Anon8281.universalScheduler", relocation + "universalScheduler")
dependencies {
exclude(dependency(":kotlin-stdlib"))
}
destinationDirectory.set(file("$rootDir/target"))
archiveFileName.set("${project.name}.jar")
minimize()
}
tasks {
runServer {
minecraftVersion("1.21.3")
downloadPlugins {
hangar("PlaceholderAPI", "2.11.6")
modrinth("luckperms", "v5.4.145-bukkit")
// github("ViaVersion", "ViaVersion", "5.1.1", "ViaVersion-5.1.1.jar")
// github("ViaVersion", "ViaBackwards", "5.1.1", "ViaBackwards-5.1.1.jar")
// github("MilkBowl", "Vault", "1.7.3", "Vault.jar")
url("https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar")
}
}
runPaper.folia.registerTask {
minecraftVersion("1.21.1")
downloadPlugins {
github("Anon8281", "PlaceholderAPI", "2.11.7", "PlaceholderAPI-2.11.7-DEV-Folia.jar")
url("https://cdn.modrinth.com/data/HQyibRsN/versions/J2guR3GH/MiniPlaceholders-Paper-2.2.4.jar")
url("https://ci.lucko.me/job/LuckPerms-Folia/lastSuccessfulBuild/artifact/bukkit/loader/build/libs/LuckPerms-Bukkit-5.4.141.jar")
url("https://github.com/retrooper/packetevents/releases/download/v2.4.0/packetevents-spigot-2.4.0.jar")
github("ViaVersion", "ViaVersion", "5.0.1", "ViaVersion-5.0.1.jar")
}
}
}
tasks.processResources {
from("src/main/resources") {
include("plugin.yml")
duplicatesStrategy = DuplicatesStrategy.INCLUDE
expand(
"configlibVersion" to libs.versions.configlibVersion.get(),
"version" to project.version
)
}
}