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

Resolve more Gradle Tasks lazily #3099

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

AndreasTu
Copy link
Contributor

Changes the configuration and registration of Gradle Tasks to use the lazy API of Gradle. This shall speed up the configuration phase e.g. during single test execution.

Note: the tasks.withType() API has currently no overload with Action as the tasks.named() has, so we need to configureEach to be lazy.

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

Changes the configuration and registration of Gradle Tasks to use
the lazy API of Gradle. This shall speed up the configuration phase
e.g. during single test execution.

Note: the tasks.withType() API has currently no overload with Action
as the tasks.named() has, so we need to configureEach to be lazy.
@AndreasTu
Copy link
Contributor Author

@TimvdLippe During my JFR PR in noticed that many Gradle Task were eagerly resolved.
This should fix the obvious places I found.

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02% 🎉

Comparison is base (741fe81) 85.45% compared to head (a7712db) 85.47%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3099      +/-   ##
============================================
+ Coverage     85.45%   85.47%   +0.02%     
- Complexity     2889     2890       +1     
============================================
  Files           329      329              
  Lines          8822     8822              
  Branches       1095     1095              
============================================
+ Hits           7539     7541       +2     
+ Misses          995      994       -1     
+ Partials        288      287       -1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it 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!

@TimvdLippe TimvdLippe merged commit c637192 into mockito:main Aug 22, 2023
13 checks passed
@AndreasTu AndreasTu deleted the GradleCleanup branch August 22, 2023 08:53
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

3 participants