-
Notifications
You must be signed in to change notification settings - Fork 14
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 #151
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Release Notes: https://github.com/autonomousapps/ dependency-analysis-gradle-plugin/blob/main/CHANGELOG.md#version-1330
This 'androidTest' related dependency got added to this project via this (6c80419) commit, but it is unclear why at this point. ------------------------------------------------------------------------ This removal was suggested by the dependency analysis report, see below: Advice for :WordPressUtils Unused dependencies which should be removed: androidTestImplementation 'androidx.test.ext:junit:1.1.3' ...
This 'androidTest' related dependency got added to this project via this (6c80419) commit, but it is unclear why at this point. ------------------------------------------------------------------------ This removal was suggested by the dependency analysis report, see below: Advice for :WordPressUtils Unused dependencies which should be removed: androidTestImplementation 'androidx.test:rules:1.4.0' ...
Removing the 'androidx.core.ktx' dependency wasn't enough by itself as the dependency graph got updated with dependencies pointing to other versions. Adding the transient 'androidx.core:core' dependency was actually necessary in order to keep the dependency graph unaffected. ------------------------------------------------------------------------ This replacement was suggested by the dependency analysis report, see below: Advice for :WordPressUtils Unused dependencies which should be removed: implementation 'androidx.core:core-ktx:1.5.0' ... These transitive dependencies should be declared directly: ... api 'androidx.core:core:1.5.0' ...
This unused dependency got added to this project via this (c6d4f4a7e8946175678dd5cf0a5d0660d42007c) commit, which added the 'WPImageGetter' utility to the project. However, later on, this (d85b6db) other commit, removed this 'WPImageGetter' utility to the project, but the accompanying dependency wasn't removed as well. ------------------------------------------------------------------------ This removal was suggested by the dependency analysis report, see below: Advice for :WordPressUtils Unused dependencies which should be removed: implementation 'com.android.volley:volley:1.2.0' ...
There is no point to hold a reference to 'volley' anyway in the project and this way to make the implementation to seem to be binding to a specific networking framework, which it isn't.
Removing the 'eventbus' dependency wasn't enough by itself as the build was then failing. Adding the transient 'eventbus-java' dependency was actually required in order to make the build successful again. ------------------------------------------------------------------------ This replacement was suggested by the dependency analysis report, see below: Unused dependencies which should be removed: implementation 'org.greenrobot:eventbus:3.3.1' These transitive dependencies should be declared directly: ... implementation 'org.greenrobot:eventbus-java:3.3.1' ...
wzieba
approved these changes
Aug 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Project Thread: paaHJt-6YV-p2
Description
Based on the
unused
related advises generated by the Dependency Analysis Gradle plugin, this PR removes all unused dependencies from this project.FYI: As part of this change, the Dependency Analysis Gradle plugin got also updated to its latest 1.33.0 version.
Testing Steps
./gradlew buildHealth
task and verify that there is nounused
related advise remaining within both reports, JSON and txt included:build-health-report.json
-> Search forunusedCount
build-health-report.txt
-> Search forunused
Utils
, or via composite builds, and see if it works as expected.