Declare versions of test-only dependencies inline instead of in our parent pom. #6660
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 versions of test-only dependencies 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.)I had initially attempted (in cl/552479838) to declare versions of all our dependencies inline, but that didn't work: We really need
dependencyManagement
for Gradle purposes, at least until we specify versions for Gradle explicitly.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.) I notice that we have this problem even today withtruth.version
....Tested:
RELNOTES=Changed our Maven project to avoid affecting which version of Mockito our Gradle users see.