I have built an app that has a structure but that said structure does not appear in the logs of R8. When I build the app for release (apk) I would like to see if it is applied to the source code of the app.
I tried to logs the build process and for R8 I tried usage, seeds and full configuration but in none of those any of the structure built in the app are present. I tried to add keep -keep class com.appname.reanimated.** { *; } no differences. I tried to look at the weight of the final bundle file but not too much changes. I tried testing the app and everything works. I tried to add all the rules of R8 with maximum level, not much difference. After my own rules there is the rules of the default React-Native system that apply. They appear during the build as “apt_rules.txt” in the build folder.
-keep class com.appname.MainActivity { <init>(); } -keep class com.appname.MainApplication { <init>(); }
But again those element are not defined by me. In most of the system I tried for obfuscating, you need to add a line of code or an element next to your functions that allow the system to know how to deal with that. And because the Hermes engine create byte code, I am unable to really know for sure to what degree R8 is applied to the app codebase. My question is; How to make sure the structure of the React-Native app (the part I made) is modified by the rules applied in the main files for ProGuard in Android/app/build.gradle.
I followed this guide to configure most of what I described here (https://developer.android.com/build/shrink-code#groovy) :
release { shrinkResources true minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' }