-
-
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
Introduce UsagesHandler that allows to exclude particular classes fro… #545
Introduce UsagesHandler that allows to exclude particular classes fro… #545
Conversation
I tried running
Seems like the best thing here is to add |
First, thank you for the contribution. I will think about it for a bit to consider if it's right way to express this use-case (and it might be, but I'm not prepared to say one way or the other just yet).
That does seem like the right approach, although I'm not 100% sure it works for annotation processor dependencies. |
Sure, no pressure at all. Would love to hear your opinion on idiomatic way to cover the use-case.
It works without any issues. I've already pushed a commit a49e4259c08526acb4b59d4509463f4c57cc38e7 thats filters out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've given it some thought and I like the symmetry you achieved between this and the ABI exclusions feature. Please rebase and fix the conflict (should be very small, sorry about that) and then it's good to merge. Thanks for the contribution!
If you like, I wouldn't mind a contribution to the wiki. You can't edit it directly because Github is dumb, but if you file a PR or issue with some text, I can add it myself.
Rebased and fixed the conflict. It looks like there is something wrong with the
|
Ah, whoops! Thanks for the report. I just pushed a change to |
Great, thank you! I've rebased the PR onto the latest |
I'm working on a project that heavily depends on
Data Binding Library
.Data Binding compiler automatically generates
DataBinderMapperImpl
class for every data binding powered module:The implementation of
collectDependencies
method includes allDataBinderMapperImpl
classes provided by dependencies of current module. It meansdependency-analysis-plugin
will never report data binding related dependencies as unused, because there is always at least one usage in generatedDataBinderMapperImpl
code.The goal of this PR is to introduce an API that will allow to exclude particular classes (
DataBinderMapperImpl
in my case) from a list of used classes.I've implemented a proof of concept version of the API and added new functional tests to verify it solves the problem I'm trying to solve.