feat(android-terminal): Phase A — core infrastructure
Foundation work for the Android tablet POS app. Adds the singletons that every screen needs (config persistence, network awareness, auth) without touching the existing screen stubs yet — Phases B–F will build on these. - gradle: bcrypt 0.10.2 pinned (used in Phase C for offline PIN verify) - LoyaltyApi: + GET /api/v1/store/loyalty/categories endpoint - ApiModels: + category_ids on StampRequest / PointsEarnRequest, + CategoryItem / CategoryListResponse - DeviceConfigRepository: DataStore wrapper for the paired-tablet state (api_url, auth_token, store_id/code/name, cached program/pins/categories JSON, per-seller language, resetDevice()) - AuthInterceptor: rewrites every request's host to the paired api_url and adds Bearer auth — Retrofit keeps a placeholder baseUrl since the real URL only exists post-pair - NetworkMonitor: Flow<Boolean> isOnline from ConnectivityManager - StaffPinRepository / CategoryRepository: cache-or-refresh pattern, Moshi-serialized to DataStore - AppModule: wires AuthInterceptor before the logging interceptor - strings.xml: ~50 strings × 4 locales (en authoritative; fr/de/lb translated, mirroring the loyalty backend's i18n approach) Verified by ./gradlew assembleDebug — clean build, only pre-existing warnings (Theme statusBarColor deprecation, Moshi-kapt deprecation). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,9 @@ dependencies {
|
||||
// DataStore (device config persistence)
|
||||
implementation(libs.datastore.preferences)
|
||||
|
||||
// bcrypt (verify staff PIN hashes locally — pure Java, no native deps)
|
||||
implementation(libs.bcrypt)
|
||||
|
||||
// Testing
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.junit.android)
|
||||
|
||||
Reference in New Issue
Block a user