88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
|
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||
|
|
||
|
plugins {
|
||
|
alias(libs.plugins.kotlinMultiplatform)
|
||
|
alias(libs.plugins.androidApplication)
|
||
|
alias(libs.plugins.composeMultiplatform)
|
||
|
alias(libs.plugins.composeCompiler)
|
||
|
}
|
||
|
|
||
|
kotlin {
|
||
|
androidTarget {
|
||
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||
|
compilerOptions {
|
||
|
jvmTarget.set(JvmTarget.JVM_11)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
jvm("desktop")
|
||
|
|
||
|
sourceSets {
|
||
|
val desktopMain by getting
|
||
|
|
||
|
androidMain.dependencies {
|
||
|
implementation(compose.preview)
|
||
|
implementation(libs.androidx.activity.compose)
|
||
|
}
|
||
|
commonMain.dependencies {
|
||
|
implementation(compose.runtime)
|
||
|
implementation(compose.foundation)
|
||
|
implementation(compose.material)
|
||
|
implementation(compose.ui)
|
||
|
implementation(compose.components.resources)
|
||
|
implementation(compose.components.uiToolingPreview)
|
||
|
implementation(libs.androidx.lifecycle.viewmodel)
|
||
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
||
|
}
|
||
|
desktopMain.dependencies {
|
||
|
implementation(compose.desktop.currentOs)
|
||
|
implementation(libs.kotlinx.coroutines.swing)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
android {
|
||
|
namespace = "org.example.shoesapptest"
|
||
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||
|
|
||
|
defaultConfig {
|
||
|
applicationId = "org.example.shoesapptest"
|
||
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||
|
versionCode = 1
|
||
|
versionName = "1.0"
|
||
|
}
|
||
|
packaging {
|
||
|
resources {
|
||
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||
|
}
|
||
|
}
|
||
|
buildTypes {
|
||
|
getByName("release") {
|
||
|
isMinifyEnabled = false
|
||
|
}
|
||
|
}
|
||
|
compileOptions {
|
||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||
|
targetCompatibility = JavaVersion.VERSION_11
|
||
|
}
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
debugImplementation(compose.uiTooling)
|
||
|
}
|
||
|
|
||
|
compose.desktop {
|
||
|
application {
|
||
|
mainClass = "org.example.shoesapptest.MainKt"
|
||
|
|
||
|
nativeDistributions {
|
||
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||
|
packageName = "org.example.shoesapptest"
|
||
|
packageVersion = "1.0.0"
|
||
|
}
|
||
|
}
|
||
|
}
|