diff --git a/build.gradle b/build.gradle index 9144bf45..35664929 100644 --- a/build.gradle +++ b/build.gradle @@ -53,16 +53,14 @@ dependencies { shade ('weave-asm:weave:0.1.0.7'){ transitive = false } - shade 'org.ow2.asm:asm-debug-all:5.2' - shade 'enigma-asm:enigma:0.12.0.17:lib' - shade 'net.fabricmc:tiny-remapper:+' + shade ('enigma-asm:enigma:0.12.0.33:lib'){ + exclude group: 'org.ow2.asm' + } + shade 'OpenModLoader.tiny-remapper:tiny-remapper:+' shade 'net.sf.jopt-simple:jopt-simple:5.0.4' shade 'org.apache.logging.log4j:log4j-api:2.11.0' shade 'org.apache.logging.log4j:log4j-core:2.11.0' - - shade 'cpw.mods:modlauncher:0.1.0-rc.3' - shade 'org.apache.commons:commons-lang3:3.5' } diff --git a/src/main/java/net/fabricmc/loom/util/ModRemapper.java b/src/main/java/net/fabricmc/loom/util/ModRemapper.java index 23fd5e26..67847127 100644 --- a/src/main/java/net/fabricmc/loom/util/ModRemapper.java +++ b/src/main/java/net/fabricmc/loom/util/ModRemapper.java @@ -69,7 +69,6 @@ public class ModRemapper { classpathFiles.addAll(project.getConfigurations().getByName("compile").getFiles()); classpathFiles.addAll(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES_CLIENT).getFiles()); classpathFiles.addAll(project.getConfigurations().getByName(Constants.CONFIG_MC_DEPENDENCIES).getFiles()); - classpathFiles.add(new File(Constants.MINECRAFT_FINAL_JAR.get(extension).getAbsolutePath()));//Seems to fix it not finding it Path[] classpath = new Path[classpathFiles.size()]; for (int i = 0; i < classpathFiles.size(); i++) { @@ -80,17 +79,22 @@ public class ModRemapper { .withMappings(TinyUtils.createTinyMappingProvider(mappings, fromM, toM)) .build(); - OutputConsumerPath outputConsumer = new OutputConsumerPath(modJar.toPath()); - //Rebof the deobf jar - outputConsumer.addNonClassFiles(deobfJar.toPath()); - remapper.read(deobfJar.toPath()); - remapper.read(classpath); - remapper.apply(deobfJar.toPath(), outputConsumer); - outputConsumer.finish(); - remapper.finish(); + try { + OutputConsumerPath outputConsumer = new OutputConsumerPath(modJar.toPath()); + //Rebof the deobf jar + outputConsumer.addNonClassFiles(deobfJar.toPath()); + remapper.read(deobfJar.toPath()); + remapper.read(classpath); + remapper.apply(deobfJar.toPath(), outputConsumer); + outputConsumer.finish(); + remapper.finish(); + } catch (Exception e){ + remapper.finish(); + throw new RuntimeException("Failed to remap jar", e); + } if(!deobfJar.exists() || !modJar.exists()){ - throw new RuntimeException("Failed to remap jar"); + throw new RuntimeException("Failed to rebof jar"); } //Add the deobf jar to be uploaded to maven