Serialize resource pack snapshots with AstraPlus asset exports

This commit is contained in:
2026-09-06 19:50:13 +03:00
parent 222e04c683
commit 33eaec8b19
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ plugins {
id("net.neoforged.moddev") version "2.0.146"
}
group = "online.astradev"
version = "0.2.0"
version = "0.2.1"
repositories {
mavenCentral()
}
@@ -72,6 +72,14 @@ public final class PackBuilder {
}
private int writeArchive(Path contents, Path target, String resourceVersion) throws IOException {
// Shared with server-side exporters (AstraPlus). A build must see one complete asset generation.
String lock = "AstraPacks:contents:" + contents.toAbsolutePath().normalize().toString().toLowerCase(java.util.Locale.ROOT);
synchronized (lock.intern()) {
return writeLockedArchive(contents, target, resourceVersion);
}
}
private int writeLockedArchive(Path contents, Path target, String resourceVersion) throws IOException {
int files = 0;
long totalBytes = 0;
try (var paths = Files.walk(contents);