mapbox/mapbox-base-android

Avoid module implementation minification

LukasPaczos opened this issue · 5 comments

Currently, the module implementation classes that skip configuration can be minified because they are stored only as raw strings and later looked up via reflection. We should look into a way of storing the full class reference to avoid those issues and possibly improve performance.

/cc @RingerJK @Guardiola31337

X_ModuleConfiguration class has whole path and name of class and that's info that require for proguard. We need a way to provide rules to customer and internal minifying, right? I'd like to get that we on the same line 😄

That would be one option, another would be to actually import the class instead of storing the values in string constants.

That would be one option, another would be to actually import the class instead of storing the values in string constants.

@LukasPaczos I think it won't work because Configurable modules are added as runtimeOnly and they aren't available on compile time

This is true for the dependency, but the generated configuration class should have direct access to the implementation as long as it's public, which could allow us to link the class itself.

Thanks to #32 we have no issues referencing the class, but the minified code still fails.