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.
105 lines
2.5 KiB
105 lines
2.5 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")
|
||
|
}
|
||
|
|
||
|
version = "1.0-SNAPSHOT"
|
||
|
|
||
|
kotlin {
|
||
|
android()
|
||
|
|
||
|
jvm("desktop")
|
||
|
|
||
|
ios()
|
||
|
iosSimulatorArm64()
|
||
|
|
||
|
js(IR) {
|
||
|
browser()
|
||
|
}
|
||
|
|
||
|
macosX64 {
|
||
|
binaries {
|
||
|
executable {
|
||
|
entryPoint = "main"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
macosArm64 {
|
||
|
binaries {
|
||
|
executable {
|
||
|
entryPoint = "main"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
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
|
||
|
}
|
||
|
extraSpecAttributes["resources"] = "['src/commonMain/resources/**', 'src/iosMain/resources/**']"
|
||
|
}
|
||
|
|
||
|
sourceSets {
|
||
|
val commonMain by getting {
|
||
|
dependencies {
|
||
|
implementation(compose.ui)
|
||
|
implementation(compose.foundation)
|
||
|
implementation(compose.material)
|
||
2 years ago
|
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
|
||
|
implementation(compose.components.resources)
|
||
2 years ago
|
}
|
||
|
}
|
||
|
val androidMain by getting {
|
||
|
dependencies {
|
||
2 years ago
|
api("androidx.activity:activity-compose:1.6.1")
|
||
|
api("androidx.appcompat:appcompat:1.6.1")
|
||
|
api("androidx.core:core-ktx:1.9.0")
|
||
2 years ago
|
}
|
||
|
}
|
||
|
val iosMain by getting
|
||
|
val iosSimulatorArm64Main by getting {
|
||
|
dependsOn(iosMain)
|
||
|
}
|
||
|
val desktopMain by getting {
|
||
|
dependencies {
|
||
|
implementation(compose.desktop.common)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
val macosMain by creating {
|
||
|
dependsOn(commonMain)
|
||
|
}
|
||
|
val macosX64Main by getting {
|
||
|
dependsOn(macosMain)
|
||
|
}
|
||
|
val macosArm64Main by getting {
|
||
|
dependsOn(macosMain)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
android {
|
||
|
compileSdk = 33
|
||
|
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
|
||
2 years ago
|
sourceSets["main"].res.srcDirs("src/androidMain/res")
|
||
|
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
|
}
|
||
2 years ago
|
}
|