Add filter support for MCPMerger, and filter out libraries from the server's 'fat jar'.

This commit is contained in:
LexManos committed 2013-06-23 23:06:25 -07:00
1 parent 8d27fb0692
commit 3a9f123a16
2 files changed
+20 -3

No files matched your search

@@ -58,6 +58,7 @@ public class MCPMerger
private static HashSet<String> copyToServer = new HashSet<String>();
private static HashSet<String> copyToClient = new HashSet<String>();
private static HashSet<String> dontAnnotate = new HashSet<String>();
private static HashSet<String> dontProcess = new HashSet<String>();
private static final boolean DEBUG = false;
public static void main(String[] args)
@@ -155,7 +156,8 @@ public class MCPMerger
{
case '!': dontAnnotate.add(line); break;
case '<': copyToClient.add(line); break;
case '>': copyToServer.add(line); break;
case '>': copyToServer.add(line); break;
case '^': dontProcess.add(line); break;
}
}
@@ -344,8 +346,20 @@ public class MCPMerger
outFile.putNextEntry(entry);
continue;
}
String entryName = entry.getName();
if (!entryName.endsWith(".class") || entryName.startsWith("."))
boolean filtered = false;
for (String filter : dontProcess)
{
if (entryName.startsWith(filter))
{
filtered = true;
break;
}
}
if (filtered || !entryName.endsWith(".class") || entryName.startsWith("."))
{
ZipEntry newEntry = new ZipEntry(entry.getName());
outFile.putNextEntry(newEntry);
+4 -1
View File
@@ -1 +1,4 @@
!bjy #net/minecraft/src/CodecMus
^org/bouncycastle
^org/apache
^com/google
^argo