My program works fine with Macify without using ProGuard, but loses the OS X integration (e.g command-Q to quit) after I run ProGuard. ProGuard issues several warnings such as:
[proguard] Note: org.simplericity.macify.eawt.DefaultApplication: can't find dynamically referenced class com.apple.cocoa.application.NSApplication
No runtime errors or warnings, though, so not sure where to start debugging. I've added to the ProGuard profile:
-keep public class org.simplericity.macify.
-keep public interface org.simplericity.macify.
But no joy. Any suggestions where to look?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The class org.simplericity.macify.eawt.DefaultApplication and its inner class ApplicationListenerInvocationHandler seem to perform some reflection (Class#getMethod) to find methods in application listeners and event classes. You then need to preserve the methods of the interfaces involved, with their original names:
Otherwise, are you specifying -dontwarn or -ignorewarnings to let ProGuard ignore some warnings about missing OS X classes? You should then solve the warnings instead, by specifying the OS X java libraries with -libraryjars.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My program works fine with Macify without using ProGuard, but loses the OS X integration (e.g command-Q to quit) after I run ProGuard. ProGuard issues several warnings such as:
[proguard] Note: org.simplericity.macify.eawt.DefaultApplication: can't find dynamically referenced class com.apple.cocoa.application.NSApplication
No runtime errors or warnings, though, so not sure where to start debugging. I've added to the ProGuard profile:
-keep public class org.simplericity.macify.
-keep public interface org.simplericity.macify.
But no joy. Any suggestions where to look?
The class org.simplericity.macify.eawt.DefaultApplication and its inner class ApplicationListenerInvocationHandler seem to perform some reflection (Class#getMethod) to find methods in application listeners and event classes. You then need to preserve the methods of the interfaces involved, with their original names:
Does that help?
Otherwise, are you specifying -dontwarn or -ignorewarnings to let ProGuard ignore some warnings about missing OS X classes? You should then solve the warnings instead, by specifying the OS X java libraries with -libraryjars.