Skip to content

Build Android flavor with -source 8 -target 8 (but still avoid Java 7+ APIs) #5269

Closed
@cpovirk

Description

@cpovirk

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 will additionally announce this on our mailing list. Later, we may also try to introduce some warnings when Guava is run under Java 7.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions