-
Notifications
You must be signed in to change notification settings - Fork 60
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
Generate proguard rules #681
Comments
To be a bit more elaborate:
The version of /cc @mraleph @alexmarkov May be input to discussion for more flexible tree shaker discussion. |
When there is a one-way dependency Dart -> JNI bindings -> Java, we can just inspect the tree-shaken Dart program (kernel file) and list used JNI bindings / Java classes/methods/fields, without altering tree shaker itself. I can suggest to create a separate post-processor which would take a tree-shaken kernel files or a separate pass over kernel AST which would run after tree shaker and print used bindings to a file. Flutter const_finder tool (https://github.com/flutter/engine/tree/main/tools/const_finder) works this way (although it would be better to put this kind of tooling into Dart SDK to avoid dependency on kernel AST which is somewhat private / implementation detail). |
Cross linking #640 The kotlin suspend fn's generate private functions which our bindings have to call. That would require disabling proguard's obfuscation in order to keep these methods. |
We should see if we can generate the proguard rules.
We don't want to generate everything though (whole Java / Android API). So we need to integrate into the Dart tree shaker. (Maybe generate annotations in JNIgen and recognize these in the Dart tree shaker.)
The text was updated successfully, but these errors were encountered: