Guava may drop support for Java 7 (but still support old versions of Android)

100 views
Skip to first unread message

Chris Povirk

unread,
Oct 9, 2020, 10:23:19 AM10/9/20
to guava-discuss

Currently, our "Android" flavor of Guava supports 2 use cases:

  • Android users (API level 15 (Ice Cream Sandwich) and up)
  • Java 7 users

We are definitely not going to start using Java 8 APIs. Thus, we are not going to increase our minimum Android version to 24, nor are we going to require our users to enable library desugaring. In short: We'll continue to support older versions of Android with no changes on users' part.

However, we are investigating whether to stop supporting non-Android users who use Java 7. This would let us simplify some implementations (mainly by using lambdas), but more importantly, it would let us make some API improvements -- like default methods on interfaces and type annotations (such as for nullness).

This is part of a larger effort by many Google projects to consider dropping support for Java 7. Please let us know if you anticipate problems from this change -- mainly, if you are using Guava in your library or app and you support Java 7. Thanks.

(Please also spread the word. I have additionally filed an issue about this. Later, we may also try to introduce some warnings when Guava is run under Java 7.)

Ismael Juma

unread,
Mar 13, 2022, 2:31:22 PM3/13/22
to guava-discuss
Hi,

Good to see forward progress. One question is there a reason why the Android API level is still 15? Cronet[1] and Google Play Services[2] both require 19 now, so it would seem that anything below that is hardly used these days.

Ismael

Chris Povirk

unread,
Mar 14, 2022, 10:56:17 AM3/14/22
to Ismael Juma, guava-discuss
Thanks for sending along the links.

We haven't checked recently to see what other apps or libraries might still target older versions. In the past, we've been slow to move off a version until someone makes a concerted effort inside Google to push any remaining apps off it. That gives us a pretty clear signal that moving is going to be safe for essentially everyone.

Are there APIs introduced in KitKat that it would be useful for Guava to be able to depend on?
Reply all
Reply to author
Forward
0 new messages