Skip to content
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

Fixes #3240 : Renamed mockito bom artifact #3251

Merged
merged 3 commits into from Jan 28, 2024
Merged

Conversation

PranotiPD
Copy link
Contributor

Description

  • It makes a fix of 1 line in subprojects -> bom -> bom.gradle
  • changed !subproject.name.endsWith("-test") to !subproject.name.endsWith("java21-test")
  • By doing so now the artifact will be present in Maven central too.

Checklist

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • Avoid other runtime dependencies
  • Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

@@ -15,7 +15,7 @@ dependencies {
api(project.rootProject)
project.rootProject.subprojects.forEach { subproject ->
if (!subproject.name.endsWith("Test") &&
!subproject.name.endsWith("-test") &&
!subproject.name.endsWith("java21-test") &&
Copy link
Contributor

Choose a reason for hiding this comment

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

The module name needs to change, not the logic, so that the exclusion catches the non-published test module and does NOT publish it in the BOM.

Rename java21 to java21-test in settings.gradle and folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I'll make the required changes.

@TWiStErRob
Copy link
Contributor

Tip: I think you can test this with gradlew publishToMavenLocal. Run it on main and this branch, and diff the generated files in ~/.m2/org/mockito.

@TWiStErRob
Copy link
Contributor

I'll let @TimvdLippe take it from here.

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.

Thank you!

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (11aad17) 85.33% compared to head (fa29211) 85.33%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #3251   +/-   ##
=========================================
  Coverage     85.33%   85.33%           
  Complexity     2923     2923           
=========================================
  Files           336      336           
  Lines          8906     8906           
  Branches       1108     1108           
=========================================
  Hits           7600     7600           
  Misses         1013     1013           
  Partials        293      293           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TimvdLippe TimvdLippe merged commit 65d612c into mockito:main Jan 28, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants