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

Merged
TimvdLippe merged 2 commits into
mockito:release/2.xfrom
jozic:mockito-5.18-jdk-17-21
May 27, 2025
Merged

Upgrade mockito-core to 5.18.0, add support for JDK 17 and 21, drop Scala 2.11 and JDK 8#559
TimvdLippe merged 2 commits into
mockito:release/2.xfrom
jozic:mockito-5.18-jdk-17-21

Conversation

@jozic

@jozic jozic commented May 23, 2025

Copy link
Copy Markdown
Contributor

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

@TimvdLippe TimvdLippe left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread version.properties Outdated
# The version is inferred by shipkit-auto-version Gradle plugin
# More: https://github.com/shipkit/shipkit-auto-version
version=1.17.* No newline at end of file
version=1.18.* No newline at end of file

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

jozic commented May 23, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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

jozic commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

@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

jozic commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

@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

@TimvdLippe TimvdLippe left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

jozic commented May 27, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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