Skip to content

Commit

Permalink
Replace % with a double-escaped unicode value
Browse files Browse the repository at this point in the history
Resource strings cannot include `%` as-is (cf. http://stackoverflow.com/questions/4414389/android-xml-percent-symbol).
  • Loading branch information
jgkim committed Aug 20, 2016
1 parent ee3a094 commit 235cbf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/dotenv.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ readDotEnv()
android {
defaultConfig {
project.env.each { k, v ->
def escaped = v.replaceAll("%","\\\\u0025")
buildConfigField "String", k, "\"$v\""
resValue "string", k, "\"$v\""
resValue "string", k, "\"$escaped\""
}
}
}

0 comments on commit 235cbf4

Please sign in to comment.