-
Notifications
You must be signed in to change notification settings - Fork 168
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
Databinding Support #614
Comments
@kageiit I am looking forward to implement data binding support. Could you please guide me in implementing that. |
@sangeetsuresh see ebcea6f#diff-5d4ed6b6392a62dd46960742f4402601 for an example of how the transform cli was added to okbuck. The process essentially consists of a few steps
|
@sangeetsuresh Just curious - are you actively working on this? I'm trying to figure out if I should rip out the minimal use of DataBinding in order to be able to use Buck/OkBuck |
@erawhctim I am not actively working on it. I am just figuring out how to implement that in buck. |
I am currently actively working on it. I have successfully built a demo project using a modified version of the generated BUCK file from okbuck. basically I have:
it was actually pretty easy. I'm now working on understanding what is the best way to integrate it to okbuck/buck |
@carlonzo Can you put that code in some repo so that I could also go through that. It will be helpful for me as I am also looking for implementing data binding for buck |
Sure. I have it on a private repo until I cleanup the experiments, the I will publish |
You can check https://github.com/carlonzo/BuckDatabindingDemo the most important part is the file @kageiit I have few issues when I try to hookup the output of a genrule (which produces a folder with jave files) to the |
@sangeetsuresh Actually I've finally debugged and fixed the issue with I will try now to cleanup (sorry @kageiit to bother, but as I'm a newbie can you have a look at the BUCK file above to see if you can spot any issue? I have still many absolute paths to convert. for example I have no idea how to pull the location of the output folder of the genrules in |
|
@kageiit did you have some time to have a look? |
cc @raviagarwal7 ^ can help take a look as i will be on vacation for a bit |
hi @raviagarwal7 can you let me know if you can take a look about the above? I want to start writing a PR to implement the data binding but I am stuck with few doubts. many thanks! |
hi @kageiit @raviagarwal7 I would like to continue the development as I believe we are not far from having a solution on okbuck to have databinding working. As mentioned above the only issue that I believe needs to be solved are the absolute paths in the |
You can instead do
more info on location macro - https://buck.build/function/string_parameter_macros.html#content |
Hi @raviagarwal7 , thanks for that. I can read that those macros only apply to but my problem is mostly with the arguments in the |
extra_kotlinc_arguments seems to reference by relative path, that may be a pattern to follow if Example:
|
Thanks for the tip man. I'll have a look how it works! |
Keep up the good works @carlonzo |
I am new to buck - trying to understand how this databinding implementation is working, apologies if this is a basic question. How exactly are the PROCESS and GEN_BASE_CLASSES handled by android-data-binding-exec-3.4.0.jar - are those string args? When I look at the code here CLI I don't see where those are. |
Databinding has a CLI compiler that is in aosp (no artifact on maven.google.com yet). It is only two classes, but it allows ingesting layout xml files and outputting the metadata required by the databinding annotation processor to work correctly.
By using a genrule to pre-process the resources of a module, databinding support can be added in buck/okbuck
The text was updated successfully, but these errors were encountered: