feat: add proguard/R8 support#422
Conversation
artus9033
left a comment
There was a problem hiding this comment.
LGTM, just one comment left
| "brownfield": { | ||
| "debug": true, | ||
| "android": { | ||
| "expo": { | ||
| "minifyEnabled": false, | ||
| "extraProguardRules": [ | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.BrownfieldStore { *; }", | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.BrownfieldStore$Companion { *; }", | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.User { *; }", | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.SettingsStore { *; }", | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.SettingsStore$Companion { *; }", | ||
| "-keep class com.callstack.rnbrownfield.demo.expoapp56.Theme { *; }", | ||
| "-keep class com.callstack.nativebrownfieldnavigation.UserType { *; }" | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Shouldn't we add this to ExpoApp55 too?
There was a problem hiding this comment.
It's only required if we use minification enabled and I guess for showcase perspective, doing in one app is fine?
|
@hurali97 @artus9033 The Consider adding a simple validation check in const extraProguardRules = (effectiveProps.android?.extraProguardRules ?? [])
.filter(rule => rule.trim().length > 0);And document in the schema that each rule must be a non-empty string. This catches silent failures early. |
|
@hurali97 @artus9033 The
These rules are identical and could be centralized in the This reduces maintenance burden if these rules ever need to change. |
Summary
This adds the consumer-rules to the packages and exposes 2 options,
minifyEnabledandextraProguardRulesforbrownfield.android.expo.Test plan