Does proguard automatically converts enums to integer for memory optimization or I have to configure it to do this? If I do have to configure what is the configuration?
Advertisement
Answer
The optimization is listed on ProGuard’s optimizations page. It appears to be one of the default optimizations, but it (like other optimizations) can be specified explicitly if you need more control (e.g. disabling all class/*
optimizations aside from enum unboxing).
class/unboxing/enum
Simplifies enum types to integer constants, whenever possible.