diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-10-23 21:59:37 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-10-24 20:00:58 -0700 |
| commit | 64f825465de9fa30c4dfe2707067efdb96110db8 (patch) | |
| tree | 5241385e316e2f4ceede5018603103d71be75202 /composeApp/build.gradle.kts | |
| download | abstraction-engine-kt-64f825465de9fa30c4dfe2707067efdb96110db8.tar.gz abstraction-engine-kt-64f825465de9fa30c4dfe2707067efdb96110db8.zip | |
Init
Diffstat (limited to 'composeApp/build.gradle.kts')
| -rw-r--r-- | composeApp/build.gradle.kts | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts new file mode 100644 index 0000000..9e17fc5 --- /dev/null +++ b/composeApp/build.gradle.kts @@ -0,0 +1,101 @@ +import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + alias(libs.plugins.kotlinMultiplatform) + alias(libs.plugins.androidApplication) + alias(libs.plugins.composeMultiplatform) + alias(libs.plugins.composeCompiler) + alias(libs.plugins.composeHotReload) +} + +kotlin { + compilerOptions { + freeCompilerArgs.add("-opt-in=kotlin.time.ExperimentalTime") + } + + androidTarget { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + } + } + + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { + baseName = "ComposeApp" + isStatic = true + } + } + + jvm() + + sourceSets { + androidMain.dependencies { + implementation(compose.preview) + implementation(libs.androidx.activity.compose) + } + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.ui) + implementation(compose.components.resources) + implementation(compose.components.uiToolingPreview) + implementation(libs.androidx.lifecycle.viewmodelCompose) + implementation(libs.androidx.lifecycle.runtimeCompose) + } + commonTest.dependencies { + implementation(libs.kotlin.test) + } + jvmMain.dependencies { + implementation(compose.desktop.currentOs) + implementation(libs.kotlinx.coroutinesSwing) + } + } +} + +android { + namespace = "coffee.liz.abstractionengine" + compileSdk = libs.versions.android.compileSdk.get().toInt() + + defaultConfig { + applicationId = "coffee.liz.abstractionengine" + 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 = "coffee.liz.abstractionengine.MainKt" + + nativeDistributions { + targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + packageName = "coffee.liz.abstractionengine" + packageVersion = "1.0.0" + } + } +} |
