mirror of
https://github.com/googlemaps/android-samples.git
synced 2025-12-08 18:02:20 +00:00
* chore: Modify how API key is provided * Creating kotlin version of Polygons. * Add region tag for maps_poly_activity_get_map_async * Add region tag for maps_poly_activity_on_map_ready * Add region tag for maps_poly_activity_add_polyline * Add region tag for maps_poly_activity_add_polyline_set_tag * Add regiontag maps_poly_activity_style_polyline * Add region tag for maps_poly_activity_on_polyline_click * Add region tag for maps_poly_activity_style_polygon * Addressing comments.
41 lines
1.5 KiB
Groovy
41 lines
1.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
buildToolsVersion '28.0.3'
|
|
defaultConfig {
|
|
applicationId "com.example.polygons"
|
|
minSdkVersion 16
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
|
// Read the API key from tutorials/java/Polygons/app/secure.properties into R.string.maps_api_key
|
|
def secureProps = new Properties()
|
|
if (file("secure.properties").exists()) {
|
|
file("secure.properties")?.withInputStream { secureProps.load(it) }
|
|
}
|
|
resValue "string", "maps_api_key", (secureProps.getProperty("MAPS_API_KEY") ?: "")
|
|
|
|
// To add your Maps API key to this project:
|
|
// 1. Create a file tutorials/java/Polygons/app/secure.properties
|
|
// 2. Add this line, where YOUR_API_KEY is your API key:
|
|
// MAPS_API_KEY=YOUR_API_KEY
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'com.google.android.gms:play-services-maps:17.0.0'
|
|
testImplementation 'junit:junit:4.13'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
} |