I have a xml file. In the xml file I want to get a BuildConfig value. BuildConfig value is set in build.gradle.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="com_my_api_key">**REPLACE_WITH_YOUR_API_KEY**</string>
</resources>
I want to get that api Key from buildConfig, similar to how I get those values in the java code.
public class MyApp extends Application{
public String APPTIMIZE_KEY = BuildConfig.APPTIMIZE_KEY;
}
Here is the value being set in build.gradle, its coming from an external file.
release {
buildConfigField "boolean", "APP_DEBUG", "false"
buildConfigField "String", "APPTIMIZE_KEY", "\"${props.getProperty("apptimizeKey_App1")}\""
How do i reference this ---> BuildConfig.APPTIMIZE_KEY in the xml file to get it?