forked from iDiamondhunter/More-bows
-
Notifications
You must be signed in to change notification settings - Fork 4
/
guard.pro
70 lines (44 loc) · 2.05 KB
/
guard.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
-verbose
# Make sure to check everything always, can't hurt.
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-forceprocessing
# We're a bit oldschool
-target 1.5
# TODO Figure out how to do this but for annotations
-adaptclassstrings
#-adaptresourcefilenames
#-adaptresourcefilecontents
# Keep all methods that overrides a super method, or methods that are an event handler.
-keepclassmembers,allowobfuscation class * {
@java.lang.Override,cpw.mods.fml.common.eventhandler.SubscribeEvent,cpw.mods.fml.common.Mod$EventHandler <methods>;
}
# Keep all classes with public methods
-keepclasseswithmembers,allowobfuscation public class * {
public <methods>;
}
# ProGuard really wants to remove the mod instance and sided proxies. This stops it from doing that.
-keepclassmembers,allowobfuscation class * {
private static iDiamondhunter.morebows.MoreBows inst;
private static iDiamondhunter.morebows.MoreBows proxy;
}
# These two classes are referred to in String constants inside of annotations. TODO see above (around -adaptclassstrings).
-keepnames,allowoptimization public class iDiamondhunter.morebows.Client
-keepnames,allowoptimization public class iDiamondhunter.morebows.MoreBows
# Keep all initialisers, because ProGuard keeps trying to make them private.
-keepclassmembers class * { public <init>(...); }
# TODO Check if anything else should be kept. Annotations are mandatory, as Forge uses them for reflection.
-keepattributes *Annotation*
# Repackage all classes into iDiamondhunter.morebows
-repackageclasses iDiamondhunter.morebows
# Bonus optimisations
-optimizationpasses 64
-mergeinterfacesaggressively
-overloadaggressively
# TODO Decide if this is a good idea. allowaccessmodification is probably safe. dontpreverify seems to work on modern JVMs (target needs to be Java 6, lower doesn't matter as preverification doesn't exist yet), need to do more exhaustive testing.
-dontpreverify
-allowaccessmodification
# Debug info
-printusage
-whyareyoukeeping class iDiamondhunter.**
#-printconfiguration proguardDebug.txt