In build.gradle file I have to define a boolean value
buildConfigField("boolean", "SKIP_SSL_CHECK", "true")
so I want o access it in the network.xml file
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="${SKIP_SSL_CHECK}" /
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
i want to make that value alter as per the build variant for debug, it should be true and for others, it should be false.
Thanks in advance
Unfortunately, there is no option for manifest placeholders or other types of variables in XML resources.
However, you can have multiple versions of the resource in source sets tied to specific build variants, with different values for cleartextTrafficPermitted:
app/src/debug/res/xml/, put the debug version of your resourceapp/src/main/res/xml/, put the release version of your resourceIf 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