mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
update tiny-remapper
This commit is contained in:
@@ -64,9 +64,7 @@ public class MapJarsTiny {
|
||||
.withMappings(TinyUtils.createTinyMappingProvider(mappings, fromM, toM))
|
||||
.build();
|
||||
|
||||
OutputConsumerPath outputConsumer = null;
|
||||
try {
|
||||
outputConsumer = new OutputConsumerPath(output);
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(output)) {
|
||||
outputConsumer.addNonClassFiles(input);
|
||||
remapper.read(input);
|
||||
remapper.read(classpath);
|
||||
@@ -74,13 +72,6 @@ public class MapJarsTiny {
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to remap JAR", e);
|
||||
} finally {
|
||||
if (outputConsumer != null) {
|
||||
try {
|
||||
outputConsumer.finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
remapper.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,9 +99,7 @@ public class ModProcessor {
|
||||
.withMappings(TinyUtils.createTinyMappingProvider(mappings, fromM, toM))
|
||||
.build();
|
||||
|
||||
OutputConsumerPath outputConsumer = null;
|
||||
try {
|
||||
outputConsumer = new OutputConsumerPath(Paths.get(output.getAbsolutePath()));
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(Paths.get(output.getAbsolutePath()))) {
|
||||
outputConsumer.addNonClassFiles(input.toPath());
|
||||
if (!modCompileFiles.contains(input)) {
|
||||
remapper.read(input.toPath());
|
||||
@@ -113,13 +111,6 @@ public class ModProcessor {
|
||||
} catch (Exception e){
|
||||
throw new RuntimeException("Failed to remap JAR to " + toM, e);
|
||||
} finally {
|
||||
if (outputConsumer != null) {
|
||||
try {
|
||||
outputConsumer.finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
remapper.finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,9 +79,7 @@ public class ModRemapper {
|
||||
|
||||
TinyRemapper remapper = remapperBuilder.build();
|
||||
|
||||
OutputConsumerPath outputConsumer = null;
|
||||
try {
|
||||
outputConsumer = new OutputConsumerPath(modJarOutputPath);
|
||||
try (OutputConsumerPath outputConsumer = new OutputConsumerPath(modJarOutputPath)) {
|
||||
outputConsumer.addNonClassFiles(modJarPath);
|
||||
remapper.read(classpath);
|
||||
remapper.read(modJarPath);
|
||||
@@ -89,13 +87,6 @@ public class ModRemapper {
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to remap JAR", e);
|
||||
} finally {
|
||||
if (outputConsumer != null) {
|
||||
try {
|
||||
outputConsumer.finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
remapper.finish();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user