46 lines
1.5 KiB
Kotlin
46 lines
1.5 KiB
Kotlin
plugins {
|
|
// AGP must apply BEFORE recipe.kotlin.multiplatform — the latter calls androidTarget(),
|
|
// which requires the Android Gradle Plugin to already be on the project.
|
|
alias(libs.plugins.androidLibrary)
|
|
id("recipe.kotlin.multiplatform")
|
|
alias(libs.plugins.kotlinSerialization)
|
|
id("recipe.quality")
|
|
}
|
|
|
|
kotlin {
|
|
explicitApi()
|
|
|
|
// No iOS framework here — composeApp's umbrella `ComposeApp.framework`
|
|
// transitively exports shared. Producing a second framework would double-bundle
|
|
// the Kotlin stdlib at link time (PITFALL: duplicate-framework collision).
|
|
|
|
sourceSets {
|
|
commonMain.dependencies {
|
|
// Phase 2: DTOs land here (MeResponse/User per D-27). kotlinx.serialization
|
|
// is the only allowed runtime dependency in shared/commonMain — D-19 / INFRA-06
|
|
// forbids Ktor, Compose, SQLDelight, Koin, Kermit. `api(...)` so consumers
|
|
// (composeApp, server) inherit the @Serializable runtime without each
|
|
// re-declaring it.
|
|
api(libs.kotlinx.serializationJson)
|
|
}
|
|
}
|
|
}
|
|
|
|
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()
|
|
}
|
|
}
|