Skip to content

Commit

Permalink
fix: make ordering use a platform-independent sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhhleyyy committed Oct 24, 2024
1 parent 29c2166 commit 5f6033e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/fabricmc/loom/build/nesting/JarNester.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.IOException;
import java.nio.file.Files;
import java.util.Collection;
import java.util.Comparator;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand All @@ -52,7 +53,7 @@ public static void nestJars(Collection<File> jars, File modJar, Logger logger) {
Preconditions.checkArgument(FabricModJsonFactory.isModJar(modJar), "Cannot nest jars into none mod jar " + modJar.getName());

// Ensure deterministic ordering of entries in fabric.mod.json
Collection<File> sortedJars = jars.stream().sorted().toList();
Collection<File> sortedJars = jars.stream().sorted(Comparator.comparing(File::getName)).toList();

try {
ZipUtils.add(modJar.toPath(), sortedJars.stream().map(file -> {
Expand Down

0 comments on commit 5f6033e

Please sign in to comment.