-
Notifications
You must be signed in to change notification settings - Fork 59
Dart code obfuscation is impossible with reflective approach #208
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
Comments
The (non-flutter) Dart tools do not recognize the option So I'll use this issue to keep track of the fact that we don't support the use of |
I assume it doesn't support dart2js/aot with minification as well. It seems that Mockito had similar issue and that's how they managed to solve it: // This will give is a mangled symbol in dart2js/aot with minification
// enabled, but it's safe to assume very few people will use the invocation
// matcher in a production test anyway due to noSuchMethod.
static String _symbolToString(Symbol symbol) {
return symbol.toString().split('"')[1];
} |
is flutter --obfuscate still not supported ? |
No, unfortunately, nothing has happened in this area. It is not obvious how it could be done. For example, reflective invocation of a member If you can obtain a guarantee that obfuscation/minification will transform the name On the other hand, if you can create your program without obfuscation/minification, including If it works on general Dart code then it should also work on generated Dart code—there's nothing magical about the code that the reflectable code generator generates. So do you have access to a stand-alone minifier/obfuscator, rather than using |
Dart code obfuscation is impossible with reflective approach, shouldn't it to be considered to be added to a list of known limitations?
After doing that on Flutter project
extra-gen-snapshot-options=--obfuscate
OR theoretically is it possible to re-run reflectable generator after obfuscation?
The text was updated successfully, but these errors were encountered: