mirror of
https://github.com/googlemaps/android-samples.git
synced 2025-12-08 18:02:20 +00:00
Bumps play-services-base from 17.4.0 to 17.5.0. Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
102 lines
3.5 KiB
Groovy
102 lines
3.5 KiB
Groovy
import org.apache.tools.ant.filters.ConcatFilter
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
defaultConfig {
|
|
applicationId "com.example.kotlindemos"
|
|
minSdkVersion 16
|
|
targetSdkVersion 29
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
multiDexEnabled true
|
|
|
|
// Read the API key from ./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 ./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'
|
|
}
|
|
}
|
|
flavorDimensions "version"
|
|
productFlavors {
|
|
gms {
|
|
dimension "version"
|
|
applicationIdSuffix ".gms"
|
|
versionNameSuffix "-gms"
|
|
}
|
|
v3 {
|
|
dimension "version"
|
|
applicationIdSuffix ".v3"
|
|
versionNameSuffix "-v3"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation 'com.android.support.constraint:constraint-layout:2.0.4'
|
|
implementation "androidx.cardview:cardview:1.0.0"
|
|
implementation "androidx.recyclerview:recyclerview:1.1.0"
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
|
|
// GMS
|
|
gmsImplementation 'com.google.android.gms:play-services-maps:17.0.0'
|
|
|
|
// V3
|
|
v3Implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'
|
|
v3Implementation 'com.google.android.gms:play-services-basement:17.5.0'
|
|
v3Implementation 'com.google.android.gms:play-services-base:17.5.0'
|
|
v3Implementation 'com.google.android.gms:play-services-gcm:17.0.0'
|
|
v3Implementation 'com.google.android.gms:play-services-location:17.1.0'
|
|
|
|
// Below is used to run the easypermissions library to manage location permissions
|
|
// EasyPermissions is needed to help us request for permission to access location
|
|
implementation 'pub.devrel:easypermissions:3.0.0'
|
|
|
|
// Tests
|
|
testImplementation 'junit:junit:4.13'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
|
}
|
|
|
|
task generateV3(type: Copy) {
|
|
group "V3 Beta"
|
|
description "Copies source code from GMS to V3 BETA."
|
|
|
|
from 'src/gms/java'
|
|
into 'src/v3/java'
|
|
filter { line ->
|
|
line.replace('com.google.android.gms.maps', 'com.google.android.libraries.maps')
|
|
}
|
|
filter(ConcatFilter, prepend: file('../../V3_FILE_HEADER'))
|
|
}
|
|
|
|
task generateV3Layout(type: Copy) {
|
|
group "V3 Beta"
|
|
description "Copies layout files from GMS to V3 BETA."
|
|
|
|
from 'src/gms/res/layout'
|
|
into 'src/v3/res/layout'
|
|
filter { line ->
|
|
line.replace('com.google.android.gms.maps', 'com.google.android.libraries.maps')
|
|
}
|
|
}
|