Skip to content

Upgrade mockito-core to 5.18.0, add support for JDK 17 and 21, drop Scala 2.11 and JDK 8 #559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025

Conversation

jozic
Copy link
Contributor

@jozic jozic commented May 23, 2025

fixes #350
fixes #515
fixes #520
fixes #556
closes #517

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only 1 small comment. The rest LGTM! Thanks for the fixes.

version=1.18.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this a 2.0.* release, since we are dropping support for various configurations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will update

Should we then also drop some long time deprecated methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or I guess, we can do that in 2.0.1 as well :)

@jozic jozic marked this pull request as ready for review May 23, 2025 10:48
@jozic jozic force-pushed the mockito-5.18-jdk-17-21 branch from c248e45 to 0b5b666 Compare May 23, 2025 10:52
@jozic
Copy link
Contributor Author

jozic commented May 23, 2025

@TimvdLippe bumped version to 2.0.0
let me know if you want to drop deprecated methods as part of this release

cc @ultrasecreth

@TimvdLippe
Copy link
Contributor

Right. Let's drop these deprecated methods as well indeed. All of them appear to have appropriate replacements, so it should be doable for users to migrate. Thanks again for all the effort in getting this project up-to-date again

@jozic
Copy link
Contributor Author

jozic commented May 27, 2025

@TimvdLippe I will send a separate commit to this PR and I suggest we don't squash those commits to keep history clean and easy to navigate

@jozic
Copy link
Contributor Author

jozic commented May 27, 2025

@TimvdLippe I've dropped all the deprecated methods with replacements, but kept isNull and isNotNull as they are deprecated because of idiomatic reasons and don't have replacements.

also, not sure why but seems like Gradle wrapper check is unstable

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@TimvdLippe TimvdLippe changed the base branch from release/1.x to release/2.x May 27, 2025 13:43
@TimvdLippe TimvdLippe merged commit 1acecd4 into mockito:release/2.x May 27, 2025
4 of 5 checks passed
@TimvdLippe
Copy link
Contributor

@jozic Seems like by bumping the Java version of the release job to 17, it now fails: https://github.com/mockito/mockito-scala/actions/runs/15277155793/job/42966910185 That's because we still use Gradle 6 (old!). Can you update our Gradle wrapper to the latest version as well and create a new PR? Thanks!

@jozic jozic deleted the mockito-5.18-jdk-17-21 branch May 27, 2025 15:52
@jozic
Copy link
Contributor Author

jozic commented May 27, 2025

@TimvdLippe you made the change in #560, right?

Also, can you think of a way to automatically check depending projects like mockito-scala, mockito-kotlin, etc when mockito-core is changed? Ideally when PR is opened or at least when a new version is released

@TimvdLippe
Copy link
Contributor

@jozic No I didn't upgrade Gradle. I only upgraded the GitHub action that verifies Gradle according to the checksum.

We expect them as normal consumers, e.g. they shouldn't break. Of course that sometimes is more tricky than we would like, but in general we strive to never break our users including our own dependent artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants