We deliver release apk build from a specific flavor
(QA
) to our QA team.
I would like to add networkSecurityConfig
only to that flavor
.
In order to do that I need to add next config to the manifest.
<application android:networkSecurityConfig="@xml/network_security_config"... >
...
</application>
Is that possible to add such config only to QA
gradle flavor
?
Preventing answers about <debug-overrides>
it will not help me, since we delivers release build to QA.
Sure.
Suppose the flavor is vanilla
. In app/src/vanilla/AndroidManifest.xml
, have an <application>
element with your android:networkSecurityConfig
attribute, and nothing else. You can also have the network_security_config
resource be in that flavor (app/src/vanilla/res/xml/network_security_config.xml
). Then, vanilla
builds will merge in that attribute; other builds will not have it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With