Skip to content

Conversation

@irfano
Copy link
Contributor

@irfano irfano commented Nov 11, 2025

Description

This excludes false positive dependencies from unused dependencies report.

For libs.squareup.okhttp3.tls, the project can still run without it, but it was added recently because the card connection flow crashes without it. So, I added an exception for it as well.

Test Steps

  1. Run ./gradlew buildHealth
  2. Find the line in the terminal logs that says.
  3. Click on it.
  4. Verify that no unused dependencies are reported.

Images/gif

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Removes the `apache.http.client.android` dependency from `androidTestImplementation` configurations.
@irfano irfano added this to the 23.7 milestone Nov 11, 2025
@irfano irfano added Tech Debt dependencies Pull requests that update a dependency file labels Nov 11, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Nov 11, 2025

1 Warning
⚠️ This PR is assigned to the milestone 23.7. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 11, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit9a3ce41
Direct Downloadwoocommerce-wear-prototype-build-pr14939-9a3ce41.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 11, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit9a3ce41
Direct Downloadwoocommerce-prototype-build-pr14939-9a3ce41.apk

Configures the dependency analysis plugin to ignore certain dependencies that are reported as unused but are required at runtime.
Exclude `androidx.compose.material.icons.extended` and `androidx.hilt.navigation.compose` from the dependency analysis for the `apifaker` library.
@irfano irfano changed the title Remove unused dependencies from WooCommerce module Ignore false positives in the unused dependencies report Nov 12, 2025
This dependency is required for the app to build successfully, so it's being excluded from the unused dependency check to prevent build failures.
Adds a `dependencyAnalysis` rule to `fluxc-tests` to exclude `androidx.paging.runtime`.
@irfano irfano marked this pull request as ready for review November 12, 2025 10:09
This dependency is required to prevent a `NoClassDefFoundError` during the card reader connection flow.
@AdamGrzybkowski
Copy link
Contributor

@irfano What triggered this work? Can I get more context on it? Why do we have to add those lists now (and maintain it in the future)?

@irfano
Copy link
Contributor Author

irfano commented Nov 13, 2025

Sorry for not adding more information to the PR description. I'm monitoring the Dependency Analysis Alert (p1762837882059759-slack-C8ZFBDQC9) as part of my exception catcher rotation, and these false positives appeared in the health report.
I followed the second suggestion in the guide (paqN3M-1d0-p2) to suppress these false positives.

@AdamGrzybkowski AdamGrzybkowski self-assigned this Nov 13, 2025
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski left a comment

Choose a reason for hiding this comment

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

The build appears to be healthy now. Do we know what has changed recently that caused so many false positives?

@irfano
Copy link
Contributor Author

irfano commented Nov 13, 2025

Do we know what has changed recently that caused so many false positives?

These were probably in the report for a long time, but we just hadn’t taken action before.

@irfano irfano merged commit 131ff2f into trunk Nov 13, 2025
20 checks passed
@irfano irfano deleted the remove-unused-dependencies-from-woocommerce branch November 13, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Tech Debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants