[go: nahoru, domu]

Skip to content

Commit

Permalink
chore: fix code snippet for installation (#1202)
Browse files Browse the repository at this point in the history
* chore: fix code snippet for installation
chore: update release config to update install snippet version number
chore: update and reorganize README
  • Loading branch information
wangela committed Aug 1, 2023
1 parent 2bcabfb commit bb5865e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
6 changes: 5 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
branches:
- main
- main, devsite
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
Expand All @@ -9,6 +9,10 @@ plugins:
- "build.gradle"
from: "\\bversion = '.*'"
to: "version = '${nextRelease.version}'"
- files:
- "build.gradle"
from: "com.google.maps.android:android-maps-utils:([0-9]+).([0-9]+).([0-9]+)"
to: "com.google.maps.android:android-maps-utils:${nextRelease.version}'"
- files:
- "README.md"
from: ":([0-9]+).([0-9]+).([0-9]+)"
Expand Down
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ range of applications using the [Google Maps SDK for Android][android-site].

You can also find Kotlin extensions for this library [here][android-maps-ktx].

## Developer Documentation

The generated [reference docs][javadoc] for a full list of classes and their methods.

Written guides for using the utilities are published in
[Google Maps Platform documentation][devsite-guide].

## Requirements

* Android API level 19+
Expand All @@ -44,6 +37,14 @@ Written guides for using the utilities are published in
dependencies {
// Utilities for Maps SDK for Android (requires Google Play Services)
implementation 'com.google.maps.android:android-maps-utils:3.4.0'
// Optionally add the Kotlin Extensions (KTX) for full Kotlin language support
// See latest version at https://github.com/googlemaps/android-maps-ktx
// implementation 'com.google.maps.android:maps-utils-ktx:<latest-version>'
// Make sure to also include the latest version of the Maps SDK for Android
// See latest version at https://goo.gle/android-maps-sdk-version
// implementation 'com.google.android.gms:play-services-maps:<latest-version>'
}
```

Expand All @@ -60,14 +61,23 @@ To run the demo app, you'll have to:
1. Add a single line to `local.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 the `debug` variant for the Maps SDK for Android version

## Documentation

See the generated [reference docs][javadoc] for a full list of classes and their methods.

Written guides for using the utilities are published in
[Google Maps Platform documentation][devsite-guide].

<details>
<summary><strong>Migration Guide from v0.x to 1.0</strong></summary>

## Migration Guide from v0.x to 1.0
### Migration Guide from v0.x to 1.0

Improvements made in version [1.0.0](https://github.com/googlemaps/android-maps-utils/releases/tag/1.0.0) of the library to support multiple layers on the map caused breaking changes to versions prior to it. These changes also modify behaviors that are documented in the [Maps SDK for Android Maps documentation](https://developers.google.com/maps/documentation/android-sdk/intro) site. This section outlines all those changes and how you can migrate to use this library since version 1.0.0.


## Usage

### Adding Click Events

Click events originate in the layer-specific object that added the marker/ground overlay/polyline/polygon. In each layer, the click handlers are passed to the marker, ground overlay, polyline, or polygon `Collection` object.
Expand Down Expand Up @@ -286,7 +296,7 @@ Encounter an issue while using this library?
If you find a bug or have a feature request, please [file an issue].
Or, if you'd like to contribute, send us a [pull request] and refer to our [code of conduct].

You can also reach us on our [Discord channel].
You can also discuss this library on our [Discord server].

For more information, check out the detailed guide on the
[Google Developers site][devsite-guide].
Expand Down
9 changes: 3 additions & 6 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.apache.tools.ant.filters.ConcatFilter

/**
* Copyright 2020 Google Inc.
*
Expand Down Expand Up @@ -50,13 +48,12 @@ android {
dependencies {

// [START_EXCLUDE silent]
implementation 'androidx.appcompat:appcompat:1.7.0-alpha01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

// GMS
implementation 'com.google.android.gms:play-services-maps:18.1.0'
implementation project(':library')

implementation 'androidx.appcompat:appcompat:1.7.0-alpha01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// [END_EXCLUDE]
Expand Down

0 comments on commit bb5865e

Please sign in to comment.