-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproguard-free.pro
More file actions
68 lines (58 loc) · 3.21 KB
/
proguard-free.pro
File metadata and controls
68 lines (58 loc) · 3.21 KB
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
# ──────────────────────────────────────────────────────────────────
# ProGuard config for SovereignTraders Free (SpigotMC)
# Basic name obfuscation only — compliant with SpigotMC free rules.
# No string encryption · No control-flow obfuscation · No repackaging
# ──────────────────────────────────────────────────────────────────
# ── Core directives ──────────────────────────────────────────────
-dontshrink # Keep all classes (no dead-code removal)
-dontoptimize # No bytecode optimization
# -dontpreverify is NOT used: Java 7+ requires valid StackMapTable
# frames. Omitting preverification causes VerifyError at runtime
# when combined with control-flow obfuscation (Allatori).
-dontwarn ** # Suppress warnings (server runtime classes)
-ignorewarnings
# ── Keep package structure visible (SpigotMC requirement) ────────
# Free resources must retain a recognisable package root.
-keeppackagenames net.sovereign.**
# ── Paper / Bukkit plugin bootstrap ──────────────────────────────
-keep class net.sovereign.core.SovereignFreePlugin {
public *;
}
-keep class net.sovereign.core.SovereignCore {
public *;
}
# ── Bukkit event handlers (resolved reflectively at runtime) ─────
-keep class * implements org.bukkit.event.Listener {
@org.bukkit.event.EventHandler <methods>;
}
# ── Bukkit command executors ─────────────────────────────────────
-keep class * implements org.bukkit.command.CommandExecutor {
public *;
}
-keep class * implements org.bukkit.command.TabCompleter {
public *;
}
# ── Enum classes (Kotlin enums use valueOf/entries via reflection)
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
public static ** getEntries();
<fields>;
}
# ── Shaded / relocated libraries — do NOT touch ──────────────────
-keep class net.sovereign.libs.** { *; }
-dontwarn net.sovereign.libs.**
# ── Kotlin internals ─────────────────────────────────────────────
-keep class kotlin.Metadata { *; }
-keepclassmembers class * {
@kotlin.Metadata *;
}
# ── Annotations and attributes needed at runtime ─────────────────
-keepattributes RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations
-keepattributes AnnotationDefault
-keepattributes Signature
-keepattributes InnerClasses,EnclosingMethod
-keepattributes *Annotation*
# ── Source file names for stack traces ────────────────────────────
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile