-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support for Library Rs #196
base: master
Are you sure you want to change the base?
Conversation
❤️ |
@johncarl81 thoughts on merging to master? |
I have a couple changes I made recently to be able to publish this on maven central. I have a couple other tweaks to make, mainly to accommodate other libraries that use the base. Then it's time for prime time. |
great.. do those changes change anything about the usage as I know it right now? |
They may affect how you reference the rbridge library. |
Ok @dbachelder, could you review the latest changes? |
@johncarl81 I like that you've moved it into TF proper.. would you mind pushing this up as the snapshot release and I'll try it one more time before we merge it? |
Sure, done. |
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.
lgtm ;)
Android libraries use
R
classes withoutpublic static final
(http://tools.android.com/tips/non-constant-fields):This means you can't reference these fields from an annotation as there are not considered constants. The previous alternative was to use tags, which looses compile time checking. This PR gives an alternative way...
This PR adds a secondary annotation processor to generate a R class with
public static final
analogies for librarypublic final
non-static
. Transfuse, in turn, recognizes these analogies and swaps in the original R library identifier. The only requirement is to annotate your source with theBridge
annotation:Then you may use
RBridge
instead ofR
in any Transfuse annotation: