Files
orion/clients/terminal-android/app/build.gradle.kts
Samir Boulahtit c1d367bac2
Some checks failed
CI / ruff (push) Successful in 14s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled
feat(android-terminal): Phase F — kiosk, immersive, queued-action toast
Closes out the Android terminal plan (Phases A → F).

- MainActivity:
  * Immersive mode via WindowInsetsControllerCompat — hides status +
    navigation bars, swipe-to-reveal with auto-hide
    (BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE). Re-applied in onResume so
    a transient overlay can't leave the bars visible.
  * Lock Task Mode — startLockTask() in onResume. The manifest already
    declares lockTaskMode="if_whitelisted", so this enters kiosk on a
    properly MDM-provisioned tablet and is a silent no-op (caught
    SecurityException) on dev / unprovisioned devices.

- TerminalScreen:
  * SnackbarHost pinned at the bottom; LaunchedEffect(actionResult)
    shows "Queued — will sync when back online" whenever an offline
    action gets queued, so the cashier has explicit feedback beyond the
    top-bar pending pill.
  * 4 new locale strings (en/fr/de/lb) for the snackbar copy.

- Manifest cleanup: dropped redundant tools:replace from the debug
  AndroidManifest overlay (networkSecurityConfig isn't set in the main
  manifest, so the replace directive was a no-op + emitted a warning).

Skipped from the plan: a custom splash screen (the existing theme
background renders for the cold-start frame; adding the splashscreen
library is polish for a follow-up) and per-action success toasts
(the action sheet closing + balance refresh + recent-feed update are
adequate confirmation).

Verified by ./gradlew assembleDebug — clean build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 00:20:46 +02:00

119 lines
3.6 KiB
Kotlin

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.ksp)
alias(libs.plugins.hilt)
}
android {
namespace = "lu.rewardflow.terminal"
compileSdk = 35
defaultConfig {
applicationId = "lu.rewardflow.terminal"
minSdk = 26 // Android 8.0 — covers 95%+ of tablets
targetSdk = 35
versionCode = 1
versionName = "1.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
buildConfigField("String", "DEFAULT_API_URL", "\"http://10.0.2.2:8000\"")
}
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
buildConfigField("String", "DEFAULT_API_URL", "\"https://rewardflow.lu\"")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
buildConfig = true
}
}
dependencies {
// AndroidX Core
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
// Compose
implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.ui.graphics)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.material3)
implementation(libs.compose.material.icons)
implementation(libs.activity.compose)
implementation(libs.navigation.compose)
implementation(libs.lifecycle.runtime.compose)
implementation(libs.lifecycle.viewmodel.compose)
debugImplementation(libs.compose.ui.tooling)
// Networking (Retrofit + Moshi)
// Note: Moshi 1.15.x prints a one-line "Kapt support … deprecated" warning
// during hiltJavaCompileDebug because Hilt's javac compile auto-discovers
// its annotation processor. It's purely cosmetic — KSP runs the codegen
// and the warning has no effect on output. Cure (moshix) needed Kotlin
// 2.1.21+, which would cascade into bumping KSP / Compose BOM. Living
// with the warning until Moshi 2.0 ships KSP-native.
implementation(libs.retrofit)
implementation(libs.retrofit.moshi)
implementation(libs.okhttp)
implementation(libs.okhttp.logging)
implementation(libs.moshi)
ksp(libs.moshi.codegen)
// Room (offline database)
implementation(libs.room.runtime)
implementation(libs.room.ktx)
ksp(libs.room.compiler)
// WorkManager (background sync)
implementation(libs.work.runtime.ktx)
// Hilt (dependency injection)
implementation(libs.hilt.android)
ksp(libs.hilt.compiler)
implementation(libs.hilt.navigation.compose)
implementation(libs.hilt.work)
ksp(libs.androidx.hilt.compiler)
// CameraX + ML Kit (QR scanning)
implementation(libs.camera.core)
implementation(libs.camera.camera2)
implementation(libs.camera.lifecycle)
implementation(libs.camera.view)
implementation(libs.mlkit.barcode)
// 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)
androidTestImplementation(libs.espresso.core)
}