dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
The reason task should list the classes which depend on a dependency
Is your feature request related to a problem? Please describe. The below is a shorted snippet of the reason task
gw category-a:subproject:reason --id :category-b:subproject
Source: main
------------
* Uses class com.company.my.special.class (implies implementation).
While knowing which class is used is a good start, knowing where it is used is key to verify/remove a dependency.
Describe the solution you'd like Output in line with the following would be nice to have:
gw category-a:subproject:reason --id :category-b:subproject
Source: main
------------
* Uses class com.company.my.special.class (implies implementation), listing first X occurrences:
- FQClass1
- FQClass2
This information is available in the synthetic-project.json and other intermediates.
I think this makes sense. What do you think is a reasonable value for X? I don't want to flood the console with text. Maybe the output could say something like "Found N usages, listing first X:"?
Or maybe I'm overthinking it, and "flooding the console" is fine? Gradle certainly does it with some of its built-in tasks....
Personally I would be okay with 3 entries (as a default) and having another optional command line arg to allow for setting the number of entries, e.g. -1 being no limit.
Sure, that sounds like a good starting point. Do you want to take this up?
On April 18, 2022, GitHub @.***> wrote:
Personally I would be okay with 3 entries (as a default) and having another optional command line arg to allow for setting the number of entries, e.g. -1 being no limit.
— Reply to this email directly, view it on GitHub <https://github.com/autonomousapps/dependency-analysis-android-gradle- plugin/issues/643#issuecomment-1101635839>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/ABJG5PM2OBJXDPIOZJ4CY7DVFWSZDANCNFSM5TWENC4Q>. You are receiving this because you commented.Message ID: <autonomousapps/dependency-analysis-android-gradle- @.***>
If you would not mind taking it, I would appreciate it as I'm quite busy at the moment.
I have no immediate plans to add it, for the same reason 🙂
On April 19, 2022, GitHub @.***> wrote:
If you would not mind taking it, I would appreciate it as I'm quite busy at the moment.
— Reply to this email directly, view it on GitHub <https://github.com/autonomousapps/dependency-analysis-android-gradle- plugin/issues/643#issuecomment-1103517531>, or unsubscribe <https://github.com/notifications/unsubscribe- auth/ABJG5PPLCDDEBPVSVH2NA7DVF6PSNANCNFSM5TWENC4Q>. You are receiving this because you commented.Message ID: <autonomousapps/dependency-analysis-android-gradle- @.***>
Would this be a good first issue? Can I take a stab at this?
Would this be a good first issue? Can I take a stab at this?
@pt2121 you're welcome to take a stab at it, but I actually think it would be fairly complex to implement this. Conceptually it's not that complex, but implementing it would require touching a lot of model classes and updating tests or writing new tests.
If you're interested, maybe we could aim for an iterative/incremental approach. You could take a look at asm.kt and the relevant tasks and see how to update the first-level models to include this kind of information.
EDIT: Heh, I see you already have a PR up. I'll take a look!
Just found out this amazing plugin and very exited to use it. But lack of this feature is really slowing down all the process. Hope It will be revisited soon :)