chore: Move to a gradle version catalog and treat mockito dynamic agent loading #14264
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.
Related: #13242
We shouldn't allow ourselves to get irrevocably used to see this RED wall of text when running any unit test:
... so let's cure it.
With a fresh mockito you get one extra line, linking to https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html
And since that example relies on having a gradle version catalog, I've migrated our gradle monster to one.
Notes:
libsshould simply be available - and with tons of luck you can have uses in a subproject within the root build.gradle.kts that works. Change something unrelated and gradle bombs unintelligible exceptions. Savinglibsinto anothervalat root level and using that instead perversely works, but I preferred therootProject.libsworkaround - mainly 'cuz I had no idea what to name that val. Regrettably, that breaks a small part of Studio's support - e.g. if you follow an inspection telling you to use a catalog entry or to create one, the result often needs re-applying the kludge or it won't sync. But overall I believe this is no more fragile than gradle is generally and our old build scripts are just as kludgy (e.g. Studio always flagging the root one red despite it working - now no longer the case).