From f4e1473772a0865063030bc81b60dcb6ab1a442a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 18 Jan 2008 18:51:37 -0700 Subject: [PATCH] update vm.pro to protect system classes from obfuscation and preserve java.lang.SystemClassLoader --- vm.pro | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 ;