Proguard Obfuscation が jar からリソースを見つけられなかった後、次のエラーが発生します
Caused by: java.lang.NoClassDefFoundError: Could not initialize class mypackege.MyClass
Proguard Obfuscation が jar からリソースを見つけられなかった後、次のエラーが発生します
Caused by: java.lang.NoClassDefFoundError: Could not initialize class mypackege.MyClass
リンクで見つけることができます
<adaptresourcefilenames filter = "file_filter" />
Rename the specified resource files, based on the obfuscated names of the corresponding class files.
<adaptresourcefilecontents filter = "file_filter" />
Update the contents of the specified resource files, based on the obfuscated names of the processed classes.
現時点では、jarの外部から呼び出されるため、ofusquenになりたくないofuscasクラスとメソッドを定義する必要があります。
アリの例:
<taskdef resource="proguard/ant/task.properties"
classpath="/usr/local/java/proguard/lib/proguard.jar" />
<proguard>
-libraryjars ${java.home}/lib/rt.jar
-injars in.jar
-outjars out.jar
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
</proguard>
詳細:http://proguard.sourceforge.net/index.html#manual/ant.html
よろしく、