-
Notifications
You must be signed in to change notification settings - Fork 41
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
[BUG] Arrow Meta not changing function in Android project #738
Comments
Hello! I've working android-arrow demo. Check it out Probably you need add this library. It's used in generated code for marking as synthetic. implementation 'io.arrow-kt:arrow-annotations:0.10.5' And change dependencies type to compile only as is't not required in runtime: compileOnly project(path: ':create-plugin', configuration: 'shadow') |
Thanks for the example @Starmel. I was playing with it, trying to see what is really needed to make my project work (as there is some things in the project you shared which is not needed. At least for a simple hello world example. Like compiler-plugin for example). Something I noticed is that if I create a new module, then set the configuration that is in create-plugin, remove that folder and use the new module, then helloWorld is not changed at compile time, making the app crash with "operation not implemented". I double check to be sure that I am using in app:build.gradle: The reason why I decided to do this is because I could not make it work with my project. So this makes me wonder if the module create-plugin is created somehow in a way that I do not know? For example, the new-module was created by doing righ-click in the project -> new module -> Java or Kotlin Library. |
Problem may be in the Build Cache. May to try disable Kotlin Incremental build see Gradle properties kotlin.incremental=false
|
Thank you so much @Starmel 🙌 Hi @ocampoleandro, the example has been improved to avoid misunderstandings and to create a new compiler plugin artifact with the right content:
Please, re-open this issue with a link to your workspace in case it still raises any error. Thanks!! |
Hi @rachelcarmena Thanks for the update. I have just one doubt regarding the module "create-plugin". As I mentioned previously, I was trying to create this module from scratch with Android Studio without success (the plugin does not hook in the build process). Then @Starmel mentioned that the module "create-plugin" in his example is imported from arrow-meta examples, which I guess it was created using Intellij. So what I did is to create from scratch the module "create-plugin" with Intellij, and then import it with Android Studio. In this case I could make it work. So my question is: is it possible that Arrow Meta has some issue when creating the module from Android Studio? |
Hi @ocampoleandro 🙌 please, could you share the first step?
Thank you so much!! |
@rachelcarmena Do you mean how I create the module? the new-module was created by doing righ-click in the project -> new module -> Java or Kotlin Library -> default values with kotlin. Then I just changed the build.gradle file in that module with the values from the Arrow Meta example. The module imported was done by righ-click in the project -> new module -> import gradle project. |
Thanks @ocampoleandro 🙌 please, could it be possible to review your workspace in a repository? It would be very useful to reproduce your error and review the source code. Thanks again! |
Yes! In app:build.gradle you will see the next lines:
create-plugin: module imported from Intellij. Thanks for the help! |
Great @ocampoleandro 🙌 Both directories,
to create the artifact of the compiler plugin that will be used during compilation. Please, could you confirm if that's the reason of |
@rachelcarmena you are right! that fixed the problem. |
Nothing to apologize 🙌 Thank you so much for letting us know that it's fixed! |
Describe the bug
Arrow meta is not hooking up in the build process when working in an android project.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
function helloWorld to be implemented by arrow meta.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: