Don't put two copies of every class into the Guava jar. #7741
+10
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't put two copies of every class into the Guava jar.
We need to compile Guava twice:
-source 8(to maintain Java 8 compatibility)module-info, which requires-source 9and thus is incompatible with the "main" buildI had been under the mistaken impression that the latter compile still needed to pass all the sources. As a result, we had the second compile build
module-infoand all the classes. We then had configuration inmaven-jar-pluginto ignore the other classes.But the
maven-jar-pluginconfiguration doesn't help because we're usingmaven-bundle-plugininstead, at least for theguavaitself. (I didn't look intoguava-testlib,guava-gwt, or the tests of any module, though note that (IIRC) the only other one that's modularized (and thus might benefit from our module-relatedmaven-jar-pluginconfiguration) isguava-testlib.)Luckily, it turns out that we can compile
module-infoby itself. So now the build does that.(Also, bump
maven-jar-pluginwhile in the area.)See #6614 (comment)
RELNOTES=Removed the extra copy of each class from the Guava jar. The extra copies were an accidental addition from the modularization work in Guava 33.4.5.