Skip to content

Commit

Permalink
Do not run nest fixer every time gradle is reloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
thecatcore committed Apr 4, 2024
1 parent 79dd0c4 commit 524aedf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/babric/processor/NestFixingJarProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.fabricmc.stitch.commands.CommandFixNesting;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;

Expand All @@ -18,7 +19,12 @@ public class NestFixingJarProcessor implements MinecraftJarProcessor<NestFixingJ

@Override
public void processJar(Path path, Spec spec, ProcessorContext processorContext) throws IOException {
CommandFixNesting.run(path.toFile());
File file = path.getParent().resolve(".fixedNest").toFile();

if (!file.exists()) {
CommandFixNesting.run(path.toFile());
file.createNewFile();
}
}

@Override
Expand Down

0 comments on commit 524aedf

Please sign in to comment.