update tiny-remapper
This commit is contained in:
		
							parent
							
								
									24b1b0669d
								
							
						
					
					
						commit
						823854f2a1
					
				
					 4 changed files with 4 additions and 31 deletions
				
			
		|  | @ -35,7 +35,7 @@ dependencies { | |||
| 	implementation ('com.google.code.gson:gson:2.8.5') | ||||
| 	implementation ('com.google.guava:guava:27.0-jre') | ||||
| 	implementation ('net.fabricmc:stitch:0.1.0.+') | ||||
| 	implementation ('net.fabricmc:tiny-remapper:0.1.0.16') { | ||||
| 	implementation ('net.fabricmc:tiny-remapper:0.1.0.17') { | ||||
| 		transitive = false | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -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(); | ||||
| 		} | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue