Skip to content

Commit

Permalink
rename task generateDiff -> diffTarget
Browse files Browse the repository at this point in the history
make diffTarget a TargetVersionConsumingTask
  • Loading branch information
supersaiyansubtlety committed Dec 3, 2024
1 parent e2a51c4 commit 481c090
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
* <p>
* The generated {@value DiffDirectoriesTask#DIFF_COMMAND} is useful when reviewing new mappings.
Expand Down Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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";
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
}

1 comment on commit 481c090

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No difference between head and target.

Please sign in to comment.