diff --git a/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java b/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java index 6a4397f292..def9302ee4 100644 --- a/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java +++ b/buildSrc/src/main/java/quilt/internal/plugin/TargetDiffPlugin.java @@ -27,6 +27,7 @@ import quilt.internal.task.decompile.DecompileVineflowerTask; import quilt.internal.task.diff.DecompileTargetVineflowerTask; import quilt.internal.task.diff.DiffDirectoriesTask; +import quilt.internal.task.diff.DiffTargetTask; import quilt.internal.task.diff.DownloadTargetMappingJarTask; import quilt.internal.task.diff.ExtractTargetMappingJarTask; import quilt.internal.task.diff.RemapTargetMinecraftJarTask; @@ -46,7 +47,7 @@ /** * {@linkplain TaskContainer#register Registers} tasks that download the latest published Quilt Mappings for the current * {@link QuiltMappingsExtension#getMinecraftVersion() minecraftVersion} so the - * {@value DiffDirectoriesTask#GENERATE_DIFF_TASK_NAME} task can {@value DiffDirectoriesTask#DIFF_COMMAND} + * {@value DiffTargetTask#DIFF_TARGET_TASK_NAME} task can {@value DiffDirectoriesTask#DIFF_COMMAND} * them with this project's mappings. *
* The generated {@value DiffDirectoriesTask#DIFF_COMMAND} is useful when reviewing new mappings. @@ -238,8 +239,8 @@ public void apply(@NotNull Project project) { // TODO LATER use this in generate-diff.yml tasks.register( - DiffDirectoriesTask.GENERATE_DIFF_TASK_NAME, - DiffDirectoriesTask.class, + DiffTargetTask.DIFF_TARGET_TASK_NAME, + DiffTargetTask.class, task -> { task.getAdditionalArgs().add("-bur"); diff --git a/buildSrc/src/main/java/quilt/internal/task/diff/DiffDirectoriesTask.java b/buildSrc/src/main/java/quilt/internal/task/diff/DiffDirectoriesTask.java index c162e838b4..ccdf7a00f8 100644 --- a/buildSrc/src/main/java/quilt/internal/task/diff/DiffDirectoriesTask.java +++ b/buildSrc/src/main/java/quilt/internal/task/diff/DiffDirectoriesTask.java @@ -14,10 +14,8 @@ import org.gradle.api.tasks.PathSensitive; import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskAction; -import org.gradle.api.tasks.TaskContainer; import org.gradle.api.tasks.options.Option; import quilt.internal.constants.Groups; -import quilt.internal.plugin.TargetDiffPlugin; import java.io.File; import java.io.FileOutputStream; @@ -39,11 +37,6 @@ */ @CacheableTask public abstract class DiffDirectoriesTask extends Exec { - /** - * {@linkplain TaskContainer#register Registered} by {@link TargetDiffPlugin}. - */ - public static final String GENERATE_DIFF_TASK_NAME = "generateDiff"; - public static final String DIFF_COMMAND = "diff"; private static final String DIFF_COMMAND_PHRASE = DIFF_COMMAND + " command"; diff --git a/buildSrc/src/main/java/quilt/internal/task/diff/DiffTargetTask.java b/buildSrc/src/main/java/quilt/internal/task/diff/DiffTargetTask.java new file mode 100644 index 0000000000..f830e0ed23 --- /dev/null +++ b/buildSrc/src/main/java/quilt/internal/task/diff/DiffTargetTask.java @@ -0,0 +1,11 @@ +package quilt.internal.task.diff; + +import org.gradle.api.tasks.TaskContainer; +import quilt.internal.plugin.TargetDiffPlugin; + +public abstract class DiffTargetTask extends DiffDirectoriesTask implements TargetVersionConsumingTask { + /** + * {@linkplain TaskContainer#register Registered} by {@link TargetDiffPlugin}. + */ + public static final String DIFF_TARGET_TASK_NAME = "diffTarget"; +}