Multi/composeApp/build.gradle.kts

160 lines
6.8 KiB
Plaintext
Raw Permalink Normal View History

2025-04-22 20:28:03 +00:00
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")
2025-05-01 11:26:13 +00:00
2025-04-22 20:28:03 +00:00
sourceSets {
2025-05-01 11:26:13 +00:00
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")
2025-05-03 13:15:13 +00:00
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")
2025-05-01 11:26:13 +00:00
}
}
2025-04-28 00:08:03 +00:00
val commonMain by getting {
resources.srcDir("src/commonMain/composeResources")
}
2025-04-22 20:28:03 +00:00
androidMain.dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.viewmodel)
2025-05-03 13:15:13 +00:00
// 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")
2025-04-22 20:28:03 +00:00
}
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)
2025-04-28 00:08:03 +00:00
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")
2025-05-01 11:26:13 +00:00
implementation ("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
2025-04-28 00:08:03 +00:00
repositories {
google()
mavenCentral()
}
2025-04-22 20:28:03 +00:00
}
}
}
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
2025-05-03 13:15:13 +00:00
isCoreLibraryDesugaringEnabled = true
2025-04-22 20:28:03 +00:00
}
}
2025-05-01 11:26:13 +00:00
dependencies {
2025-05-03 13:15:13 +00:00
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
2025-05-01 11:26:13 +00:00
}
2025-04-22 20:28:03 +00:00
compose.desktop {
application {
mainClass = "org.example.project.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "org.example.project"
packageVersion = "1.0.0"
}
}
}