Skip to content

Commit 30231f4

Browse files
committed
holy fudge, calling gc() fixed the reobf issues
1 parent 3a73d75 commit 30231f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/net/minecraftforge/gradle/tasks/user/reobf/ObfArtifact.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,15 @@ void generate() throws Exception
316316
File srg = new DelayedFile(caller.getProject(), UserConstants.REOBF_SRG).call();
317317

318318
// obfuscate here
319-
File inTemp = new File(caller.getTemporaryDir(), "jarIn.jar");
319+
File inTemp = File.createTempFile("JarIn", ".jar", caller.getTemporaryDir());
320320
Files.copy(toObf, inTemp);
321321

322322
if (caller.getUseRetroGuard())
323323
applyRetroGuard(inTemp, output, srg);
324324
else
325325
applySpecialSource(inTemp, output, srg);
326+
327+
System.gc(); // clean anything out.. I hope..
326328
}
327329

328330
private void applySpecialSource(File input, File output, File srg) throws IOException
@@ -381,7 +383,6 @@ private void applyRetroGuard(File input, File output, File srg) throws Exception
381383
clazz.getMethod("obfuscate", File.class, File.class, File.class, File.class).invoke(null, input, output, script, log);
382384

383385
loader = null; // if we are lucky.. this will be dropped...
384-
System.gc(); // clean anything out.. I hope..
385386
}
386387

387388
private void generateRgConfig(File config, File script, File srg) throws IOException

0 commit comments

Comments
 (0)