From db5f47e3485ec7dfdf4a354ea2da51a1adc0e917 Mon Sep 17 00:00:00 2001 From: makamys Date: Sun, 11 Feb 2024 20:06:56 +0100 Subject: [PATCH] Fix broken things - Fix wrong dependency names - Fix absolute paths not working --- .../modutils/MigrateMappingsTask.java | 10 +++++----- .../retrofuturagradle/modutils/ModUtils.java | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/MigrateMappingsTask.java b/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/MigrateMappingsTask.java index 0e463861..8908f86d 100644 --- a/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/MigrateMappingsTask.java +++ b/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/MigrateMappingsTask.java @@ -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 @@ -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(); diff --git a/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/ModUtils.java b/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/ModUtils.java index 2de0366e..848215d8 100644 --- a/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/ModUtils.java +++ b/plugin/src/main/java/com/gtnewhorizons/retrofuturagradle/modutils/ModUtils.java @@ -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")); });