30 lines
994 B
Kotlin
30 lines
994 B
Kotlin
plugins {
|
|
id("gwenedeg.kmp.library")
|
|
}
|
|
|
|
kotlin {
|
|
// Adding custom `dependsOn` edges below disables the automatic default hierarchy, so re-apply it
|
|
// explicitly to keep the standard commonMain/appleMain/iosMain/webMain wiring.
|
|
applyDefaultHierarchyTemplate()
|
|
|
|
androidLibrary {
|
|
namespace = "bzh.ajaury.chombev.preferences"
|
|
}
|
|
|
|
sourceSets {
|
|
// Persistence via DataStore for every target that has an artifact for it (Android, iOS,
|
|
// Desktop). Web (JS/Wasm) has no DataStore artifact, so it keeps commonMain's in-memory
|
|
// implementation.
|
|
val dataStoreMain by creating {
|
|
dependsOn(commonMain.get())
|
|
dependencies {
|
|
implementation(libs.androidx.datastore.preferences.core)
|
|
implementation(libs.okio)
|
|
}
|
|
}
|
|
androidMain.get().dependsOn(dataStoreMain)
|
|
jvmMain.get().dependsOn(dataStoreMain)
|
|
iosMain.get().dependsOn(dataStoreMain)
|
|
}
|
|
}
|