- composeApp/build.gradle.kts now applies 4 recipe.* IDs (kotlin.multiplatform, compose.multiplatform, android.application, quality); removes all structural target/android/nativeDistributions blocks (114 -> 28 lines) - shared/build.gradle.kts applies recipe.kotlin.multiplatform + recipe.quality + androidLibrary; adds explicitApi() (D-12) and KotlinNativeTarget/Framework baseName = "Shared" override (D-07 / PITFALL #10); keeps android { } block per Open Question #1 - Adds libs.koin.android to androidMain dependencies (for Plan 04's MainApplication androidContext) - Drops js target per D-01: removes js { browser() } from both modules and deletes shared/src/jsMain/Platform.js.kt - iosX64 remains absent per D-02 - No version literals leak; tools/verify-no-version-literals.sh + verify-shared-pure.sh both pass
37 lines
1.1 KiB
Kotlin
37 lines
1.1 KiB
Kotlin
plugins {
|
|
id("recipe.kotlin.multiplatform")
|
|
id("recipe.quality")
|
|
alias(libs.plugins.androidLibrary)
|
|
}
|
|
|
|
kotlin {
|
|
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<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>().configureEach {
|
|
binaries.withType<org.jetbrains.kotlin.gradle.plugin.mpp.Framework>().configureEach {
|
|
baseName = "Shared"
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
// Phase 1: intentionally empty. Domain models + DTOs land Phase 2+.
|
|
// D-19 / INFRA-06: Do NOT add Ktor, Compose, or SQLDelight deps here — EVER.
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "dev.ulfrx.recipe.shared"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
defaultConfig {
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
}
|
|
}
|