Fix missing junit-platform-launcher version #4588
Merged
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.
What's changed?
Use the JUnit BOM to specify the version of all JUnit dependencies.
Since
rewrite-test
uses JUnit as anapi()
dependency, this is done throughapi(platform(…))
instead oftestImplementation(platform(…))
.What's your motivation?
I tried to build OpenRewrite on my Linux Desktop machine, and I kept getting the following error:
(also with the other
rewrite-java-*
modules)I don’t really understand why it works in other environments, but the thing is that the
junit-platform-launcher
version wasn’t specified anywhere.JUnit documentation suggests using their BOM to align dependency versions. I thought it couldn’t hurt anyway, and this allows centralizing the version of JUnit (though I kept
latest.release
for now)Anything in particular you'd like reviewers to focus on?
I am not very familiar with Gradle so better double check this 🙂
Have you considered any alternatives or workarounds?
This is the only solution I found but maybe I should have posted a question as well 😏
Checklist
rewrite-java-8/build.gradle.kts