diff --git a/vm.pro b/vm.pro index 3dd9c82e6b..c6a16c7808 100644 --- a/vm.pro +++ b/vm.pro @@ -6,7 +6,7 @@ public static *** values(); } -# the VM depends on a fixed layout for the following classes: +# the VM depends on the fixed layout of the following classes: -keepclassmembers class java.lang.Class { ; } -keepclassmembers class java.lang.ClassLoader { ; } @@ -30,7 +30,15 @@ -keepclassmembers class java.lang.reflect.Field { ; } -keepclassmembers class java.lang.reflect.Method { ; } --keepnames public class java.lang.* +# ClassLoader.getSystemClassloader() depends on the existence of this class: + +-keep class java.lang.SystemClassLoader + +# the VM references these classes by name, so protect them from obfuscation: + +-keepnames public class java.lang.** + +# musn't obfuscate native method names: -keepclasseswithmembernames class * { native ;