diff options
Diffstat (limited to 'shared/build.gradle.kts')
| -rw-r--r-- | shared/build.gradle.kts | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts new file mode 100644 index 0000000..8b56841 --- /dev/null +++ b/shared/build.gradle.kts @@ -0,0 +1,46 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + alias(libs.plugins.kotlinMultiplatform) + alias(libs.plugins.androidMultiplatformLibrary) + alias(libs.plugins.composeMultiplatform) + alias(libs.plugins.composeCompiler) + alias(libs.plugins.kotlinSerialization) +} + +// :shared is a kotlin multiplatform *library*. it holds the domain model, the +// ui, and (later) networking. the runnable apps live in :androidApp / :desktopApp. +// +// with agp 9 this module uses com.android.kotlin.multiplatform.library, not +// com.android.application/com.android.library, and there is no top-level +// `android {}` block — android config lives in `kotlin { androidLibrary {} }`. +kotlin { + android { + namespace = "dev.serrahima.lluerna.shared" + compileSdk = libs.versions.android.compileSdk.get().toInt() + minSdk = libs.versions.android.minSdk.get().toInt() + + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + } + + // off by default in the new plugin; needed if we ever use compose resources. + androidResources { + enable = true + } + } + + // the jvm target, consumed by :desktopApp. + jvm() + + sourceSets { + commonMain.dependencies { + implementation(libs.compose.runtime) + implementation(libs.compose.foundation) + implementation(libs.compose.material3) + implementation(libs.compose.ui) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.serialization.json) + } + } +} |
