Skip to content

Commit

Permalink
fix: always use secrets.properties for storing the API keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhawk committed Sep 19, 2024
1 parent 206cdcf commit af5d04e
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tutorials/java/CurrentPlaceDetailsOnMap/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MAPS_API_KEY=DEFAULT_API_KEY
PLACES_API_KEY=YOUR_API_KEY
PLACES_API_KEY=DEFAULT_API_KEY
8 changes: 8 additions & 0 deletions tutorials/java/MapWithMarker/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
8 changes: 8 additions & 0 deletions tutorials/java/Polygons/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
7 changes: 7 additions & 0 deletions tutorials/java/StyledMap/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
7 changes: 7 additions & 0 deletions tutorials/kotlin/MapWithMarker/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}
7 changes: 7 additions & 0 deletions tutorials/kotlin/Polygons/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ dependencies {
}

secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"

// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}

0 comments on commit af5d04e

Please sign in to comment.