Skip to content

[Dependency Analysis] Remove Unused Dependencies#275

Merged
ParaskP7 merged 1 commit intotrunkfrom
build/remove-unused-dependencies
Aug 25, 2025
Merged

[Dependency Analysis] Remove Unused Dependencies#275
ParaskP7 merged 1 commit intotrunkfrom
build/remove-unused-dependencies

Conversation

@ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Aug 22, 2025

Closes: AINFRA-1181


Description

This PR Removes this unused androidx.annotation dependency from the crashlogging module.

FYI: After updating the dependency-analysis plugin to 2.19.0, as part of #272, this plugin started working better than before (1.33.0) and thus created this new advise that was previously ignored, since indeed there is no import androidx.annotation.* import on this crashlogging module.

PS: The only such one import androidx.annotation.* import exist on the AutomatticTracks module, because it (seems) that it is the only module that is still using Java classes.


Testing Instructions

  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 everything works, and that these are no unused related advises.
  2. Testing (Optional):
    • Smoke test the sample tracks app, try sending a report with a message and verify that everything is working as expected.
      • FYI: You could cp gradle.properties-example gradle.properties and set a valid sentryTestProjectDSN, using the tracks-demo-android project on A8C Sentry.

FYI: After updating the 'dependency-analysis' plugin to '2.19.0', as
part of #272, this plugin started working better than before ('1.33.0')
and thus created this new advise that was previously ignored, since
indeed there is no 'import androidx.annotation.*' import on this
'crashlogging' module.

PS: The only such one 'import androidx.annotation.*' import exist on
the 'AutomatticTracks' module, because it (seems) that it is the only
module that is still using Java classes.

PR: #272

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

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

Advice for :crashlogging
Unused dependencies which should be removed:
  implementation 'androidx.annotation:annotation:1.7.0'
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes an unused androidx.annotation dependency from the crashlogging module as identified by the upgraded dependency-analysis plugin (v2.19.0). The plugin now more accurately detects that this annotation library is not imported or used within the crashlogging module.

  • Removes unused androidx.annotation:annotation dependency from crashlogging module
  • Cleans up build.gradle file by removing unnecessary blank line

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ParaskP7 ParaskP7 marked this pull request as ready for review August 22, 2025 11:23
@ParaskP7 ParaskP7 requested a review from wzieba August 22, 2025 11:24
@ParaskP7 ParaskP7 merged commit b70af22 into trunk Aug 25, 2025
12 checks passed
@ParaskP7 ParaskP7 deleted the build/remove-unused-dependencies branch August 25, 2025 11:45
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.

3 participants