26dc53b4eb
배경: 소변컵 사진 촬영 → YOLO 검출 → MLKit OCR 눈금 인식 기능 폐기.
현재 미사용. Piezo 방광 측정 flow 만 실사용.
완전 제거 (4 파일 + 1 asset):
· measure/YoloDetector.kt (130 L · ONNX YOLO)
· measure/SimpleMeasureService.kt (287 L · MLKit OCR + 3-zone)
· measure/CCPosition.kt (8 L)
· ui/views/monitoring/UrineCameraScreen.kt (285 L · CameraX 프리뷰)
· assets/urinecup_best.onnx (~10.6 MB · APK 크기 절감)
Gradle deps 삭제 (build.gradle.kts):
· com.microsoft.onnxruntime:onnxruntime-android:1.17.0
· com.google.mlkit:text-recognition:16.0.1
· androidx.camera:camera-{core,camera2,lifecycle,view}:1.3.4
AndroidManifest.xml 삭제:
· CAMERA permission
· android.hardware.camera uses-feature
부분 편집:
· AppState.kt — URINE_CAMERA enum value 삭제
· MainActivity.kt — import + back-handler branch + Crossfade branch 삭제
· PiezoMonitoringView.kt — showUrineCamera state · 카메라 카드 (16L) ·
LaunchedEffect(showUrineCamera) 삭제
· strings.xml × 2 — 카메라 전용 문자열 15개 삭제
(camera_input 은 CatheterizeSheet 사용 중이라 유지)
측정용 VoidingRecord.kt 는 유지 (CatheterizeSheet · VoidingDiaryView 등에서 사용).
okhttp 는 speech/HfVolumeExtractor 에서 사용 중이라 유지.
합계: 약 780 LOC + 10.6 MB APK 크기 절감.
빌드: BUILD SUCCESSFUL 30s (첫 시도 통과).
95 lines
3.4 KiB
Kotlin
95 lines
3.4 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.medithings.vesiscan"
|
|
compileSdk {
|
|
version = release(36)
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.medithings.vesiscan"
|
|
minSdk = 24
|
|
targetSdk = 36
|
|
versionCode = 200
|
|
versionName = "2.0.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
// Product flavors — demo(동결 안정판) / dev(개발 진행).
|
|
// 자세한 운영 정책은 docs/FLAVOR_DEMO_STABLE.md 참고.
|
|
flavorDimensions += "channel"
|
|
productFlavors {
|
|
create("demo") {
|
|
dimension = "channel"
|
|
applicationIdSuffix = ".demo"
|
|
versionNameSuffix = "-demo"
|
|
buildConfigField("Boolean", "IS_DEMO", "true")
|
|
buildConfigField("String", "FLAVOR_LABEL", "\"demo\"")
|
|
// 시연/안정 검증용 — 방광 모형 테스트가 100% 통과하는 시점을 git tag로 동결.
|
|
// src/demo/* 하위에 동결 시점의 알고리즘/파라미터를 격리해 두면 main 변경에 영향받지 않음.
|
|
}
|
|
create("dev") {
|
|
dimension = "channel"
|
|
buildConfigField("Boolean", "IS_DEMO", "false")
|
|
buildConfigField("String", "FLAVOR_LABEL", "\"dev\"")
|
|
// 개발 진행 — 모든 신규 기능/실험/리팩토링은 dev에서만.
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.compose.material3)
|
|
implementation(libs.androidx.compose.material.icons)
|
|
implementation(libs.androidx.compose.foundation)
|
|
implementation(libs.gson)
|
|
implementation(libs.androidx.security.crypto)
|
|
implementation(libs.rive.android)
|
|
implementation(libs.androidx.startup.runtime)
|
|
|
|
// 2026-08-12: YOLO/CameraX/MLKit 제거 (소변컵 사진 인식 기능 폐기).
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0") // HF API
|
|
implementation(libs.mcumgr.ble) // Firmware DFU (SMP-over-BLE)
|
|
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
} |