-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support for kapt (for improved Kotlin support) #956
Comments
cc @dsyang |
It seems like kapt3 in 1.0.6-eap77 ships with an This means any build system can call kotlinc with this option and pass in kotlin source files to generate the java stubs required for the javac annoation processor round and compilation |
Is there anything actually blocking this or does it just need someone to work on it now? |
I don't think there's anything blocking it. I have some preliminary support for annotation processors in #1358. For example a kotlin class with an |
I'll probably take a stab at this soon. I've been taking a look at how this is done in gradle land. This is how it is done in kotlin 1.1.3. There's 4 steps.
These steps are slightly different with each minor version of kotlin so this will be interesting. It seems there are 3 steps in kotlin 1.1.2:
I figured these out by running a gradle build on a small kotlin module with --debug. |
@runningcode any progress on this? It would be awesome to be able to use kapt. |
@elihart It is still a work in progress. Hoping to have something together in the coming weeks. |
Great to hear :) Thanks! |
Hi, Is there any progress in this feature? Currently, this is the only thing holding us back from using |
@BharathMG sorry, progress has been slow. I haven't had much time to look at it. Step 1 outlined by @runningcode above seems to be failing even with the exact same arguments that Gradle uses. This leads me to believe there is some sort of Step 0 or my arguments are somehow incorrect. I haven't been able to prove either. |
@cwoodwar6 Thanks for the update! |
@runningcode Hello :) Here is some additional information (I think you have already seen this though). Please ping me if you want to know something more about kapt. |
Hey folks, any news on this thread? Setting up buck in my company, but this is a blocker as of now, if I can do anything to help :) |
I haven't had very much time to look into this since I've posted the preliminary PR. Anyone who wants to pick up where I left off is more than welcome. I'm going to try my best to find time in the near future to work on it. |
@thalescm sounds like you just volunteered 😄 |
Yeah, I've just forked buck and I'm reading the PR, getting the changes and stuff and will try to see if I get it working :D |
If you guys can take a look on #1584. It should work now :) |
Summary: This is still a major work in progress but I wanted to get the ball rolling. Currently this is building but fails at runtime to find the generated classes. I have only tested running it on an Android Project. A huge shoutout to my former colleague runningcode who helped tremendously on this. #956 outlines the steps that he discovered when running kapt via Gradle. I've created a simple [tool](https://github.com/cwoodwar6/kapt-cli) to better understand what steps are required when kapt is plugged into the compiler. I'll continue to update this PR and the tool as I make more progress. Feedback is welcome, looking for suggestions early so we can get this added as soon as possible. Closes #1584 Reviewed By: jkeljo Pulled By: jkeljo fbshipit-source-id: 47a9598
Finally merged, I think it's safe to close the issue now. Please test it folks :) |
It was mentioned in #857 that
kapt
isn't supported. Opening this new issue to track support for it.The text was updated successfully, but these errors were encountered: