Repository navigation
Migrate to the shared common library (logger, crashes, debug pages) - #64
Conversation
Prerequisites for the shared com.lukeneedham:common library (Compose 1.10 needs minSdk 23 and compileSdk 36; Kotlin must be 2.2 or newer). - Kotlin 2.0.0 -> 2.2.21, KSP -> 2.2.21-2.0.4, AGP 8.7.1 -> 8.13.2, Gradle 8.9 -> 8.14.3 - Room 2.6.1 -> 2.8.4 (KSP2 / Kotlin 2.2 support) - Compose BOM 2024.04.01 -> 2026.02.00, matching the library's Compose 1.10 - android.kotlinOptions is an error in Kotlin 2.2: use kotlin.compilerOptions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
- Add the library's Maven repository and dependency (com.lukeneedham:common:0.1.0) - Call DebugKit.init at the top of App.onCreate; debug logs only in debug builds - Replace Logger/LoggerEngine/AndroidLoggerEngine with the library Logger - Remove CrashLogDao/CrashLog, the crash handler in App, CrashLogPage and the app's DebugPage - Route the Debug, Logs and Crashes pages to the library's pages; the app's mock data tools stay as DebugPage extraContent - Keep rules for the library's LogEntry/CrashEntry (release builds are minified) - Update CLAUDE.md The old crash logs in filesDir/crashlogs are left on disk, not migrated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
|
The The artifacts are on the What the run did show: the Gradle 8.14.3 wrapper, Generated by Claude Code |
The shared library's single provider of debug composition locals is now ProvideDebugSettings (renamed from ProvideAnimationSpeed, which provided only the animation speed). Every app wraps its content in it, even without a debug setting to read, so a setting added to the library later reaches the app with only a version bump. Needs common 0.2.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
The shared library needs Compose 1.10, so the BOM moved from 2024.04 to 2026.02. Pager's beyondBoundsPageCount is now beyondViewportPageCount, and the Material 3 ModalBottomSheet takes contentWindowInsets (a lambda) instead of windowInsets. Behaviour is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
0.2.1 keeps logging and the debug settings working, in memory, when there is no application context (plain JVM unit tests), instead of throwing UninitializedPropertyAccessException. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
0.3.0 makes the shared Logger a no-op until DebugKit.init runs, so it needs no application context, no android.util.Log and no files before the app starts (plain JVM unit tests never start it). DebugKit.init, already the first call at app start, switches the real logger on. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
…s debug page The shared library's DebugPage now shows only the library's own things, with no extraContent slot. App-specific debug tools therefore live on the app's own debug page, which has a button that opens the library's page. Compiles against common 0.3.0 and the next version, which removes the extraContent parameter. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
0.4.0 removes the extraContent parameter from the shared DebugPage, which shows only the library's own things. This app no longer uses it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
…through Logger The shared library's animation speed now scales the animations that have an explicit duration, through LocalAnimationSpeed.current.scale(ms): the recap share sheet settle and the camera focus indicator hold and fade. Animations that use the default spring are not affected. Also move the last three direct android.util.Log calls (CameraInput, VideoRecorder) to the shared Logger, which the migration missed, so those errors reach the Logs page and crash reports. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
Summary
Moves VideoDiary onto
com.lukeneedham:common:0.1.0(LukeNeedham/ci-workflows), followingdocs/using-the-library.md. Two commits: (1) the toolchain/SDK raise, (2) the migration.Toolchain (commit 1)
android { kotlinOptions }is an error in Kotlin 2.2, replaced bykotlin { compilerOptions }. The compose compiler plugin was already in use.Migration (commit 2)
settings.gradle.kts(insidedependencyResolutionManagement, soFAIL_ON_PROJECT_REPOSis respected; limited to groupcom.lukeneedham); dependency indeps.ktDebugKit.init(DebugKitConfig(enabled = BuildConfig.DEBUG, minLogLevel = Debug in debug / Info in release))at the top ofApp.onCreate(keeps "debug logs only in debug builds")Logger/LoggerEngine/AndroidLoggerEngine/LoggerOriginremoved; all call sites use the libraryLogger(d/w/e)CrashLogDao,CrashLog, the crash handler inApp,CrashLogPage, the app'sDebugPageand their Koin wiringNormalPagenow hasDebug,Logs,Crashes, routed to the library'sDebugPage/LogsPage/CrashesPage. The app's own tools (mock data, resync thumbnails, allow retake) are kept asDebugPageextraContent(DebugExtras/DebugExtrasContent)LogEntry/CrashEntry(release is minified and the doc says R8 is untested)Privacy
The library's Android manifest declares no permissions (only a non-exported content provider). The app manifest is unchanged, still with no INTERNET permission, and keeps its
ACCESS_NETWORK_STATEremoval. The library's dependencies (Compose, okio, kotlinx-serialization) add none. I could not inspect the merged manifest, so please check it in the CI APK.Not verified (please check CI)
./gradlewwas tried and could not resolve plugins offline, so everything was reviewed by reading. The Kotlin 2.2 / AGP 8.13 / KSP / Room 2.8 versions are chosen from Maven metadata but untested together.Notes / judgement calls
.txtfiles infilesDir/crashlogs. Room only holds saved recaps. Those files are left on disk, not migrated (noted in CLAUDE.md); delete the folder in a later release.VideoDiaryLog(with a clickable file:line origin) to the library defaultApp.allowBackupis on with default rules, so the library'sfilesDir/commonlogs/crashes are backed up as the old crash logs were. I did not change the backup rules.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDmfLXhjCA66KrhHPs1c5s
Generated by Claude Code