Downloaded LWJGL libraries

- LWJGL is no longer shaded into the Bukkit jar
- plugin.yml lists the LWJGL jars and Linux natives as Spigot libraries
- The Paper loader resolves the same plugin.yml list through the Maven Central mirror
- The packed payload no longer reserves the LWJGL natives prefix
- Tests cover reading the library list from the plugin jar
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-28 21:55:09 -04:00
1 parent aec8f5be8e
commit 0d76d81dab
5 files changed
+67 -8

No files matched your search

@@ -4,9 +4,13 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import static org.junit.Assert.assertEquals;
@@ -31,4 +35,19 @@ public class IrisPluginLoaderTest {
assertEquals(List.of(relocatedCaffeine, relocatedGson), libraries);
}
@Test
public void readsMavenLibrariesFromTheSpigotDescriptorInThePluginJar() throws Exception {
Path jar = temporaryFolder.getRoot().toPath().resolve("Iris.jar");
try (OutputStream file = Files.newOutputStream(jar); ZipOutputStream zip = new ZipOutputStream(file)) {
zip.putNextEntry(new ZipEntry("plugin.yml"));
zip.write("name: Iris\nlibraries: [ 'org.lwjgl:lwjgl:3.4.3', 'org.lwjgl:lwjgl:jar:natives-linux:3.4.3' ]\n"
.getBytes(StandardCharsets.UTF_8));
zip.closeEntry();
}
List<String> libraries = IrisPluginLoader.mavenLibraries(jar);
assertEquals(List.of("org.lwjgl:lwjgl:3.4.3", "org.lwjgl:lwjgl:jar:natives-linux:3.4.3"), libraries);
}
}