warn about refmap name after fields are populated, might help some things
parent
6a77b5deaa
commit
0dcb7070be
|
@ -87,11 +87,6 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
configureIDEs();
|
||||
configureCompile();
|
||||
|
||||
if(extension.refmapName == null || extension.refmapName.isEmpty()){
|
||||
project.getLogger().warn("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
|
||||
extension.refmapName = project.getName() + "-refmap.json";
|
||||
}
|
||||
|
||||
Map<Project, Set<Task>> taskMap = project.getAllTasks(true);
|
||||
for (Map.Entry<Project, Set<Task>> entry : taskMap.entrySet()) {
|
||||
Project project = entry.getKey();
|
||||
|
@ -105,7 +100,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
|||
try {
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFileNamedIntermediary=" + extension.getMappingsProvider().MAPPINGS_TINY.getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFileNamedIntermediary=" + extension.getMappingsProvider().MAPPINGS_MIXIN_EXPORT.getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.refmapName).getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.getRefmapName()).getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=named:intermediary");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -216,4 +216,13 @@ public class LoomGradleExtension {
|
|||
public void setDependencyManager(LoomDependencyManager dependencyManager) {
|
||||
this.dependencyManager = dependencyManager;
|
||||
}
|
||||
|
||||
public String getRefmapName() {
|
||||
if(refmapName == null || refmapName.isEmpty()){
|
||||
project.getLogger().warn("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
|
||||
refmapName = project.getName() + "-refmap.json";
|
||||
}
|
||||
|
||||
return refmapName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,10 +101,8 @@ public class ModRemapper {
|
|||
throw new RuntimeException("Failed to reobfuscate JAR");
|
||||
}
|
||||
|
||||
if (extension.refmapName != null && extension.refmapName.length() > 0) {
|
||||
if (MixinRefmapHelper.addRefmapName(extension.refmapName, extension.getMixinJsonVersion(), modJarOutput)) {
|
||||
project.getLogger().debug("Transformed mixin reference maps in output JAR!");
|
||||
}
|
||||
if (MixinRefmapHelper.addRefmapName(extension.getRefmapName(), extension.getMixinJsonVersion(), modJarOutput)) {
|
||||
project.getLogger().debug("Transformed mixin reference maps in output JAR!");
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue