Reflection Free Configuration and Proguard
See original GitHub issueIs there any guidance on how to use the reflection free configuration with proguard and obfuscation? Based on looking at the factories, it looks like I’ll need to keep my class names at a minimum (possibly method names too).
-keepnames class com.myapp.**
Do you have any advice on how I can make this more specific?
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (9 by maintainers)
Top Results From Across the Web
Can I use Reflection with ProGuard obfuscated classes?
ProGuard documentation mentions the following: It is generally impossible to compute which classes have to be preserved (with their original ...
Read more >ProGuard Manual: Home - Guardsquare
Generate an instrumented build to allow ProGuard finding cases of reflection at run-time. The tailored configuration advice for your application will be ...
Read more >Shrink, obfuscate, and optimize your app - Android Developers
Enable shrinking, obfuscation, and optimization; R8 configuration files ... The Android Gradle plugin generates proguard-android-optimize.txt , which ...
Read more >Android's Built-in ProGuard Rules: The Missing Guide
Android's build tools come with a few ProGuard facets to squeeze the most juice out of your release builds. In this post we'll...
Read more >Getting Started with ProGuard - RayWenderlich.com
ProGuard can still help by obfuscating the code that makes the request to the server. This is an example of using the Kotlin...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
solved by https://github.com/stephanenicolas/toothpick/wiki/Proguard-&-TP
@stephanenicolas I updated my patch, so that a HashMap is generated instead of switches or ifs. The lookup time should be roughly the same as before, but there is some extra memory usage, which I think shouldn’t be critical: those factories are lightweight, they don’t have any fields at all. The change only affects the case when “support_obfuscation” annotation processing parameter was set to “true”. Otherwise it will generate switches as before.
I’d like to point out that this issue seems to be a “blocker” for using ToothPick in a large portion of commercial projects, because using obfuscation there is absolutely non-negotiable. I work on one of such projects, and would really like to give Toothpick a shot, because it’s awesome. But this issue needs to be fixed first. Otherwise we’ll have to go with Dagger 2, unfortunately (which doesn’t have problems with obfuscation as far as I know).