Declare dependency versions inline instead of in our parent pom. #6659
+89
−151
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.
Declare dependency versions inline instead of in our parent pom.
Fixes #6654, I hope? If
guava
and its parent pom don't refer tomockito-core
, thenguava
should no longer affect which version ofmockito-core
is selected by Gradle. (Really, it "shouldn't" even now, but there's a mismatch between Maven's model and Gradle's that causes it to do so.)As part of resolving a merge conflict in the
android
flavor, I also noticed that I had never added a directchecker-qual
dependency to that flavor'sguava-testlib
orguava-tests
configuration, as I should have done back in cl/522315614 or thereabouts. So I added it. (Of course, it matters little because Maven lets us use thechecker-qual
dependency ofguava
transitively.)It would be nice if we could still declare our dependency versions only once, now by using
properties
. (In fact, my attempt to useproperties
made me notice that our version of the Error Prone plugin is older than our version of the Error Prone annotations.) However, if we were to make that change, then we'd lose the ability to update dependencies withversions-maven-plugin
(update-properties
+use-latest-releases
), I assume because the properties are declared in onepom.xml
and used in another. (It's possible that Dependabot is better about this, but we've had trouble getting it to work with our unusual 2-flavor, Google-repo-source-of-truth setup.)Tested:
RELNOTES=Changed our Maven project to avoid affecting which version of Mockito our Gradle users see.