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

Set up dependOn task only if project is affected #240

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

kozaxinan
Copy link
Contributor

@kozaxinan kozaxinan commented Feb 9, 2024

Fixes #223

This change will reduce the amount of task that needs to be configured.
The idea is this. When a task doesn't have to run, and if we know it. There is no need to depend on that task and skip it later. The plugin can only depend on the task that should run.

I couldnt now how to test it but I compared change in our project.

Before After
Screenshot 2024-02-10 at 18 51 58 Screenshot 2024-02-10 at 18 51 51
Screenshot 2024-02-10 at 18 52 21 Screenshot 2024-02-10 at 18 52 17
Screenshot 2024-02-10 at 18 55 20 Screenshot 2024-02-10 at 18 55 24

Before the change of this pr, tasks that belong to modules that has no change or not affected also created but skipped.
After this change, tasks from unaffected modules are not created.
Any pre task that depends on actual task we are calling also being executed in original implementation.
After the change, you can see that only affected modules tasks are created and called.

(Change is in in-app-notification module)

@CLAassistant
Copy link

CLAassistant commented Feb 9, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (d3b8a1f) 53.14% compared to head (61d8dde) 53.04%.

Files Patch % Lines
...ctedmoduledetector/AffectedModuleDetectorPlugin.kt 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #240      +/-   ##
============================================
- Coverage     53.14%   53.04%   -0.10%     
  Complexity       73       73              
============================================
  Files            16       16              
  Lines           557      558       +1     
  Branches        102      102              
============================================
  Hits            296      296              
- Misses          234      235       +1     
  Partials         27       27              

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

@joshafeinberg joshafeinberg merged commit c5977c7 into dropbox:main Feb 12, 2024
4 of 6 checks passed
@kozaxinan kozaxinan deleted the depend-fix branch March 23, 2024 22:34
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.

Depends on gradle tasks only if project is affected
3 participants