Fixed Deobf Typo (#8)

dev/0.11
lclc98 2016-11-17 07:03:54 +10:00 committed by Modmuss50
parent a6ce8cfd9d
commit 017a7a3688
2 changed files with 13 additions and 13 deletions

View File

@ -246,7 +246,7 @@ public class AbstractPlugin implements Plugin<Project> {
if (extension.fabricVersion != null && !extension.fabricVersion.isEmpty()) { if (extension.fabricVersion != null && !extension.fabricVersion.isEmpty()) {
//only add this when not in a fabric dev env //only add this when not in a fabric dev env
project1.getDependencies().add(Constants.CONFIG_MC_DEPENDENCIES, "net.fabricmc:fabric-base:" + extension.version + "-" + extension.fabricVersion + ":debof"); project1.getDependencies().add(Constants.CONFIG_MC_DEPENDENCIES, "net.fabricmc:fabric-base:" + extension.version + "-" + extension.fabricVersion + ":deobf");
} }
project1.getDependencies().add(Constants.PROCESS_MODS_DEPENDENCIES, "net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT"); project1.getDependencies().add(Constants.PROCESS_MODS_DEPENDENCIES, "net.fabricmc:fabric-base:16w38a-0.0.4-SNAPSHOT");
}); });

View File

@ -42,19 +42,19 @@ public class ModRemapper {
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class); LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
//TODO whats the proper way of doing this??? //TODO whats the proper way of doing this???
File libsDir = new File(project.getBuildDir(), "libs"); File libsDir = new File(project.getBuildDir(), "libs");
File debofJar = new File(libsDir, project.getName() + "-" + project.getVersion() + "-debof.jar"); File deobfJar = new File(libsDir, project.getName() + "-" + project.getVersion() + "-deobf.jar");
File modJar = new File(libsDir, project.getName() + "-" + project.getVersion() + ".jar"); File modJar = new File(libsDir, project.getName() + "-" + project.getVersion() + ".jar");
if (!modJar.exists()) { if (!modJar.exists()) {
project.getLogger().error("Could not find mod jar @" + debofJar.getAbsolutePath()); project.getLogger().error("Could not find mod jar @" + deobfJar.getAbsolutePath());
project.getLogger().error("This is can be fixed by adding a 'settings.gradle' file specifying 'rootProject.name'"); project.getLogger().error("This is can be fixed by adding a 'settings.gradle' file specifying 'rootProject.name'");
return; return;
} }
if (debofJar.exists()) { if (deobfJar.exists()) {
debofJar.delete(); deobfJar.delete();
} }
//Move the pre existing mod jar to the debof jar //Move the pre existing mod jar to the deobf jar
modJar.renameTo(debofJar); modJar.renameTo(deobfJar);
Path mappings = Constants.MAPPINGS_TINY.get(extension).toPath(); Path mappings = Constants.MAPPINGS_TINY.get(extension).toPath();
@ -78,15 +78,15 @@ public class ModRemapper {
.build(); .build();
OutputConsumerPath outputConsumer = new OutputConsumerPath(modJar.toPath()); OutputConsumerPath outputConsumer = new OutputConsumerPath(modJar.toPath());
//Rebof the debof jar //Rebof the deobf jar
outputConsumer.addNonClassFiles(debofJar.toPath()); outputConsumer.addNonClassFiles(deobfJar.toPath());
remapper.read(debofJar.toPath()); remapper.read(deobfJar.toPath());
remapper.read(classpath); remapper.read(classpath);
remapper.apply(debofJar.toPath(), outputConsumer); remapper.apply(deobfJar.toPath(), outputConsumer);
outputConsumer.finish(); outputConsumer.finish();
remapper.finish(); remapper.finish();
//Add the debof jar to be uploaded to maven //Add the deobf jar to be uploaded to maven
project.getArtifacts().add("archives", debofJar); project.getArtifacts().add("archives", deobfJar);
} }
} }