Skip to content

Commit 62fd5f2

Browse files
committed
1.20.5
1 parent aded5c0 commit 62fd5f2

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

build.gradle.kts

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import xyz.jpenilla.resourcefactory.bukkit.BukkitPluginYaml
22

33
plugins {
44
`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
77
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.1.1" // Generates plugin.yml based on the Gradle config
88
}
99

@@ -12,33 +12,40 @@ version = "1.0.0-SNAPSHOT"
1212
description = "Test plugin for paperweight-userdev"
1313

1414
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)
1717
}
1818

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+
1932
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")
2336
}
2437

2538
tasks {
26-
// Configure reobfJar to run when invoking the build task
27-
assemble {
28-
dependsOn(reobfJar)
29-
}
30-
3139
compileJava {
32-
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
33-
3440
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
3541
// See https://openjdk.java.net/jeps/247 for more information.
36-
options.release = 17
42+
options.release = 21
3743
}
3844
javadoc {
3945
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
4046
}
4147

48+
// Only relevant when going with option 2 above
4249
/*
4350
reobfJar {
4451
// This is an example of how you might change the output location for reobfJar. It's recommended not to do this

src/main/java/io/papermc/paperweight/testplugin/PluginBrigadierCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import org.bukkit.command.Command;
1414
import org.bukkit.command.CommandSender;
1515
import org.bukkit.command.PluginIdentifiableCommand;
16-
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
17-
import org.bukkit.craftbukkit.v1_20_R3.command.VanillaCommandWrapper;
16+
import org.bukkit.craftbukkit.CraftServer;
17+
import org.bukkit.craftbukkit.command.VanillaCommandWrapper;
1818
import org.bukkit.plugin.Plugin;
1919
import org.checkerframework.checker.nullness.qual.NonNull;
2020
import org.checkerframework.checker.nullness.qual.Nullable;

src/main/java/io/papermc/paperweight/testplugin/TestPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import net.minecraft.network.chat.ClickEvent;
1414
import net.minecraft.network.chat.Component;
1515
import net.minecraft.server.level.ServerPlayer;
16-
import org.bukkit.craftbukkit.v1_20_R3.CraftServer;
16+
import org.bukkit.craftbukkit.CraftServer;
1717
import org.bukkit.event.EventHandler;
1818
import org.bukkit.event.Listener;
1919
import org.bukkit.plugin.java.JavaPlugin;

0 commit comments

Comments
 (0)