Proguard won't keep a class member's enums

后端 未结 2 1945
夕颜
夕颜 2020-12-15 04:54

I\'m working on a library that is distributed as a java jar, and I\'m running proguard on it in such a way as to only leave the required interfaces exposed. I have a configu

2条回答
  •  借酒劲吻你
    2020-12-15 05:11

    to keep all internal enums try this:

    -keep class * {
        public enum **;
    }
    

    it saves me from writing every of 123 enum in proguard config.

    Also, don't forget -keepAttributes if you are processing a library

提交回复
热议问题