-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
False-positive unused dependencies error for resources in XML files #420
Comments
Interesting, thanks for the reproducer. The plugin does attempt to detect resources used by other resources, but it looks like it is failing here. |
I'm also facing the same problem when i'm declaring dependency on another module only to use xml resources from that module |
I realized that this issue report is lacking some important detail. It's unclear what "detect usage of resources" means. I cloned that branch and ran the indicated task and saw this
So I should infer that |
Sure, see a comment "This usage is not detected" in How to check it:
|
I've updated the issue description accordingly and rechecked with 0.77.0. |
I have resolved this specific case (using an attr from another module) with the associated PR, but I haven't tried to fix the problem more comprehensively. Android resource linking is very complicated and I'd rather solve it on a case-by-case basis, with actual use-cases, then try to figure it all out a priori. |
Build scan link
Plugin version
0.73.0
UPD: 0.77.0
Gradle version
6.9
(Optional) Android Gradle Plugin (AGP) version
4.1.2
Describe the bug
False-positive unused dependencies error when Android resources are used only in XML resources.
To Reproduce
Steps to reproduce the behavior:
./gradlew -p subprojects :android-lib:snackbar-proxy:projectHealth
Expected behavior
Detect usages of resources
UPD: See
subprojects/android-lib/snackbar-proxy/src/main/res/drawable/ic_pin.xml
file. It usesandroid:fillColor="?themeColor"
from:android-lib:ui-lib
.Additional context
android.nonTransitiveRClass=true
The text was updated successfully, but these errors were encountered: