Visitar URL original
Fix Mockito docs for -javaagent flag with Gradle by jselbo · Pull Request #3866 · mockito/mockito · GitHub
Skip to content

Fix Mockito docs for -javaagent flag with Gradle - #3866

Merged
raphw merged 1 commit into
mockito:mainfrom
jselbo:docfix
Sep 23, 2026
Merged

raphw merged 1 commit into
mockito:mainfrom
jselbo:docfix

Conversation

@jselbo

@jselbo jselbo commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3864

These examples now match the already-linked Gradle docs:
https://docs.gradle.org/current/userguide/caching_java_projects.html#dealing_with_file_paths

Specifically:

  • use jvmArgumentProviders API in Kotlin example (previous example was broken)
  • use sub-class of CommandLineArgumentProvider
  • fix @ escaping (This was clobbering the entire remainder of the javadoc)

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 (run ./gradlew spotlessApply for auto-formatting)
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should end with Fixes #<issue number> if relevant

@codecov-commenter

codecov-commenter commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.01%. Comparing base (9c5f36f) to head (e993d21).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3866      +/-   ##
============================================
+ Coverage     86.97%   87.01%   +0.03%     
- Complexity     3069     3070       +1     
============================================
  Files           344      344              
  Lines          9216     9216              
  Branches       1143     1143              
============================================
+ Hits           8016     8019       +3     
+ Misses          913      911       -2     
+ Partials        287      286       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raphw
raphw merged commit 5a2f0f8 into mockito:main Sep 23, 2026
20 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.

Kotlin example for adding Mockito as an agent is incorrect

3 participants