Fix OML building

dev/0.11
modmuss50 2018-08-07 15:56:39 +01:00
parent 60fd3105cc
commit dffcc5a9d8
No known key found for this signature in database
GPG Key ID: 773D17BE8BF49C82
2 changed files with 18 additions and 16 deletions

View File

@ -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'
}

View File

@ -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,6 +79,7 @@ public class ModRemapper {
.withMappings(TinyUtils.createTinyMappingProvider(mappings, fromM, toM))
.build();
try {
OutputConsumerPath outputConsumer = new OutputConsumerPath(modJar.toPath());
//Rebof the deobf jar
outputConsumer.addNonClassFiles(deobfJar.toPath());
@ -88,9 +88,13 @@ public class ModRemapper {
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