mapbox / mapbox-base-android

This repository hosts annotation processors and module providers for Mapbox modular SDKs.
Other
11 stars 8 forks source link

Avoid module implementation minification #31

Closed LukasPaczos closed 4 years ago

LukasPaczos commented 4 years ago

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

RingerJK commented 4 years ago

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 😄

LukasPaczos commented 4 years ago

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

RingerJK commented 4 years ago

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

LukasPaczos commented 4 years ago

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.

LukasPaczos commented 4 years ago

Thanks to https://github.com/mapbox/mapbox-base-android/pull/32 we have no issues referencing the class, but the minified code still fails.