Put tasks in 'fabric' group

dev/0.11
therealfarfetchd 2018-12-22 17:06:18 +01:00
parent baaf430fd8
commit 58512f2f47
12 changed files with 29 additions and 22 deletions

View File

@ -25,11 +25,10 @@
package net.fabricmc.loom.task; package net.fabricmc.loom.task;
import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.LoomGradleExtension;
import org.gradle.api.DefaultTask;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
public class CleanLoomBinaries extends DefaultTask { public class CleanLoomBinaries extends DefaultLoomTask {
@TaskAction @TaskAction
public void run() { public void run() {
Project project = this.getProject(); Project project = this.getProject();

View File

@ -26,14 +26,13 @@ package net.fabricmc.loom.task;
import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.util.DeletingFileVisitor; import net.fabricmc.loom.util.DeletingFileVisitor;
import org.gradle.api.DefaultTask;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
public class CleanLoomMappings extends DefaultTask { public class CleanLoomMappings extends DefaultLoomTask {
@TaskAction @TaskAction
public void run() { public void run() {
Project project = this.getProject(); Project project = this.getProject();

View File

@ -0,0 +1,11 @@
package net.fabricmc.loom.task;
import org.gradle.api.DefaultTask;
public abstract class DefaultLoomTask extends DefaultTask {
public DefaultLoomTask() {
setGroup("fabric");
}
}

View File

@ -26,14 +26,13 @@ package net.fabricmc.loom.task;
import net.fabricmc.loom.util.RunConfig; import net.fabricmc.loom.util.RunConfig;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
public class GenEclipseRunsTask extends DefaultTask { public class GenEclipseRunsTask extends DefaultLoomTask {
@TaskAction @TaskAction
public void genRuns() throws IOException { public void genRuns() throws IOException {

View File

@ -26,7 +26,6 @@ package net.fabricmc.loom.task;
import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.util.RunConfig; import net.fabricmc.loom.util.RunConfig;
import org.gradle.api.DefaultTask;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@ -46,7 +45,7 @@ import javax.xml.transform.stream.StreamResult;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
public class GenIdeaProjectTask extends DefaultTask { public class GenIdeaProjectTask extends DefaultLoomTask {
@TaskAction @TaskAction
public void genIdeaRuns() throws IOException, ParserConfigurationException, SAXException, TransformerException { public void genIdeaRuns() throws IOException, ParserConfigurationException, SAXException, TransformerException {

View File

@ -24,9 +24,7 @@
package net.fabricmc.loom.task; package net.fabricmc.loom.task;
import org.gradle.api.DefaultTask; public class GenSourcesCfrTask extends DefaultLoomTask {
public class GenSourcesCfrTask extends DefaultTask {
/* /*
@TaskAction @TaskAction
public void genSources() throws IOException { public void genSources() throws IOException {

View File

@ -28,7 +28,6 @@ import com.google.common.io.ByteStreams;
import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.providers.MappingsProvider; import net.fabricmc.loom.providers.MappingsProvider;
import net.fabricmc.loom.providers.MinecraftLibraryProvider; import net.fabricmc.loom.providers.MinecraftLibraryProvider;
import org.gradle.api.DefaultTask;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences; import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
@ -40,10 +39,12 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.jar.*; import java.util.jar.*;
public class GenSourcesTask extends DefaultTask { public class GenSourcesTask extends DefaultLoomTask {
public static File getSourcesJar(Project project) { public static File getSourcesJar(Project project) {
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class); LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
MappingsProvider mappingsProvider = extension.getMappingsProvider(); MappingsProvider mappingsProvider = extension.getMappingsProvider();

View File

@ -29,7 +29,6 @@ import com.google.gson.GsonBuilder;
import net.fabricmc.loom.LoomGradleExtension; import net.fabricmc.loom.LoomGradleExtension;
import net.fabricmc.loom.util.RunConfig; import net.fabricmc.loom.util.RunConfig;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import java.io.File; import java.io.File;
@ -42,7 +41,7 @@ import java.util.List;
// https://marketplace.visualstudio.com/items?itemName=redhat.java // https://marketplace.visualstudio.com/items?itemName=redhat.java
// https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug // https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug
// https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack // https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
public class GenVsCodeProjectTask extends DefaultTask { public class GenVsCodeProjectTask extends DefaultLoomTask {
@TaskAction @TaskAction
public void genRuns() { public void genRuns() {

View File

@ -25,15 +25,12 @@
package net.fabricmc.loom.task; package net.fabricmc.loom.task;
import net.fabricmc.loom.util.ModRemapper; import net.fabricmc.loom.util.ModRemapper;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import org.gradle.jvm.tasks.Jar;
import java.io.File; import java.io.File;
public class RemapJar extends DefaultTask { public class RemapJar extends DefaultLoomTask {
public File jar; public File jar;
@Input @Input

View File

@ -25,13 +25,12 @@
package net.fabricmc.loom.task; package net.fabricmc.loom.task;
import net.fabricmc.loom.util.SourceRemapper; import net.fabricmc.loom.util.SourceRemapper;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.TaskAction;
import java.io.File; import java.io.File;
public class RemapSourcesJar extends DefaultTask { public class RemapSourcesJar extends DefaultLoomTask {
public File jar; public File jar;
public String direction = "intermediary"; public String direction = "intermediary";

View File

@ -36,6 +36,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class RunClientTask extends JavaExec { public class RunClientTask extends JavaExec {
public RunClientTask() {
setGroup("fabric");
}
@Override @Override
public void exec() { public void exec() {

View File

@ -33,6 +33,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class RunServerTask extends JavaExec { public class RunServerTask extends JavaExec {
public RunServerTask() {
setGroup("fabric");
}
@Override @Override
public void exec() { public void exec() {