mirror of
https://github.com/status-im/react-native-config.git
synced 2025-02-24 04:48:16 +00:00
Replace %
with a double-escaped unicode value
Resource strings cannot include `%` as-is (cf. http://stackoverflow.com/questions/4414389/android-xml-percent-symbol).
This commit is contained in:
parent
ee3a094c28
commit
235cbf4028
@ -16,8 +16,9 @@ readDotEnv()
|
|||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
project.env.each { k, v ->
|
project.env.each { k, v ->
|
||||||
|
def escaped = v.replaceAll("%","\\\\u0025")
|
||||||
buildConfigField "String", k, "\"$v\""
|
buildConfigField "String", k, "\"$v\""
|
||||||
resValue "string", k, "\"$v\""
|
resValue "string", k, "\"$escaped\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user