Skip to content

Commit

Permalink
feat(google-maps): provides variables for configuring dependencies (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
theproducer committed Jun 30, 2022
1 parent 44c040f commit 5c077f1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
13 changes: 13 additions & 0 deletions google-maps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ To use certain location features, the SDK requires the following permissions to
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```

### Variables

This plugin will use the following project variables (defined in your app's `variables.gradle` file):

- `$googleMapsPlayServicesVersion`: version of `com.google.android.gms:play-services-maps` (default: `18.0.2`)
- `$googleMapsUtilsVersion`: version of `com.google.maps.android:android-maps-utils` (default: `2.3.0`)
- `$googleMapsKtxVersion`: version of `com.google.maps.android:maps-ktx` (default: `3.4.0`)
- `$googleMapsUtilsKtxVersion`: version of `com.google.maps.android:maps-utils-ktx` (default: `3.4.0`)
- `$kotlinxCoroutinesVersion`: version of `org.jetbrains.kotlinx:kotlinx-coroutines-android` and `org.jetbrains.kotlinx:kotlinx-coroutines-core` (default: `1.6.3`)
- `$androidxCoreKTXVersion`: version of `androidx.core:core-ktx` (default: `1.8.0`)
- `$kotlin_version`: version of `org.jetbrains.kotlin:kotlin-stdlib-jdk7` (default: `1.7.0`)


## Usage

The Google Maps Capacitor plugin ships with a web component that must be used to render the map in your application as it enables us to embed the native view more effectively on iOS. The plugin will automatically register this web component for use in your application.
Expand Down
22 changes: 14 additions & 8 deletions google-maps/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ ext {
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxCoreKTXVersion = project.hasProperty('androidxCoreKTXVersion') ? rootProject.ext.androidxCoreKTXVersion : '1.8.0'
googleMapsPlayServicesVersion = project.hasProperty('googleMapsPlayServicesVersion') ? rootProject.ext.googleMapsPlayServicesVersion : '18.0.2'
googleMapsUtilsVersion = project.hasProperty('googleMapsUtilsVersion') ? rootProject.ext.googleMapsUtilsVersion : '2.3.0'
googleMapsKtxVersion = project.hasProperty('googleMapsKtxVersion') ? rootProject.ext.googleMapsKtxVersion : '3.4.0'
googleMapsUtilsKtxVersion = project.hasProperty('googleMapsUtilsKtxVersion') ? rootProject.ext.googleMapsUtilsKtxVersion : '3.4.0'
kotlinxCoroutinesVersion = project.hasProperty('kotlinxCoroutinesVersion') ? rootProject.ext.kotlinxCoroutinesVersion : '1.6.3'
}

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.7.0'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -44,8 +50,8 @@ android {
}

dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion")
}
}

Expand All @@ -62,11 +68,11 @@ dependencies {
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation "androidx.core:core-ktx:1.6.0"
implementation "androidx.core:core-ktx:$androidxCoreKTXVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'com.google.maps.android:maps-ktx:3.3.0'
implementation 'com.google.maps.android:maps-utils-ktx:3.3.0'
implementation 'com.google.maps.android:android-maps-utils:2.2.3'
implementation 'com.google.android.gms:play-services-maps:18.0.2'
implementation "com.google.maps.android:maps-ktx:$googleMapsKtxVersion"
implementation "com.google.maps.android:maps-utils-ktx:$googleMapsUtilsKtxVersion"
implementation "com.google.maps.android:android-maps-utils:$googleMapsUtilsVersion"
implementation "com.google.android.gms:play-services-maps:$googleMapsPlayServicesVersion"
}

0 comments on commit 5c077f1

Please sign in to comment.