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

[Dependency Analysis] Remove Unused Dependencies [January 2025] #1098

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Jan 30, 2025

Description

Based on the unused related advises generated by the Dependency Analysis Gradle plugin (see p1738189833942969-slack-C0787KRDYDC), this PR removes the newly added but unused dependencies from this project.


Reviewers

👋 @planarvoid & @danilo04, just and FYI here, that I added both of your as reviewers to this change because it relates to this #1095 PR you both worked on. 🙏


Testing Steps

  1. Tooling:
    • Run the ./gradlew buildHealth task and verify that there is no unused related advise remaining within both reports, JSON and txt included:
      • build-health-report.json -> Search for unusedCount
      • build-health-report.txt -> Search for unused
    • Check the manually triggered scheduled build and verify that there is no unused related advise remaining within both reports, JSON and txt included:
      • build-health-report.json -> Search for unusedCount
      • build-health-report.txt -> Search for unused
  2. Testing:
    • Smoke test the sample app, try out all available screens and functionality. Verify everything is working as expected.
    • Also, if you want to be thorough about reviewing the changes, you could quickly smoke test a client app of your choice (ie. DOAndroid) and see if it works as expected.

This dependency is completely unused.

FYI: It got introduced as part of this
(7d8d37c) commit, a part of
implementing placeholders in compose.

------------------------------------------------------------------------

This removal was suggested by the dependency analysis report, see below:

Advice for :media-placeholders
Unused dependencies which should be removed:
  ...
  implementation 'androidx.compose.material3:material3:1.3.1'
  ...
This dependency is completely unused.

FYI: It got introduced as part of this
(7d8d37c) commit, a part of
implementing placeholders in compose.

------------------------------------------------------------------------

This removal was suggested by the dependency analysis report, see below:

Advice for :media-placeholders
Unused dependencies which should be removed:
  ...
  implementation 'androidx.compose.ui:ui-tooling-preview:1.7.5'
Although removing the 'androidx.compose.ui:ui' is enough by itself and
the build is okay, it is better to add 'androidx.compose.ui:ui-unit'
for transitive dependency related purposes.

FYI: It got introduced as part of this
(7d8d37c) commit, a part of
implementing placeholders in compose.

------------------------------------------------------------------------

This addition was suggested by the dependency analysis report, see
below:

These transitive dependencies should be declared directly:
  ...
  implementation 'androidx.compose.ui:ui-unit:1.7.5'
  ...
Removing the 'androidx.compose.foundation:foundation' dependency wasn't
enough by itself as the build was then failing. Adding the transient
'androidx.compose.foundation:foundation-layout' dependency was actually
required in order to make the build successful again.

FYI: It got introduced as part of this
(7d8d37c) commit, a part of
implementing placeholders in compose.

------------------------------------------------------------------------

This replacement was suggested by the dependency analysis report, see
below:

Unused dependencies which should be removed:
  implementation 'androidx.compose.foundation:foundation:1.7.5'
  ...

These transitive dependencies should be declared directly:
  ...
  implementation 'androidx.compose.foundation:foundation-layout:1.7.5'
  ...
@ParaskP7 ParaskP7 marked this pull request as ready for review January 30, 2025 11:40
@ParaskP7
Copy link
Contributor Author

ParaskP7 commented Feb 6, 2025

👋 @planarvoid @danilo04 a friendly reminder about this. 🙏

@ParaskP7
Copy link
Contributor Author

👋 @planarvoid @danilo04 another friendly reminder about this. 🙏

Copy link
Contributor

@danilo04 danilo04 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 for the changes @ParaskP7. Everything works as expected.

@danilo04 danilo04 merged commit a0f342f into trunk Feb 12, 2025
15 checks passed
@danilo04 danilo04 deleted the build/remove-unused-dependencies-january-2025 branch February 12, 2025 17:16
@ParaskP7
Copy link
Contributor Author

Awesome, thank you so much @danilo04 for helping with reviewing, but also merging this! 🙇 ❤️ 🚀

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