Add descriptions to all the tasks (#214)

* Add descriptions to all the tasks

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Apply suggestions from code review - thanks @Juuxel!

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
This commit is contained in:
Reece Dunham 2020-06-01 14:08:17 -04:00 committed by GitHub
parent f529c6e01e
commit 2baf39ad1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,32 +72,38 @@ public class LoomGradlePlugin extends AbstractPlugin {
TaskContainer tasks = target.getTasks();
tasks.register("cleanLoomBinaries", CleanLoomBinaries.class);
tasks.register("cleanLoomMappings", CleanLoomMappings.class);
tasks.register("cleanLoomBinaries", CleanLoomBinaries.class, t -> t.setDescription("Removes binary jars created by Loom."));
tasks.register("cleanLoomMappings", CleanLoomMappings.class, t -> t.setDescription("Removes mappings downloaded by Loom."));
tasks.register("cleanLoom").configure(task -> {
task.setGroup("fabric");
task.setDescription("Runs all Loom cleanup tasks.");
task.dependsOn(tasks.getByName("cleanLoomBinaries"));
task.dependsOn(tasks.getByName("cleanLoomMappings"));
});
tasks.register("migrateMappings", MigrateMappingsTask.class, t -> {
t.setDescription("Migrates mappings to a new version.");
t.getOutputs().upToDateWhen((o) -> false);
});
tasks.register("remapJar", RemapJarTask.class, t -> {
t.setDescription("Remaps the built project jar to intermediary mappings.");
t.setGroup("fabric");
});
tasks.register("genSourcesDecompile", FernFlowerTask.class, t -> {
t.setDescription("Decompiles sources for the genSources task.");
t.getOutputs().upToDateWhen((o) -> false);
});
tasks.register("genSourcesRemapLineNumbers", RemapLineNumbersTask.class, t -> {
t.setDescription("Remaps line numbers for the genSources task.");
t.getOutputs().upToDateWhen((o) -> false);
});
tasks.register("genSources", t -> {
t.setDescription("Generates a human-readable version of the Minecraft source.");
t.getOutputs().upToDateWhen((o) -> false);
t.setGroup("fabric");
});
@ -143,35 +149,41 @@ public class LoomGradlePlugin extends AbstractPlugin {
});
});
tasks.register("downloadAssets", DownloadAssetsTask.class);
tasks.register("downloadAssets", DownloadAssetsTask.class, t -> t.setDescription("Downloads required assets for Fabric."));
tasks.register("genIdeaWorkspace", GenIdeaProjectTask.class, t -> {
t.setDescription("Generates an IntelliJ IDEA workspace from this project.");
t.dependsOn("idea", "downloadAssets");
t.setGroup("ide");
});
tasks.register("genEclipseRuns", GenEclipseRunsTask.class, t -> {
t.setDescription("Generates Eclipse run configurations for this project.");
t.dependsOn("downloadAssets");
t.setGroup("ide");
});
tasks.register("cleanEclipseRuns", CleanEclipseRunsTask.class, t -> {
t.setDescription("Removes Eclipse run configurations for this project.");
t.setGroup("ide");
});
tasks.register("vscode", GenVsCodeProjectTask.class, t -> {
t.setDescription("Generates VSCode launch configurations.");
t.dependsOn("downloadAssets");
t.setGroup("ide");
});
tasks.register("remapSourcesJar", RemapSourcesJarTask.class);
tasks.register("remapSourcesJar", RemapSourcesJarTask.class, t -> t.setDescription("Remaps the project sources jar to intermediary names."));
tasks.register("runClient", RunClientTask.class, t -> {
t.setDescription("Starts a development version of the Minecraft client.");
t.dependsOn("jar", "downloadAssets");
t.setGroup("fabric");
});
tasks.register("runServer", RunServerTask.class, t -> {
t.setDescription("Starts a development version of the Minecraft server.");
t.dependsOn("jar");
t.setGroup("fabric");
});