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 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:SomeJavaClassin Dart because it wasn't markedpublic(only becomes an issue when trying to call the code from Dart).flutter buildthe example app so that I can re-runjnigennow 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.