Add a platform independent MapContainer that can be called from shared ui
Wraps Google Maps on both Android and iOS Also bumps targetSDK to 36 because it was required by the library.
This commit is contained in:
@@ -20,6 +20,8 @@ plugins {
|
||||
// (org.jetbrains.compose) vilket gör att :shared förblir plattformsneutral.
|
||||
id("org.jetbrains.compose") version "1.9.0"
|
||||
id("com.codingfeline.buildkonfig") version "0.17.1"
|
||||
|
||||
kotlin("native.cocoapods")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
@@ -29,7 +31,7 @@ kotlin {
|
||||
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
|
||||
androidLibrary {
|
||||
namespace = "app.klottr.shared"
|
||||
compileSdk = 35
|
||||
compileSdk = 36
|
||||
minSdk = 26
|
||||
|
||||
withHostTestBuilder {
|
||||
@@ -76,6 +78,22 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
// Cocoapods is used for 3rd party library dependencies in iOS
|
||||
cocoapods {
|
||||
version = "1.0.0" // Out version of the podspec
|
||||
ios.deploymentTarget = "14.0"
|
||||
framework {
|
||||
baseName = xcfName
|
||||
isStatic = true
|
||||
}
|
||||
// This generates the cinterop => `platform.GoogleMaps.*`
|
||||
pod("GoogleMaps") // keep version unspecified to track latest podspec
|
||||
{
|
||||
// To support clang modules
|
||||
extraOpts += listOf("-compiler-option", "-fmodules")
|
||||
}
|
||||
}
|
||||
|
||||
// Source set declarations.
|
||||
// Declaring a target automatically creates a source set with the same name. By default, the
|
||||
// Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is
|
||||
@@ -139,6 +157,7 @@ kotlin {
|
||||
implementation(libs.ktor.client.okhttp)
|
||||
implementation("com.google.android.gms:play-services-location:21.3.0") // FusedLocation
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.9.0") // await() på Tasks
|
||||
implementation("com.google.maps.android:maps-compose:6.10.0") // Sep 9, 2025
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user