Make SourceRemapper threaded (#446)

Should be a little bit faster, but nothing magicial.
This commit is contained in:
modmuss50
2021-07-25 22:54:22 +01:00
committed by GitHub
parent 4601cc1db2
commit ef2816b0d0
4 changed files with 211 additions and 114 deletions

View File

@@ -24,7 +24,10 @@
package net.fabricmc.loom.task;
import java.io.IOException;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.TaskAction;
import net.fabricmc.loom.util.SourceRemapper;
@@ -35,4 +38,13 @@ public class RemapAllSourcesTask extends AbstractLoomTask {
public SourceRemapper getSourceRemapper() {
return sourceRemapper;
}
@TaskAction
public void remap() {
try {
sourceRemapper.remapAll();
} catch (IOException exception) {
throw new RuntimeException("Failed to remap mod", exception);
}
}
}