Description
Someday in the distant future, guava-jre
will require Java 9.
(My assumption has usually been that we will skip requiring 9 and wait until we have enough reason to require some even higher version. If so, we can wait for that. But the issue I'm now filing will give us at least a small motivation to pull the trigger on Java 9 rather than wait. Then again, our hand is often forced by the people who depend on us, who may likewise by inclined to wait for a version higher than 9....)
When that happens, we could consider trying to eliminate the split between guava-android
and guava-jre
by putting both into a single multi-release jar. This would be workable only if:
- Android tools reliably look at only the classes in the "root" section of the jar. [edit: This seems unlikely, given that Android builds use (among many other things) javac.]
- Non-Android tools reliably look at the classes under
META-INF/versions/9
. - Users can deal with the doubled jar size.
- The spec for multi-release jars is evolved to eliminate the requirement that "Every version of the library should offer the same API." (For all I know, this may have happened already. But I suspect not.)
- Probably various other things happen. But I'm already feeling that this is a pipe dream :)
[edit: I have had some trouble with multi-release jars, as discussed in jspecify/jspecify#245. If we're lucky, it will turn out that part of the problem is that I was doing something wrong. But it does sound like there may be legitimate tool limitations at this point. Maybe those will be fixed before we even investigate multi-release jars for Guava.]