-
Notifications
You must be signed in to change notification settings - Fork 729
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
Fix click listener kapt bug #1327
Conversation
f4514c3
to
2ad48dd
Compare
|
||
|
||
// https://vanniktech.github.io/gradle-maven-publish-plugin/other/ | ||
publishing { |
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.
Thank you for this file, I ended up using this for Showkase publishing as well 🙏
nonNullType == memoizer.viewOnClickListenerType -> ViewClickListener | ||
nonNullType == memoizer.viewOnLongClickListenerType -> ViewLongClickListener | ||
nonNullType == memoizer.viewOnCheckChangedType -> ViewCheckedChangeListener | ||
// Note, == does not work for type comparisons when comparing types between classpath |
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.
any chance you could maybe describe the bug a bit more in the PR description. Just helps me understand a bit better. I can follow that the equals check wasn't what was needed but didn't understand what the difference in the generated code looked like
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.
is there any test case that could be added?
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.
hard to test because this happens when they are in different modules
This addresses a rare bug because of the xprocessing behavior change in its new version. In kapt only (not ksp), a click listener in a base epoxy model view class that has a sub class epoxy model view extend it specifically in a different module, would result in the sub class's generated epoxy model not having the OnModelClickListener override function. This is because the type checking for a click listener wasn't working correctly in this case where the click listener type was being inherited from a type on the class path. Was a simple fix to use correct type checking instead of ==
Also cleans up how publishing is done