forked from solarrabbit99/LargeRaids
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
82 lines (69 loc) · 2.23 KB
/
build.gradle.kts
File metadata and controls
82 lines (69 loc) · 2.23 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.18"
id("com.gradleup.shadow") version "9.0.2"
}
group = "com.solarrabbit"
version = "1.11.8"
description = "LargeRaids"
val mcVersion = "1.21.11"
java {
// Configure the java toolchain. This allows gradle to auto-provision JDK 21 on systems that only have JDK 8 installed for example.
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
repositories {
maven("https://repo.helpch.at/releases/")
maven("https://mvn.lumine.io/repository/maven-public/")
}
tasks.withType<ShadowJar> {
archiveClassifier.set("")
configurations = listOf(project.configurations.shadow.get())
relocate("org.bstats", "com.solarrabbit.largeraids.bstats")
}
dependencies {
paperweight.paperDevBundle(mcVersion + "-R0.1-SNAPSHOT")
shadow("org.bstats:bstats-bukkit:3.1.0")
implementation("me.clip:placeholderapi:2.11.6")
implementation("io.lumine:Mythic-Dist:5.9.5")
}
tasks {
// Use shadowJar as the main output
jar {
enabled = false
}
// Configure reobfJar to run when invoking the build task
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
options.release.set(21)
}
javadoc {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
}
processResources {
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
expand("version" to version)
}
/*
reobfJar {
// This is an example of how you might change the output location for reobfJar. It's recommended not to do this
// for a variety of reasons, however it's asked frequently enough that an example of how to do it is included here.
outputJar.set(layout.buildDirectory.file("libs/PaperweightTestPlugin-${project.version}.jar"))
}
*/
}
tasks.register("getVersion") {
doLast {
println(version)
}
}
tasks.register("getMCVersion") {
doLast {
println(mcVersion)
}
}