fix: always use secrets.properties for storing the API keys by dkhawk · Pull Request #1812 · googlemaps-samples/android-samples

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always use secrets.properties for storing the API keys #1812

Changes from all commits

Commits

File filter

Filter by extension

Conversations

Failed to load comments.

Loading

Jump to

Jump to file

Failed to load files.

Loading

Diff view
Diff view
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"
}