diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 8cfd953..bbc7687 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -1,68 +1,21 @@ -import org.jetbrains.compose.desktop.application.dsl.TargetFormat -import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl -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) + id("recipe.kotlin.multiplatform") + id("recipe.compose.multiplatform") + id("recipe.android.application") + id("recipe.quality") } kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - } - } - - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { iosTarget -> - iosTarget.binaries.framework { - baseName = "ComposeApp" - isStatic = true - } - } - - jvm { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_21) - } - } - - js { - browser() - binaries.executable() - } - - @OptIn(ExperimentalWasmDsl::class) - wasmJs { - browser() - binaries.executable() - } - sourceSets { androidMain.dependencies { implementation(libs.compose.uiToolingPreview) implementation(libs.androidx.activity.compose) + implementation(libs.koin.android) } commonMain.dependencies { - implementation(libs.compose.runtime) - implementation(libs.compose.foundation) - implementation(libs.compose.material3) - implementation(libs.compose.ui) - implementation(libs.compose.components.resources) implementation(libs.compose.uiToolingPreview) - implementation(libs.androidx.lifecycle.viewmodelCompose) - implementation(libs.androidx.lifecycle.runtimeCompose) implementation(projects.shared) } - commonTest.dependencies { - implementation(libs.kotlin.test) - } jvmMain.dependencies { implementation(compose.desktop.currentOs) implementation(libs.kotlinx.coroutinesSwing) @@ -70,45 +23,6 @@ kotlin { } } -android { - namespace = "dev.ulfrx.recipe" - compileSdk = libs.versions.android.compileSdk.get().toInt() - - defaultConfig { - applicationId = "dev.ulfrx.recipe" - 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(libs.compose.uiTooling) } - -compose.desktop { - application { - mainClass = "dev.ulfrx.recipe.MainKt" - - nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "dev.ulfrx.recipe" - packageVersion = "1.0.0" - } - } -} diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 3896dca..d4bf9e5 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -1,42 +1,24 @@ -import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl -import org.jetbrains.kotlin.gradle.dsl.JvmTarget - plugins { - alias(libs.plugins.kotlinMultiplatform) + id("recipe.kotlin.multiplatform") + id("recipe.quality") alias(libs.plugins.androidLibrary) } kotlin { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) + explicitApi() + + // Override framework baseName: shared exposes "Shared.framework" to Swift, while + // composeApp's convention-plugin default is "ComposeApp.framework". (D-07 / PITFALL #10) + targets.withType().configureEach { + binaries.withType().configureEach { + baseName = "Shared" } } - iosArm64() - iosSimulatorArm64() - - jvm { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_21) - } - } - - js { - browser() - } - - @OptIn(ExperimentalWasmDsl::class) - wasmJs { - browser() - } - sourceSets { commonMain.dependencies { - // put your Multiplatform dependencies here - } - commonTest.dependencies { - implementation(libs.kotlin.test) + // Phase 1: intentionally empty. Domain models + DTOs land Phase 2+. + // D-19 / INFRA-06: Do NOT add Ktor, Compose, or SQLDelight deps here — EVER. } } } diff --git a/shared/src/jsMain/kotlin/dev/ulfrx/recipe/Platform.js.kt b/shared/src/jsMain/kotlin/dev/ulfrx/recipe/Platform.js.kt deleted file mode 100644 index 4d0855c..0000000 --- a/shared/src/jsMain/kotlin/dev/ulfrx/recipe/Platform.js.kt +++ /dev/null @@ -1,7 +0,0 @@ -package dev.ulfrx.recipe - -class JsPlatform : Platform { - override val name: String = "Web with Kotlin/JS" -} - -actual fun getPlatform(): Platform = JsPlatform() \ No newline at end of file