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,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