rename mapping headers

dev/0.11
Adrian Siekierka 2018-11-02 17:19:57 +01:00
parent 6b17d207d5
commit dff255da68
5 changed files with 20 additions and 20 deletions

View File

@ -108,14 +108,14 @@ public class AbstractPlugin implements Plugin<Project> {
javaCompileTask.getClasspath().add(project.getConfigurations().getByName(Constants.CONFIG_MINECRAFT));
javaCompileTask.getClasspath().add(target.files(this.getClass().getProtectionDomain().getCodeSource().getLocation()));
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfIntermediary=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfIntermediary=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFileNamedIntermediary=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFileNamedIntermediary=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
if(extension.refmapName == null || extension.refmapName.isEmpty()){
project.getLogger().error("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
extension.refmapName = project.getName() + "-refmap.json";
}
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.refmapName).getCanonicalPath());
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=pomf:intermediary");
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=named:intermediary");
} catch (IOException e) {
e.printStackTrace();
}

View File

@ -60,24 +60,24 @@ public class ObfuscationServiceFabric implements IObfuscationService {
@Override
public Set<String> getSupportedOptions() {
ImmutableSet.Builder<String> builder = new ImmutableSet.Builder<>();
addSupportedOptions(builder, "mojang", "intermediary");
addSupportedOptions(builder, "mojang", "pomf");
addSupportedOptions(builder, "intermediary", "mojang");
addSupportedOptions(builder, "intermediary", "pomf");
addSupportedOptions(builder, "pomf", "mojang");
addSupportedOptions(builder, "pomf", "intermediary");
addSupportedOptions(builder, "official", "intermediary");
addSupportedOptions(builder, "official", "named");
addSupportedOptions(builder, "intermediary", "official");
addSupportedOptions(builder, "intermediary", "named");
addSupportedOptions(builder, "named", "official");
addSupportedOptions(builder, "named", "intermediary");
return builder.build();
}
@Override
public Collection<ObfuscationTypeDescriptor> getObfuscationTypes() {
return ImmutableSet.of(
createObfuscationType("mojang", "intermediary"),
createObfuscationType("mojang", "pomf"),
createObfuscationType("intermediary", "mojang"),
createObfuscationType("intermediary", "pomf"),
createObfuscationType("pomf", "mojang"),
createObfuscationType("pomf", "intermediary")
createObfuscationType("official", "intermediary"),
createObfuscationType("official", "named"),
createObfuscationType("intermediary", "official"),
createObfuscationType("intermediary", "named"),
createObfuscationType("named", "official"),
createObfuscationType("named", "intermediary")
);
}
}

View File

@ -40,7 +40,7 @@ import java.util.Arrays;
public class MapJarsTiny {
public void mapJars(MapJarsTask task) throws IOException {
String fromM = "mojang";
String fromM = "official";
Path mappings = task.getMappingFile().toPath();
Path[] classpath = task.getMapperPaths().stream()
@ -51,8 +51,8 @@ public class MapJarsTiny {
Path outputMapped = task.getMappedJar().toPath();
Path outputIntermediary = task.getIntermediaryJar().toPath();
for (String toM : Arrays.asList("pomf", "intermediary")) {
Path output = "pomf".equals(toM) ? outputMapped : outputIntermediary;
for (String toM : Arrays.asList("named", "intermediary")) {
Path output = "named".equals(toM) ? outputMapped : outputIntermediary;
task.getLogger().lifecycle(":remapping minecraft (TinyRemapper, " + fromM + " -> " + toM + ")");

View File

@ -75,7 +75,7 @@ public class ModProcessor {
private static void remapJar(File input, File output, Project project){
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
String fromM = "intermediary";
String toM = "pomf";
String toM = "named";
File mappingsFile = Constants.MAPPINGS_TINY.get(extension);
Path mappings = mappingsFile.toPath();

View File

@ -64,7 +64,7 @@ public class ModRemapper {
Path mappings = Constants.MAPPINGS_TINY.get(extension).toPath();
String fromM = "pomf";
String fromM = "named";
String toM = "intermediary";
List<File> classpathFiles = new ArrayList<>();