Skip to content

Commit

Permalink
chore: update dependencies and secrets gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wangela committed Oct 27, 2023
1 parent 157fada commit 793f365
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ local.properties
.project
project.properties
secure.properties
secrets.properties
.DS_Store
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ It enables you to write more concise, idiomatic Kotlin. Each set of extensions c
## Requirements
* Kotlin-enabled project
* Kotlin coroutines
* API level 15+
* API level 21+
* An [API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key)

## Installation

If you are using the Maps SDK through Google Play Services:

```groovy
dependencies {
Expand All @@ -33,8 +32,6 @@ dependencies {
}
```

_**Note**_: The Beta version of the SDK is deprecated and scheduled for decommissioning. A future version of the SDK will provide similar support for Beta features. See the [release notes](https://developers.google.com/maps/documentation/android-sdk/releases#2021-08-18) for more information.

## Example Usage

With this KTX library, you should be able to take advantage of several Kotlin language features such as extension functions, named parameters and default arguments, destructuring declarations, and coroutines.
Expand All @@ -48,8 +45,8 @@ This repository includes a [demo app](app) that illustrates the use of this KTX
To run the demo app, you'll have to:

1. [Get a Maps API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key)
1. Create a file in the root directory called `secure.properties` (this file should *NOT* be under version control to protect your API key)
1. Add a single line to `secure.properties` that looks like `MAPS_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained in the first step
1. Create a file in the root directory called `secrets.properties` (this file should *NOT* be under version control to protect your API key)
1. Add a single line to `secrets.properties` that looks like `MAPS_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained in the first step
1. Build and run

### Maps SDK KTX
Expand Down
14 changes: 4 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,22 @@ android {
namespace 'com.google.maps.android.ktx.demo'
}

// [START maps_android_utils_ktx_install_snippet]
dependencies {
// [START_EXCLUDE silent]
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation deps.kotlin
implementation deps.androidx.appcompat
implementation deps.androidx.coreKtx
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'com.google.android.gms:play-services-maps:18.2.0'
// implementation 'com.google.maps.android:maps-ktx:4.0.0'
implementation project(':maps-ktx')
// implementation project(':maps-utils-ktx')
// [END_EXCLUDE]
implementation 'com.google.maps.android:maps-utils-ktx:4.0.0'
implementation project(':maps-utils-ktx')
}
// [END maps_android_utils_ktx_install_snippet]

secrets {
// To add your Maps API key to this project:
// 1. Create a file ./secure.properties
// 1. Create a file ./secrets.properties
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName 'secure.properties'
defaultPropertiesFileName 'secure.defaults.properties'
propertiesFileName 'secrets.properties'
defaultPropertiesFileName 'secrets.defaults.properties'
}
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ buildscript {
'kotlinxCoroutines': '1.6.0',
'mockito' : '3.0.0',
'mockitoKotlin' : '2.2.0',
'playServices' : '18.1.0',
'androidMapsSdk' : '18.2.0',
'volley' : '1.2.0',
]

Expand All @@ -53,11 +53,10 @@ buildscript {
'junit' : "junit:junit:$versions.junit",
'kotlin' : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin",
'kotlinxCoroutines': "org.jetbrains.kotlinx:kotlinx-coroutines-android:$versions.kotlinxCoroutines",
'mapsBeta' : "com.google.android.libraries.maps:maps:$versions.mapsBeta",
'mockito' : "org.mockito:mockito-core:$versions.mockito",
'mockitoKotlin' : "com.nhaarman.mockitokotlin2:mockito-kotlin:$versions.mockitoKotlin",
'playServices' : [
'maps' : "com.google.android.gms:play-services-maps:$versions.playServices",
'maps' : "com.google.android.gms:play-services-maps:$versions.androidMapsSdk",
],
'volley' : "com.android.volley:volley:$versions.volley",
]
Expand Down
1 change: 0 additions & 1 deletion maps-utils-ktx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ android {
dependencies {
implementation deps.kotlin
api deps.androidMapsUtils.gms
api deps.playServices.maps

// Tests
testImplementation deps.androidx.test
Expand Down
File renamed without changes.

0 comments on commit 793f365

Please sign in to comment.