You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
3.1 KiB
93 lines
3.1 KiB
2 years ago
|
@file:Suppress("OPT_IN_IS_NOT_ENABLED")
|
||
|
|
||
2 years ago
|
plugins {
|
||
|
kotlin("multiplatform")
|
||
|
kotlin("native.cocoapods")
|
||
|
id("com.android.library")
|
||
|
id("org.jetbrains.compose")
|
||
|
kotlin("plugin.serialization")
|
||
|
}
|
||
|
|
||
|
version = "1.0-SNAPSHOT"
|
||
|
|
||
|
kotlin {
|
||
|
android()
|
||
|
jvm("desktop")
|
||
|
ios()
|
||
|
iosSimulatorArm64()
|
||
|
|
||
|
cocoapods {
|
||
|
summary = "Shared code for the sample"
|
||
|
homepage = "https://github.com/JetBrains/compose-jb"
|
||
|
ios.deploymentTarget = "14.1"
|
||
|
podfile = project.file("../iosApp/Podfile")
|
||
|
framework {
|
||
|
baseName = "shared"
|
||
|
isStatic = true
|
||
|
}
|
||
2 years ago
|
extraSpecAttributes["resources"] =
|
||
|
"['src/commonMain/resources/**', 'src/iosMain/resources/**']"
|
||
2 years ago
|
}
|
||
|
|
||
|
sourceSets {
|
||
|
val commonMain by getting {
|
||
|
dependencies {
|
||
|
implementation(compose.runtime)
|
||
|
implementation(compose.foundation)
|
||
|
implementation(compose.material)
|
||
2 years ago
|
//implementation(compose.materialIconsExtended) // TODO not working on iOS
|
||
2 years ago
|
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||
|
implementation(compose.components.resources)
|
||
2 years ago
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
|
||
|
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
||
2 years ago
|
}
|
||
|
}
|
||
|
val androidMain by getting {
|
||
|
dependencies {
|
||
2 years ago
|
api("androidx.activity:activity-compose:1.7.0")
|
||
2 years ago
|
api("androidx.appcompat:appcompat:1.6.1")
|
||
|
api("androidx.core:core-ktx:1.9.0")
|
||
2 years ago
|
implementation("androidx.camera:camera-camera2:1.2.2")
|
||
|
implementation("androidx.camera:camera-lifecycle:1.2.2")
|
||
|
implementation("androidx.camera:camera-view:1.2.2")
|
||
2 years ago
|
implementation("com.google.accompanist:accompanist-permissions:0.29.2-rc")
|
||
|
implementation("com.google.android.gms:play-services-maps:18.1.0")
|
||
|
implementation("com.google.android.gms:play-services-location:21.0.1")
|
||
|
implementation("com.google.maps.android:maps-compose:2.11.2")
|
||
2 years ago
|
}
|
||
|
}
|
||
|
val iosMain by getting {
|
||
|
dependencies {
|
||
2 years ago
|
// Kotlin Coroutines 1.7.0 contains Dispatchers.IO
|
||
2 years ago
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.0-Beta")
|
||
2 years ago
|
}
|
||
|
}
|
||
|
val iosSimulatorArm64Main by getting {
|
||
|
dependsOn(iosMain)
|
||
|
}
|
||
2 years ago
|
|
||
2 years ago
|
|
||
|
val desktopMain by getting {
|
||
|
dependencies {
|
||
|
implementation(compose.desktop.common)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
android {
|
||
|
compileSdk = 33
|
||
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||
|
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
||
2 years ago
|
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
|
||
|
|
||
2 years ago
|
defaultConfig {
|
||
2 years ago
|
minSdk = 26
|
||
2 years ago
|
targetSdk = 33
|
||
|
}
|
||
|
compileOptions {
|
||
2 years ago
|
sourceCompatibility = JavaVersion.VERSION_11
|
||
|
targetCompatibility = JavaVersion.VERSION_11
|
||
2 years ago
|
}
|
||
|
}
|