r/reactnative • • 10d ago

Why is dex code optimization at 0% in android

/r/expo/comments/1y3loza/why_is_dex_code_optimization_at_0_in_android/
2 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/Western_Cap_6934 9d ago

Prebuild files are only part of the picture. R8 can merge rules from other sources. Adding -printconfiguration build/outputs/logs/configuration.txt to the rules file used by the release build writes the final merged rules, so you can check what R8 actually received.

1

u/Miserable-Pause7650 9d ago

2

u/Western_Cap_6934 9d ago

That would explain why prebuild looked clean: the Amazon module can bring the flag in through consumer rules, even for non-Amazon apps.