-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
55 lines (49 loc) · 1.51 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
import java.util.*
plugins {
id("java-library")
id("maven-publish")
id("com.gradleup.shadow") version "8.3.3"
}
group = "${project.property("pluginGroup")}"
version = "${project.property("pluginVersion")}"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
testCompileOnly(group = "junit", name = "junit", version = "4.13.2")
compileOnly(group = "io.papermc.paper", name = "paper-api", version = "1.21.1-R0.1-SNAPSHOT")
compileOnly(group = "net.luckperms", name = "api", version = "5.4")
implementation(group = "io.papermc", name = "paperlib", version = "1.0.8")
implementation(group = "org.bstats", name = "bstats-bukkit", version = "3.0.2")
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
processResources {
filesMatching("plugin.yml") {
expand(
"version" to project.version,
)
}
}
jar {
archiveClassifier.set("noshade")
}
shadowJar {
archiveClassifier.set("")
archiveFileName.set("${rootProject.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}-${project.version}.jar")
relocate("io.papermc.lib", "org.popcraft.stress.paperlib")
relocate("org.bstats", "org.popcraft.stress.bstats")
}
build {
dependsOn(shadowJar)
}
}