69 lines
2.2 KiB
Plaintext
69 lines
2.2 KiB
Plaintext
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
|
|
plugins {
|
|
alias(libs.plugins.kotlin.multiplatform)
|
|
alias(libs.plugins.compose.compiler)
|
|
alias(libs.plugins.jetbrains.compose)
|
|
alias(libs.plugins.serialization)
|
|
}
|
|
|
|
kotlin {
|
|
// Only desktop (macOS) for now
|
|
jvm("desktop")
|
|
// TODO: add back when Android SDK / Xcode is available
|
|
// androidTarget()
|
|
// listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach { iosTarget ->
|
|
// iosTarget.binaries.framework {
|
|
// baseName = "BricksShared"
|
|
// isStatic = true
|
|
// }
|
|
// }
|
|
|
|
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
compilerOptions { freeCompilerArgs.add("-Xexpect-actual-classes") }
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
implementation(compose.runtime)
|
|
implementation(compose.foundation)
|
|
implementation(compose.material3)
|
|
implementation(compose.ui)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.cio)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.serialization.json)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.coil.compose)
|
|
implementation(libs.coil.network)
|
|
}
|
|
desktopMain.dependencies {
|
|
implementation(compose.desktop.currentOs)
|
|
implementation(libs.ktor.client.okhttp)
|
|
}
|
|
// TODO: add back when iOS target is enabled
|
|
// iosMain.dependencies {
|
|
// implementation(libs.ktor.client.darwin)
|
|
// }
|
|
}
|
|
}
|
|
|
|
// TODO: uncomment when androidTarget() is enabled
|
|
// android {
|
|
// namespace = "com.bricks.mp"
|
|
// compileSdk = 35
|
|
// defaultConfig { minSdk = 24 }
|
|
// }
|
|
|
|
compose.desktop {
|
|
application {
|
|
mainClass = "com.bricks.MainKt"
|
|
nativeDistributions {
|
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
|
packageName = "bricks-mp"
|
|
packageVersion = "0.1.0"
|
|
}
|
|
}
|
|
}
|