// load mapping
JarMapping mapping = new JarMapping();
mapping.loadMappings(Files.newReader(srg, Charset.defaultCharset()), null, null, reverse);
// make remapper
JarRemapper remapper = new JarRemapper(null, mapping);
// load jar
Jar input = Jar.init(inJar);
// ensure that inheritance provider is used
JointProvider inheritanceProviders = new JointProvider();
inheritanceProviders.add(new JarProvider(input));
if (classpath != null)
inheritanceProviders.add(new ClassLoaderProvider(new URLClassLoader(toUrls(classpath))));
mapping.setFallbackInheritanceProvider(inheritanceProviders);
File out = getOutJar();
if (!out.getParentFile().exists()) //Needed because SS doesn't create it.
{
out.getParentFile().mkdirs();
}
// remap jar
remapper.remapJar(input, getOutJar());
}