Remove dependency of Guava
Closed this issue · 10 comments
Remove the dependency on Guava which is especially relevant for Android projects. This small of a library really does not need Guava.
Fair enough. The core of the library does not use guava so you can exclude it as a dependency if you want. Is that still a hassle with Android projects because of missing classes checked by ProGuard or something?
👍 on this.
Guava is the reason I avoided the library as I intended to put it in Hadoop/Spark jobs where you already have guava of a different version.
... even if I like the API from here more than the one I'm using currently ...
https://dzone.com/articles/what-is-jar-hell
you can of course use shading to rename packages or to wait for the modules from java 9 ...
Is optional a valid maven scope? (I don't see it on the list of six scopes) https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Guava is the reason I avoided the library as I intended to put it in Hadoop/Spark jobs where you already have guava of a different version.
This shouldn't affect you. Just exclude the transitive dependency on guava when you add the geo dependency.
Note that guava is optional (not a scope) because it is not a core dependency. It is only used for the ..geo.mem
package which almost no-one will use.
@hf The transitive exclusion applies to you as well I suppose. Is there another issue in the Android space that transitive exclusion does not solve?
@davidmoten thanks for clarification on optional.
Thanks for the comments guys, I still don't know what the ultimate impact is on Android builds but I've decided to make everyone's life a bit simpler and split out the geo.mem package into a separate artifact so guava is no longer a dependency of the core. Turns the project into multi-module project but that won't matter to anyone.
0.7.5 has been deployed to Maven Central with the above changes (usually available within 10 minutes). Any probs let me know. Cheers.
@davidmoten Android uses Gradle as the build system, and Gradle currently does not support (as far as I could find) exclusion of optional dependencies.
The issue with Guava is that Android has a low method count per app, and Guava is huge in that regard. There are ways to solve this, but it's really a bummer for tiny apps.
I avoid this library, even though I like it better than some other ones, because of this.
I think the separation of geo mem to another artifact solves this. Thank you so much you are awesome!