Brings the branches the sibling apps actually ship from back onto main, so floret-kit stops forking per project. Merged in: - `vouch/settings` (what vouch pins), which already contains `feat/clockula` (what clockula pins) and `chore/deps-2026-10`: core-prefs, core-di, CollapsingScaffold FAB/no-back slots, the glance module, LocaleManager on API 33+, and the dependency bump - `feat/glance-module`: the three glance commits clockula's branch didn't have yet (progress ring/tile/check button, expressive shapes + header pill, WidgetDoneState) Both merged without conflicts. Version ends up at 0.7.0 (untagged). Heads-up for consumers: the deps bump moves the toolchain to Gradle 9.8.0 / AGP 9.4.1 / Kotlin 2.4.20. Since floret-kit is a composite build, a consumer must be on Gradle >= 9.6 to pin anything from here on. Calendula builds, tests and lints against this branch with just that toolchain bump, no source changes. Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/floret-kit/pulls/11
56 lines
1.8 KiB
Kotlin
56 lines
1.8 KiB
Kotlin
// core-prefs — the family's typed DataStore layer: `Pref<T>` (a key + a default +
|
|
// its codec), `PrefStore` (typed, distinct-until-changed reads and writes over a
|
|
// `DataStore<Preferences>`), `toEnum()` for stored values that degrade instead of
|
|
// throwing, and the shared appearance preferences (`ThemeMode`, `dynamicColor`).
|
|
// The store's *name* and its construction stay with the consuming app.
|
|
//
|
|
// An Android library rather than a JVM one: the whole surface is typed over
|
|
// `androidx.datastore.preferences.core.DataStore<Preferences>` and the app needs
|
|
// `Context.preferencesDataStoreFile(...)`, which ships only in the Android
|
|
// artifact — so this module `api`-exposes it and an app gets the whole stack from
|
|
// one dependency. No Compose here, so only the Android library plugin is applied.
|
|
plugins {
|
|
alias(libs.plugins.android.library)
|
|
}
|
|
|
|
android {
|
|
namespace = "de.jeanlucmakiola.floret.prefs"
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
minSdk = 29
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
all { it.useJUnitPlatform() }
|
|
isReturnDefaultValues = true
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Both are in the module's public API: `DataStore<Preferences>` is a
|
|
// constructor parameter and `Flow` is a return type.
|
|
api(libs.androidx.datastore.preferences)
|
|
api(libs.kotlinx.coroutines.core)
|
|
|
|
testImplementation(libs.junit.jupiter.api)
|
|
testRuntimeOnly(libs.junit.jupiter.engine)
|
|
testRuntimeOnly(libs.junit.platform.launcher)
|
|
testImplementation(libs.truth)
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
testImplementation(libs.turbine)
|
|
}
|