dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
Dependencies used in Android Manifest are not recognized
Plugin version 1.26.0
Describe the bug
I have a theme used in an Android Manifest file that is provided by another module fixDependencies will strip this dependency as unused.
android:theme="@style/Theme.MyTheme" In this example, MyTheme is provided by another module and is stripped. It's unclear if it is just not recognizing xml resources or if it isn't checking Android Manifest files specifically.
Expected behavior
Modules that provide xml resources that are then used in AndroidManifest.xml will not be removed when running fixDependencies
@Vichy97 DAGP does check the manifest file for resources that might be provided by other modules. It's possible it's missing the theme statement. Could you provide a minimal reproducer?
🤔 I'm unable to repro this in a minimal project for some reason. It must be something specific about register. I'll try to repro there and provide a commit SHA.
@autonomousapps We are hitting the same issue when referencing a theme containing a period character (.) between two Android library modules.
Here is a PR demonstrating the repro of the issue: https://github.com/autonomousapps/dependency-analysis-gradle-plugin/pull/1146
Should I create a new issue stating the actual issue, or is this one good enough?
Also, I tried to check where this issue could be solved but I'm a bit stuck. I've added some details on the draft PR.
@SimonMarquis no need for a new issue, this is sufficient. And thanks!