Build Android flavor with `-source 8 -target 8` (but still avoid Java 7+ APIs)
See original GitHub issueCurrently, 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 will additionally announce this on our mailing list. Later, we may also try to introduce some warnings when Guava is run under Java 7.)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:5 (2 by maintainers)
Top GitHub Comments
For most users, it’s probably a reasonable thing to enable. However, there are downsides in some cases. As I understand them, the downsides are:
Hi, thanks for reporting that. We have been in contact with the Google Cloud people, and we won’t be dropping support unless they are. Part of the reason for this warning was to share any information we could find with them.