If you ever need to modify the proguard rules for the Android-part of your Expo managed workflow, you can achieve this by using a config plugin.
- Make a folder for config-plugins called
./plugins
in the project root folder. - Place the
withProguardRules.js
andmy-proguard-rules.pro
in the folder - Add the config plugin to the
plugins
array of yourapp.config.js
(orapp.json
if you're using that instead).
NOTE: if you rename your .pro
file, don't forget to change the two occurrences of my-proguard-rules
in withProguardRules.js
as well.
This solution was inspired by the detox config-plugin
What is current situation? Does it still works? Also config in app.json have changed. Using expo build properties, there is extraProguardRules key that can be configured inside android, but it only takes a single string.