Skip to content

Commit

Permalink
Escape mapbox.sdk.token in the Gradle config files
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegwamartin committed Oct 14, 2024
1 parent 8a17480 commit d80eaf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ android {
properties.load(project.rootProject.file("local.properties").newDataInputStream())
if (properties != null &&
properties.containsKey("mapbox.sdk.token")) {
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", localProperties["mapbox.sdk.token"]
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"" + localProperties["mapbox.sdk.token"] + "\""
} else {
println("One of the required config variables is not set in your local.properties");
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"sample_key\""
Expand All @@ -75,7 +75,7 @@ android {
properties.load(project.rootProject.file("local.properties").newDataInputStream())
if (properties != null &&
properties.containsKey("mapbox.sdk.token")) {
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", localProperties["mapbox.sdk.token"]
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"" + localProperties["mapbox.sdk.token"] + "\""
} else {
println("One of the required config variables is not set in your local.properties");
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"sample_key\""
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", localProperties["mapbox.sdk.token"]
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"" + localProperties["mapbox.sdk.token"] + "\""
buildConfigField "String", "CGR_USERNAME", localProperties["cgr.username"]
buildConfigField "String", "CGR_PASSWORD", localProperties["cgr.password"]
buildConfigField "String", "CGR_URL", localProperties["cgr.url"]
Expand All @@ -47,7 +47,7 @@ android {
debug {
// See bug https://github.com/vanniktech/gradle-android-junit-jacoco-plugin/issues/183
testCoverageEnabled true
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", localProperties["mapbox.sdk.token"]
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"" + localProperties["mapbox.sdk.token"] + "\""
buildConfigField "String", "CGR_USERNAME", localProperties["cgr.username"]
buildConfigField "String", "CGR_PASSWORD", localProperties["cgr.password"]
buildConfigField "String", "CGR_URL", localProperties["cgr.url"]
Expand Down

0 comments on commit d80eaf3

Please sign in to comment.