In strings.xml
<resources>
<string>name="app_name">App_Name</string>
<string>name="app_port">https://example.com</string>
<string>name="app_key">App_Key</string>
</resources>
In build.gradle
productFlavors {
production {
applicationId = "com.example.production"
}
staging {
applicationId = "com.example.staging"
//code to manipulate strings.xml value because for production and staging app_name, app_port and key are different
}
}
I need a code code to manipulate strings.xml from productFlavours of build.gradle file instead of creating separate folder for staging and production.