Skip to content

Commit 561e829

Browse files
authored
fix: always use secrets.properties for storing the API keys (#1812)
1 parent 206cdcf commit 561e829

File tree

8 files changed

+52
-1
lines changed

8 files changed

+52
-1
lines changed

tutorials/java/CurrentPlaceDetailsOnMap/app/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ dependencies {
5757
}
5858

5959
secrets {
60+
// To add your Maps API key to this project:
61+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
62+
// 2. Add this line, where YOUR_API_KEY is your API key:
63+
// MAPS_API_KEY=YOUR_API_KEY
6064
propertiesFileName = "secrets.properties"
65+
66+
// A properties file containing default secret values. This file can be
67+
// checked in version control.
6168
defaultPropertiesFileName = "local.defaults.properties"
6269
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
MAPS_API_KEY=DEFAULT_API_KEY
2-
PLACES_API_KEY=YOUR_API_KEY
2+
PLACES_API_KEY=DEFAULT_API_KEY

tutorials/java/MapWithMarker/app/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,13 @@ dependencies {
5555
}
5656

5757
secrets {
58+
// To add your Maps API key to this project:
59+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
60+
// 2. Add this line, where YOUR_API_KEY is your API key:
61+
// MAPS_API_KEY=YOUR_API_KEY
62+
propertiesFileName = "secrets.properties"
63+
64+
// A properties file containing default secret values. This file can be
65+
// checked in version control.
5866
defaultPropertiesFileName = "local.defaults.properties"
5967
}

tutorials/java/Polygons/app/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,13 @@ dependencies {
5555
}
5656

5757
secrets {
58+
// To add your Maps API key to this project:
59+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
60+
// 2. Add this line, where YOUR_API_KEY is your API key:
61+
// MAPS_API_KEY=YOUR_API_KEY
62+
propertiesFileName = "secrets.properties"
63+
64+
// A properties file containing default secret values. This file can be
65+
// checked in version control.
5866
defaultPropertiesFileName = "local.defaults.properties"
5967
}

tutorials/java/StyledMap/app/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ dependencies {
6060
}
6161

6262
secrets {
63+
// To add your Maps API key to this project:
64+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
65+
// 2. Add this line, where YOUR_API_KEY is your API key:
66+
// MAPS_API_KEY=YOUR_API_KEY
6367
propertiesFileName = "secrets.properties"
68+
69+
// A properties file containing default secret values. This file can be
70+
// checked in version control.
6471
defaultPropertiesFileName = "local.defaults.properties"
6572
}

tutorials/kotlin/CurrentPlaceDetailsOnMap/app/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ dependencies {
6969
}
7070

7171
secrets {
72+
// To add your Maps API key to this project:
73+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
74+
// 2. Add this line, where YOUR_API_KEY is your API key:
75+
// MAPS_API_KEY=YOUR_API_KEY
7276
propertiesFileName = "secrets.properties"
77+
78+
// A properties file containing default secret values. This file can be
79+
// checked in version control.
7380
defaultPropertiesFileName = "local.defaults.properties"
7481
}

tutorials/kotlin/MapWithMarker/app/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ dependencies {
6464
}
6565

6666
secrets {
67+
// To add your Maps API key to this project:
68+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
69+
// 2. Add this line, where YOUR_API_KEY is your API key:
70+
// MAPS_API_KEY=YOUR_API_KEY
6771
propertiesFileName = "secrets.properties"
72+
73+
// A properties file containing default secret values. This file can be
74+
// checked in version control.
6875
defaultPropertiesFileName = "local.defaults.properties"
6976
}

tutorials/kotlin/Polygons/app/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ dependencies {
6464
}
6565

6666
secrets {
67+
// To add your Maps API key to this project:
68+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
69+
// 2. Add this line, where YOUR_API_KEY is your API key:
70+
// MAPS_API_KEY=YOUR_API_KEY
6771
propertiesFileName = "secrets.properties"
72+
73+
// A properties file containing default secret values. This file can be
74+
// checked in version control.
6875
defaultPropertiesFileName = "local.defaults.properties"
6976
}

0 commit comments

Comments
 (0)