Skip to content

Commit f0a4305

Browse files
Copilotpatrickmichalikarturgesiarz
authored
Added a new section in README.md regarding Gradle Version Catalogs (#31)
* Initial plan * Update Installation section to show Gradle version catalogs as recommended approach Co-authored-by: patrickmichalik <[email protected]> * Revert changes to gradle/libs.versions.toml as requested Co-authored-by: patrickmichalik <[email protected]> * readme update --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: patrickmichalik <[email protected]> Co-authored-by: Artur Gęsiarz <[email protected]>
1 parent ca150a1 commit f0a4305

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="docs/cover_image.png" alt="KMP Maps by Software Mansion" width="100%">
2-
3-
### Cross-platform map component for Compose Multiplatform using Google Maps on Android and Apple Maps on iOS
1+
![KMP Maps by Software Mansion](/docs/cover_image.png)
42

53
[![Kotlin](https://img.shields.io/badge/Kotlin-2.2.20-blue.svg)](https://kotlinlang.org)
64
[![License](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
@@ -18,7 +16,29 @@
1816

1917
## Installation
2018

21-
Add the library to your `build.gradle.kts`:
19+
### Using Gradle Version Catalogs (Recommended)
20+
21+
First, add the library to your `gradle/libs.versions.toml` file:
22+
23+
```toml
24+
[versions]
25+
kmpMaps = "0.1.0"
26+
27+
[libraries]
28+
swmansion-kmpMaps = { module = "com.swmansion.kmpmaps:kmp-maps", version.ref = "kmpMaps" }
29+
```
30+
31+
Then add it to your `build.gradle.kts`:
32+
33+
```kotlin
34+
dependencies {
35+
implementation(libs.swmansion.kmpMaps)
36+
}
37+
```
38+
39+
### Alternative: Direct Dependency Declaration
40+
41+
If you're not using Gradle version catalogs, you can add the library directly to your `build.gradle.kts`:
2242

2343
```kotlin
2444
dependencies {
@@ -119,7 +139,7 @@ fun MyMapScreen() {
119139
zoom = 13f
120140
),
121141
markers = listOf(
122-
MapMarker(
142+
Marker(
123143
coordinates = Coordinates(latitude = 50.0486, longitude = 19.9654),
124144
title = "Software Mansion",
125145
androidSnippet = "Software house"

docs/cover_image.png

36.8 KB
Loading

0 commit comments

Comments
 (0)