-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
58 lines (47 loc) · 1.52 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
plugins {
java
kotlin("jvm") version "1.9.23"
id("io.papermc.paperweight.userdev") version "1.6.2"
id("xyz.jpenilla.run-paper") version "2.2.4"
}
group = "org.example"
version = "0.1.0"
repositories {
mavenCentral()
}
dependencies {
paperweight.paperDevBundle("1.20.5-R0.1-SNAPSHOT")
implementation("net.axay:kspigot:1.20.3")
}
val javaVersion = 21
tasks {
// 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(javaVersion)
}
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
}
/*
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/ExamplePlugin-${project.version}.jar"))
}
*/
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
kotlin {
jvmToolchain(javaVersion)
}