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.
108 lines
3.1 KiB
108 lines
3.1 KiB
plugins { |
|
kotlin("multiplatform") |
|
kotlin("plugin.compose") |
|
id("com.android.library") |
|
id("org.jetbrains.compose") |
|
kotlin("plugin.serialization") |
|
id("kotlin-parcelize") |
|
} |
|
|
|
version = "1.0-SNAPSHOT" |
|
|
|
kotlin { |
|
androidTarget() |
|
jvm("desktop") |
|
js { |
|
browser() |
|
useEsModules() |
|
} |
|
wasmJs { browser() } |
|
|
|
listOf( |
|
iosX64(), |
|
iosArm64(), |
|
iosSimulatorArm64() |
|
).forEach { iosTarget -> |
|
iosTarget.binaries.framework { |
|
baseName = "shared" |
|
isStatic = true |
|
} |
|
} |
|
|
|
applyDefaultHierarchyTemplate() |
|
|
|
sourceSets { |
|
all { |
|
languageSettings { |
|
optIn("org.jetbrains.compose.resources.ExperimentalResourceApi") |
|
} |
|
} |
|
|
|
commonMain.dependencies { |
|
implementation(compose.runtime) |
|
implementation(compose.foundation) |
|
implementation(compose.material) |
|
implementation(compose.components.resources) |
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") |
|
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0") |
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0") |
|
} |
|
|
|
androidMain.dependencies { |
|
api("androidx.activity:activity-compose:1.8.2") |
|
api("androidx.appcompat:appcompat:1.6.1") |
|
api("androidx.core:core-ktx:1.12.0") |
|
implementation("androidx.camera:camera-camera2:1.3.1") |
|
implementation("androidx.camera:camera-lifecycle:1.3.1") |
|
implementation("androidx.camera:camera-view:1.3.1") |
|
implementation("com.google.accompanist:accompanist-permissions:0.29.2-rc") |
|
implementation("com.google.android.gms:play-services-maps:18.2.0") |
|
implementation("com.google.android.gms:play-services-location:21.1.0") |
|
implementation("com.google.maps.android:maps-compose:2.11.2") |
|
} |
|
|
|
val jsWasmMain by creating { |
|
dependsOn(commonMain.get()) |
|
dependencies { |
|
implementation(npm("uuid", "^9.0.1")) |
|
} |
|
} |
|
|
|
val jsMain by getting { |
|
dependsOn(jsWasmMain) |
|
} |
|
|
|
val wasmJsMain by getting { |
|
dependsOn(jsWasmMain) |
|
} |
|
|
|
val desktopMain by getting |
|
desktopMain.dependencies { |
|
implementation(compose.desktop.common) |
|
implementation(project(":mapview-desktop")) |
|
} |
|
val desktopTest by getting |
|
desktopTest.dependencies { |
|
implementation(compose.desktop.currentOs) |
|
implementation(compose.desktop.uiTestJUnit4) |
|
} |
|
} |
|
} |
|
|
|
android { |
|
compileSdk = 35 |
|
namespace = "example.imageviewer.shared" |
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") |
|
sourceSets["main"].res.srcDirs("src/androidMain/res") |
|
|
|
defaultConfig { |
|
minSdk = 26 |
|
} |
|
compileOptions { |
|
sourceCompatibility = JavaVersion.VERSION_17 |
|
targetCompatibility = JavaVersion.VERSION_17 |
|
} |
|
kotlin { |
|
jvmToolchain(17) |
|
} |
|
}
|
|
|