telenordigital / connect-android-sdk

Android SDK for CONNECT ID
https://telenordigital.github.io/id-docs.telenordigital.com/
Other
16 stars 14 forks source link

The SDK contains a large proportion of unused methods #97

Closed rasmusohrstig closed 6 years ago

rasmusohrstig commented 6 years ago

The SDK includes approximately 20k methods, most of which appear to be unused, or at least not used in a typical app that uses the SDK.

Many apps nowadays are within 20k methods of the 64k method limit and do not want to go the multi dex route. In other words: the library is quite big and that is a problem.

We have done some experimentation with ProGuard minifiation in our app, in other words stripping away unused or seemingly unused methods, and it seems we can get rid of most of the Connect ID SDK methods without any obvious problems. Our only concern is that we do not know which ProGuard rules are safe to use. We don't want to introduce any subtle bugs in the SDK.

We need good ProGuard rules for: The SDK code itself Each one of the dependencies

These rules could be added as a consumer proguard rule in the SDK so that we can let ProGuard strip away methods based on what our app uses.

jorunfa commented 6 years ago

This makes sense. Will try to get it prioritized, but can't give you any timeline on that right now.

jorunfa commented 6 years ago

Solved by #103. Will be included in next release.

jorunfa commented 6 years ago

Sorry, that should be #102.