Skip to content

Commit

Permalink
Fix broken things
Browse files Browse the repository at this point in the history
- Fix wrong dependency names
- Fix absolute paths not working
  • Loading branch information
makamys committed Feb 11, 2024
1 parent 715852e commit db5f47e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ public class MigrateMappingsTask extends DefaultTask {

@Option(option = "mcpDir", description = "The directory containing the mappings to migrate to, using MCP's fields.csv and methods.csv format.")
public void setMcpDir(String mcpDir) {
this.mcpDir = new File(getProject().getProjectDir(), mcpDir);
this.mcpDir = getProject().file(mcpDir);
}

@Option(option = "inputDir", description = "The directory containing the source code to migrate.")
public void setInputDir(String inputDir) {
this.inputDir = new File(getProject().getProjectDir(), inputDir);
this.inputDir = getProject().file(inputDir);
}

@Option(option = "outputDir", description = "The directory the migrated source code should be written to.")
public void setOutputDir(String outputDir) {
this.outputDir = new File(getProject().getProjectDir(), outputDir);
this.outputDir = getProject().file(outputDir);
}

@TaskAction
Expand All @@ -58,10 +58,10 @@ public void migrateMappings() throws Exception {
throw new IllegalArgumentException("--mcpDir must be provided.");
}
if(inputDir == null) {
inputDir = new File(getProject().getProjectDir(), "src/main/java");
inputDir = getProject().file("src/main/java");
}
if(outputDir == null) {
outputDir = new File(getProject().getProjectDir(), "src/main/java");
outputDir = getProject().file("src/main/java");
}
GenSrgMappingsTask genSrgMappings = (GenSrgMappingsTask)getProject().getTasks().getByName("generateForgeSrgMappings");
File currentFields = genSrgMappings.getFieldsCsv().getAsFile().get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public ModUtils(Project project, MinecraftExtension mcExt, MinecraftTasks minecr
task.setGroup(TASK_GROUP_USER);
task.setDescription(
"Migrate main source set to a new set of mappings");
task.dependsOn(project.getTasks().getByName("taskExtractMcpData"));
task.dependsOn(project.getTasks().getByName("taskExtractForgeUserdev"));
task.dependsOn(project.getTasks().getByName("extractMcpData"));
task.dependsOn(project.getTasks().getByName("extractForgeUserdev"));
task.dependsOn(project.getTasks().getByName("packagePatchedMc"));
task.dependsOn(project.getTasks().getByName("injectTags"));
});
Expand Down

0 comments on commit db5f47e

Please sign in to comment.