Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency of Guava #26

Closed
hf opened this issue Apr 9, 2017 · 10 comments
Closed

Remove dependency of Guava #26

hf opened this issue Apr 9, 2017 · 10 comments

Comments

@hf
Copy link

hf commented Apr 9, 2017

Remove the dependency on Guava which is especially relevant for Android projects. This small of a library really does not need Guava.

@davidmoten
Copy link
Owner

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?

@adrianulbona
Copy link

adrianulbona commented Apr 10, 2017

👍 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

@davidmoten
Copy link
Owner

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.

@davidmoten
Copy link
Owner

@davidmoten
Copy link
Owner

@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?

@adrianulbona
Copy link

@davidmoten thanks for clarification on optional.

@davidmoten
Copy link
Owner

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.

@davidmoten
Copy link
Owner

0.7.5 has been deployed to Maven Central with the above changes (usually available within 10 minutes). Any probs let me know. Cheers.

@hf
Copy link
Author

hf commented Apr 10, 2017

@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.

@hf
Copy link
Author

hf commented Apr 10, 2017

I think the separation of geo mem to another artifact solves this. Thank you so much you are awesome!

@hf hf closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants