Skip to content

Conversation

timtebeek
Copy link
Member

@timtebeek timtebeek marked this pull request as ready for review September 29, 2025 21:41
@timtebeek timtebeek requested a review from sambsnyd September 29, 2025 21:41
Comment on lines +70 to +71
if (first.isPresent() && first.get().getGavToTypes().keySet().stream()
.anyMatch(gav -> gav.startsWith("org.junit.jupiter:junit-jupiter-api:6"))) {
Copy link
Member

Choose a reason for hiding this comment

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

In junit5 you can use either API + engine or a single dependency which represents both. If 6 works the same way then perhaps this might miss some Junit 6 usage?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's indeed a choice between two artifact ids; one for convenience, the other which contains the actual classes:

junit-jupiter
JUnit Jupiter aggregator artifact that transitively pulls in dependencies on junit-jupiter-api, junit-jupiter-params, and junit-jupiter-engine for simplified dependency management in build tools such as Gradle and Maven.

junit-jupiter-api
JUnit Jupiter API for writing tests and extensions.

The first one does not contain any classes though: https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter/6.0.0-RC3
Those still come from the junit-jupiter-api that we check here, so I think we should be good to detect JUnit 6 from here.

Copy link
Member Author

Choose a reason for hiding this comment

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

With that I think we can merge, or revise as needed; Would be good to show JUnit 6 now that it's officially released:
https://bsky.app/profile/junit.org/post/3m225gwratc2k

@timtebeek timtebeek requested a review from sambsnyd September 30, 2025 09:40
@timtebeek timtebeek merged commit af4e954 into main Sep 30, 2025
2 checks passed
@timtebeek timtebeek deleted the detect-junit6 branch September 30, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants