update stitch, fix error when mappings partially present

dev/0.11
asie 2018-11-21 18:33:25 +01:00
parent b1d5bd0536
commit e0972e5349
2 changed files with 11 additions and 5 deletions

View File

@ -34,7 +34,7 @@ dependencies {
implementation ('org.zeroturnaround:zt-zip:1.13') implementation ('org.zeroturnaround:zt-zip:1.13')
implementation ('com.google.code.gson:gson:2.8.5') implementation ('com.google.code.gson:gson:2.8.5')
implementation ('com.google.guava:guava:27.0-jre') implementation ('com.google.guava:guava:27.0-jre')
implementation ('net.fabricmc:stitch:0.1.0.8') implementation ('net.fabricmc:stitch:0.1.0.9')
implementation ('net.fabricmc:tiny-remapper:0.1.0.18') { implementation ('net.fabricmc:tiny-remapper:0.1.0.18') {
transitive = false transitive = false
} }

View File

@ -71,10 +71,16 @@ public class PomfProvider extends DependencyProvider {
} }
if (!MAPPINGS_TINY_BASE.exists() || !MAPPINGS_TINY.exists()) { if (!MAPPINGS_TINY_BASE.exists() || !MAPPINGS_TINY.exists()) {
project.getLogger().lifecycle(":extracting " + mappingsJar.getName()); if (!MAPPINGS_TINY_BASE.exists()) {
try (FileSystem fileSystem = FileSystems.newFileSystem(mappingsJar.toPath(), null)) { project.getLogger().lifecycle(":extracting " + mappingsJar.getName());
Path fileToExtract = fileSystem.getPath("mappings/mappings.tiny"); try (FileSystem fileSystem = FileSystems.newFileSystem(mappingsJar.toPath(), null)) {
Files.copy(fileToExtract, MAPPINGS_TINY_BASE.toPath()); Path fileToExtract = fileSystem.getPath("mappings/mappings.tiny");
Files.copy(fileToExtract, MAPPINGS_TINY_BASE.toPath());
}
}
if (MAPPINGS_TINY.exists()) {
MAPPINGS_TINY.delete();
} }
project.getLogger().lifecycle(":populating field names"); project.getLogger().lifecycle(":populating field names");