feat(core-android): receiver, permission, alarm and Flow helpers

New Android module (no Compose, no DI) with broadcastTicks, a coroutine
BroadcastReceiver.goAsync, Context.hasPermission, AlarmManager.setWakeup and
Flow.stateWhileSubscribed.
This commit is contained in:
2026-10-15 16:52:14 +02:00
parent 1cc7f8f71d
commit 394ac12236
13 changed files with 224 additions and 1 deletions
+2 -1
View File
@@ -75,6 +75,7 @@ should scan the submodule's Gradle scripts (see §5).
| Plumbing | `core-time` (JVM) | Pure logic; no Android, no deps. |
| Plumbing | `core-crash` (Android) | Self-contained subsystem; parameterized per app. |
| Plumbing | `core-prefs` (Android) | Typed DataStore layer. The store's name and construction stay with the app. |
| Plumbing | `core-android` (Android) | Receiver, permission, alarm and Flow helpers. No Compose, no DI. |
| Plumbing | `core-di` (JVM) | Dispatcher/scope qualifiers + their Hilt module. The only module that knows about DI. |
| Design — identity | `identity` (Android) | Theme factory + motion. App supplies seed/palette. |
| Design — components | `components` (Android) | Shared Compose primitives. App composes screens. |
@@ -95,7 +96,7 @@ Two kinds of module:
- **JVM library** (`core-time`) — `org.jetbrains.kotlin.jvm`, `jvmTarget = 17`,
JUnit 5 + Truth tests. The right home for pure logic; cheapest to build and
test.
- **Android library** (`core-crash`, `core-prefs`, `identity`, `components`) —
- **Android library** (`core-crash`, `core-prefs`, `core-android`, `identity`, `components`) —
`com.android.library` + the Compose plugin, `compileSdk 37` / `minSdk 29`.
> **AGP 9.x provides built-in Kotlin compilation.** Android modules therefore
+1
View File
@@ -17,6 +17,7 @@ divergent or app-specific code where it lives.
| `core-crash` | Android | Agendula |
| `core-prefs` | Android | Clockula |
| `core-di` | JVM | Clockula |
| `core-android` | Android | — (Calendula pending) |
| `identity` | Android | Agendula |
| `components` | Android | Agendula |
| `glance` | Android | Agendula (Calendula pending — its own M3 Expressive widget pass) |