zendesk / android-db-commons

Some common utilities for ContentProvider/ContentResolver/Cursor and other db-related android stuff
Apache License 2.0
222 stars 28 forks source link

Exclude guava from dependences #56

Closed grigerlab closed 10 years ago

grigerlab commented 10 years ago

Your lib is really cool and helpful, but could you please exclude Guava from dependences? It's too heavy and always push large projects over the limits of 65K methods. Thanks!

henieek commented 10 years ago

Hey,

Guava is the core part of android-db-commons. Our public api depend on it. E.g. we use Guava's Function for transformations and we rely on FluentIterable and Multimap in FluentCursor. We would have to implement many its parts ourselves and it would be a huge API-breaker if we resign from it now.

As many Android developers we had/have the famous 65K methods problem in our commercial project. We solved it with using proguard for both release and debug builds. Of course, it can slightly increase your build time, but it's nothing compared to resigning from libraries that simply make your work easier (and Guava is only one of them).

Give proguard a try for your debug builds. You can (and should) have a separate config for debug, so it just removes unused methods and classes, without obfuscating and optimizing your code. It'll be faster than proguarding in the release mode and will not influence your debugging process.

I'm closing this for now, but if you got any further questions/suggestions just let me know here.