RoboGuice 2.x 사용 환경에서 ProGuard 설정에 추가해줄 내용입니다.

(참고 : http://code.google.com/p/roboguice/wiki/ProGuard)


# res/values/roboguice.xml 파일에 풀네임이 지정되는 클래스 보존

-keep class * extends com.google.inject.AbstractModule


# 참조할 수 없다는 경고 제거(can't find referenced method)

-dontwarn roboguice.**


# roboguice,guice 클래스 및 멤버 보존(필요에 따라 좀더 세밀하게 조정할 것)

-keep class roboguice.event.EventThread { *; }

#-keep public class roboguice.**

#-keep public class com.google.inject.**


# @Inject 붙은 생성자/필드/메소드 및 public 기본생성자 보존

-keepclassmembers class * {

    @com.google.inject.Inject <init>(...);

    @com.google.inject.Inject *;

    public <init>();

}


# There's no way to keep all @Observes methods, so use the On*Event convention to identify event handlers

-keepclassmembers class * {

    void *(**On*Event);

}

Posted by 에코지오
,