Skip to content

[WOOMOB-961] Remove unused libsapachehttpclientandroid dependency #14422

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

Merged

Conversation

malinajirka
Copy link
Contributor

@malinajirka malinajirka commented Aug 1, 2025

Fixes WOOMOB-961

Description

This PR removes the unused libs.apache.http.client.android dependency from the project. The dependency was identified as no longer needed and removing it helps reduce the app size and potential security surface area.

Testing information

Green CI should be enough.

The tests that have been performed

I ran ./gradlew :WooCommerce:assembleWasabiDebugAndroidTest to verify the dependency truly wasn't used.

Images/gif

Not applicable for dependency removal.

  • 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.

@malinajirka malinajirka added this to the 23.0 milestone Aug 1, 2025
@malinajirka malinajirka added the type: technical debt Represents or solves tech debt of the project. label Aug 1, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 1, 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 Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit3c684ad
Direct Downloadwoocommerce-wear-prototype-build-pr14422-3c684ad.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 1, 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 Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit3c684ad
Direct Downloadwoocommerce-prototype-build-pr14422-3c684ad.apk

@malinajirka malinajirka requested a review from samiuelson August 1, 2025 10:08
@samiuelson samiuelson self-assigned this Aug 1, 2025
Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks.

Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

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

Hm, actually it looks like the libs.apache.http.client.android dependency is needed for UI tests.

@malinajirka
Copy link
Contributor Author

Interesting, I tried to build the UI tests but it's likely using reflection or something like that. @ParaskP7 is there a way how to mark the dependency as "used" in the dependency dashboard?

@ParaskP7
Copy link
Contributor

ParaskP7 commented Aug 1, 2025

👋 @malinajirka !

Interesting, I tried to build the UI tests but it's likely using reflection or something like that. @ParaskP7 is there a way how to mark the dependency as "used" in the dependency dashboard?

Do you mean something like that?

dependencyAnalysis {
    issues {
        onUnusedDependencies {
            // This dependency is actually needed otherwise the app will crash with a runtime exception.
            exclude(libs.eventbus.android.get().module.toString())
        }
    }
}

@malinajirka
Copy link
Contributor Author

Nice, that's exactly what I mean - thank you 🙇 !

Copy link
Contributor Author

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

@samiuelson Good catch, I've reverted the removal and suppressed the unused warning.

@samiuelson samiuelson self-requested a review August 5, 2025 12:26
Copy link
Contributor

@samiuelson samiuelson left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! :shipit:

@samiuelson samiuelson merged commit 0fbefb8 into trunk Aug 5, 2025
17 checks passed
@samiuelson samiuelson deleted the issue/woomob-961-remove-unused-libsapachehttpclientandroid branch August 5, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: technical debt Represents or solves tech debt of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants