Code Monkey home page Code Monkey logo

Comments (4)

cpovirk avatar cpovirk commented on July 19, 2024

Yes, we're aiming to add the Duration overloads to guava-android soon. The main thread for tracking additions of Java 8+ APIs is #6567, but I will try to remember to update this one when we add the Duration ones specifically.

Even once we do that, I'd still advise setting up your project to use a JRE version of Guava. Use a version whose number is at least as high as the highest version of Guava you depend on. In your case, that would mean 32.0.1-jre or higher. (I'd suggest going straight to the newest version, 33.2.0-jre, if you can.) This will ensure that all the Guava APIs are available to you even if we still don't add all of them to guava-android. It will also give you implementations that are better optimized for the JRE.

(We have some advice about this kind of JRE-Android conflict for users of Truth, another of our libraries. I should probably put something about it on the Guava site if we haven't already....)

from guava.

glyiu98 avatar glyiu98 commented on July 19, 2024

Hey @cpovirk, thank you for the prompt reply! Indeed I would do that but one of my dependencies is gRPC which is using the guava-android, so I cannot do anything for now. I will just go with another workaround for now.

from guava.

cpovirk avatar cpovirk commented on July 19, 2024

Ah, sorry, I didn't actually give advice on how to accomplish that :) If you declare a dependency in your own project on guava-33.2.0-jre, then that should take precedence over the other deps, since Maven picks the highest version number. guava-33.2.0-jre contains all the APIs of 31.1-jre and all the APIs of 32.0.1-android[*], so you should be safe.

[*] OK, OK: Guava 33 did remove some APIs from guava-android that didn't work anyway—hence the bump in the major version number. Guava 32 didn't even do that, but it did remove an API in a separate artifact. Those removals will not be a problem in practice.

from guava.

glyiu98 avatar glyiu98 commented on July 19, 2024

Okok thanks for the help, will do that :)

from guava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.