You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recommended workflow of building plugin source and then jnigening the resulting output doesn't work very well when iterating on hybrid development (e.g., migrating code from native to Dart). I've hit a variant of this flow quite a few times now:
Try to write some Dart code using my plugin code.
Realize that I can't access SomeJavaClass in Dart because it wasn't marked public (only becomes an issue when trying to call the code from Dart).
Update the Java code.
Try to flutter build the example app so that I can re-run jnigen now that it's public.
Fail to build because of the in-progress code in step 1.
Obviously if I don't save in step 1 I wouldn't have that problem, but I save all the time, including commonly doing save-all when modifying anything, including the changes to the Java code (which I'm making in VS Code as well because they are trivial). I keeping hitting this even though in theory I know better at this point. Then I have to back out or comment our enough code from step 1. to be able to continue.
It would be nice if we could identify a specific command to regenerate just the Java code, so that I could iterate on Java+jnigen runs regardless of the state of my Dart code.
The text was updated successfully, but these errors were encountered:
I need to make some changes to flutter_tools so that it doesn't compile the Dart code if passed a certain flag. I tried this before but wasn't successful and had to move on to other tasks.
Something hacky that is easy to do:
Create a new temporary flutter project
Copy the android directory to that project
Convert the plugin into an app if not one already or also do 1. and 2. for the example app
Run flutter build apk to cache gradle dependencies
The recommended workflow of building plugin source and then
jnigen
ing the resulting output doesn't work very well when iterating on hybrid development (e.g., migrating code from native to Dart). I've hit a variant of this flow quite a few times now:SomeJavaClass
in Dart because it wasn't markedpublic
(only becomes an issue when trying to call the code from Dart).flutter build
the example app so that I can re-runjnigen
now that it's public.Obviously if I don't save in step 1 I wouldn't have that problem, but I save all the time, including commonly doing save-all when modifying anything, including the changes to the Java code (which I'm making in VS Code as well because they are trivial). I keeping hitting this even though in theory I know better at this point. Then I have to back out or comment our enough code from step 1. to be able to continue.
It would be nice if we could identify a specific command to regenerate just the Java code, so that I could iterate on Java+jnigen runs regardless of the state of my Dart code.
The text was updated successfully, but these errors were encountered: