@@ -2,8 +2,8 @@ import xyz.jpenilla.resourcefactory.bukkit.BukkitPluginYaml
2
2
3
3
plugins {
4
4
`java- library`
5
- id(" io.papermc.paperweight.userdev" ) version " 1.5.15 "
6
- id(" xyz.jpenilla.run-paper" ) version " 2.2.3 " // Adds runServer and runMojangMappedServer tasks for testing
5
+ id(" io.papermc.paperweight.userdev" ) version " 1.6.0 "
6
+ id(" xyz.jpenilla.run-paper" ) version " 2.2.4 " // Adds runServer and runMojangMappedServer tasks for testing
7
7
id(" xyz.jpenilla.resource-factory-bukkit-convention" ) version " 1.1.1" // Generates plugin.yml based on the Gradle config
8
8
}
9
9
@@ -12,33 +12,40 @@ version = "1.0.0-SNAPSHOT"
12
12
description = " Test plugin for paperweight-userdev"
13
13
14
14
java {
15
- // Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example.
16
- toolchain.languageVersion = JavaLanguageVersion .of(17 )
15
+ // Configure the java toolchain. This allows gradle to auto-provision JDK 21 on systems that only have JDK 11 installed for example.
16
+ toolchain.languageVersion = JavaLanguageVersion .of(21 )
17
17
}
18
18
19
+ // 1)
20
+ // For 1.20.5+ when you don't care about supporting spigot
21
+ // paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
22
+
23
+ // 2)
24
+ // For 1.20.4 or below, or when you care about supporting Spigot on 1.20.5+
25
+ // Configure reobfJar to run when invoking the build task
26
+ /*
27
+ tasks.assemble {
28
+ dependsOn(tasks.reobfJar)
29
+ }
30
+ */
31
+
19
32
dependencies {
20
- paperweight.paperDevBundle(" 1.20.4 -R0.1-SNAPSHOT" )
21
- // paperweight.foliaDevBundle("1.20.4 -R0.1-SNAPSHOT")
22
- // paperweight.devBundle("com.example.paperfork", "1.20.4 -R0.1-SNAPSHOT")
33
+ paperweight.paperDevBundle(" 1.20.5 -R0.1-SNAPSHOT" )
34
+ // paperweight.foliaDevBundle("1.20.5 -R0.1-SNAPSHOT")
35
+ // paperweight.devBundle("com.example.paperfork", "1.20.5 -R0.1-SNAPSHOT")
23
36
}
24
37
25
38
tasks {
26
- // Configure reobfJar to run when invoking the build task
27
- assemble {
28
- dependsOn(reobfJar)
29
- }
30
-
31
39
compileJava {
32
- options.encoding = Charsets .UTF_8 .name() // We want UTF-8 for everything
33
-
34
40
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
35
41
// See https://openjdk.java.net/jeps/247 for more information.
36
- options.release = 17
42
+ options.release = 21
37
43
}
38
44
javadoc {
39
45
options.encoding = Charsets .UTF_8 .name() // We want UTF-8 for everything
40
46
}
41
47
48
+ // Only relevant when going with option 2 above
42
49
/*
43
50
reobfJar {
44
51
// This is an example of how you might change the output location for reobfJar. It's recommended not to do this
0 commit comments