When running a Lint check on files in my project I often come across an error that looks like this (actual names of files redacted, but you'll get the idea):
Dependency from module 'name_of_my_project' on module 'some_3rd_party_library' could be probably be removed when complementary scope to 'File 'filepath_to_the_class_being_analyzed' also does not contain references on module 'some_3rd_party_library'
I get this error for every single library that isn't compiled with Gradle - i.e. libraries that have been imported whole into the project and then added as dependencies.
Facebook is a great example of a library that even if you wanted to compile it through Gradle
you couldn't because they don't support it, and you need to run it as a local library - it seems like you'll then receive this "unnecessary module dependency" warning for every class that doesn't directly call Facebook.
So, the question is - what is the "proper" way of handling this error? Do I ignore it or am I supposed to change the code in some way to make it disappear?
Edit: in the preferences menu for Lint it describes the check as follows (in case this helps figure it out):
This inspection lists modules which contain redundant dependencies on other modules. These dependencies can be safely removed.