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 exposedVersion = "0.61.0" val desktopMain by getting { dependencies { implementation(compose.desktop.currentOs) implementation(libs.kotlinx.coroutines.swing) implementation("io.ktor:ktor-client-okhttp:2.3.2") implementation("org.postgresql:postgresql:42.7.1") implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") implementation("org.jetbrains.exposed:exposed-crypt:$exposedVersion") implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") implementation("org.jetbrains.exposed:exposed-jodatime:$exposedVersion") implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion") implementation("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion") implementation("org.jetbrains.exposed:exposed-json:$exposedVersion") implementation("org.jetbrains.exposed:exposed-money:$exposedVersion") implementation("org.jetbrains.exposed:exposed-spring-boot-starter:$exposedVersion") implementation("io.ktor:ktor-server-core:2.3.4") implementation("io.ktor:ktor-server-netty:2.3.4") implementation("io.ktor:ktor-server-content-negotiation:2.3.4") implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.4") implementation("io.ktor:ktor-server-status-pages:2.3.4") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") } } val commonMain by getting { resources.srcDir("src/commonMain/composeResources") } androidMain.dependencies { implementation(compose.preview) implementation(libs.androidx.activity.compose) implementation(libs.androidx.lifecycle.viewmodel) // implementation("io.ktor:ktor-client-okhttp:2.3.2") // implementation("io.ktor:ktor-client-core:2.3.4") // implementation("io.ktor:ktor-client-json:2.3.4") // implementation("io.ktor:ktor-client-serialization:2.3.4") // implementation("io.ktor:ktor-client-android:2.3.4") // implementation("io.ktor:ktor-client-content-negotiation:2.3.0") // // implementation("io.ktor:ktor-server-core:2.3.4") // implementation("io.ktor:ktor-server-netty:2.3.4") // implementation("io.ktor:ktor-server-content-negotiation:2.3.4") // implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.4") // implementation("io.ktor:ktor-server-status-pages:2.3.4") // implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") // // implementation("org.postgresql:postgresql:42.7.1") // // implementation("org.jetbrains.exposed:exposed-json:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion") // implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") // implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-crypt:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-jodatime:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-kotlin-datetime:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-json:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-money:$exposedVersion") // implementation("org.jetbrains.exposed:exposed-spring-boot-starter:$exposedVersion") } commonMain.dependencies { val voyagerVersion = "1.1.0-beta02" implementation(compose.runtime) implementation(compose.foundation) implementation(compose.material) implementation(compose.ui) implementation(compose.components.resources) implementation(compose.components.uiToolingPreview) implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion") implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion") implementation(compose.preview) implementation(libs.androidx.lifecycle.viewmodel) implementation("media.kamel:kamel-image:0.7.0") implementation("io.ktor:ktor-client-core:2.3.2") implementation("io.ktor:ktor-client-cio:2.3.2") implementation("io.ktor:ktor-client-okhttp:2.3.2") implementation ("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2") repositories { google() mavenCentral() } } } } android { namespace = "org.example.project" compileSdk = libs.versions.android.compileSdk.get().toInt() defaultConfig { applicationId = "org.example.project" 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 isCoreLibraryDesugaringEnabled = true } } dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") } compose.desktop { application { mainClass = "org.example.project.MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "org.example.project" packageVersion = "1.0.0" } } }