25317282d7
사용자 결정(2026-10-13). 임상 폰 두 대 모두 사용자 앱이 같이 깔려 있고 거기서 양산 펌웨어 VB0FW0100 으로 올리므로, 임상앱이 번들 zip 과 버전 판정을 따로 들고 있을 이유가 없다. 실제로 임상 번들은 1.0.0+5 로 VBTFW0207 보다 낡아 "재설치"가 다운그레이드였고, 최소빌드 118 규칙은 0100 부터 다시 세는 양산 펌웨어에 "구버전" 거짓 경고를 낼 참이었다. 뺀 것 - firmware/ 패키지 전부(DfuManager·DfuNus·DfuNusConnection·DfuBleScanner·FirmwarePackage· FirmwareUpdateView)와 assets/dfu_application_1.0.0+5.zip, mcumgr-ble 의존성. - AppScreen.FIRMWARE_UPDATE 라우트·뒤로가기 매핑, 홈 화면 "펌웨어 업데이트" 버튼(여백만 남김). - BleManager 의 MIN_FIRMWARE_BUILD · parseFirmwareBuild · parseFwSemver · isFirmwareOutdated · isFirmwareUpdateAvailable · currentBluetoothDevice(DFU 전용이었다). - 배너의 주황(구버전)·파랑(새 펌웨어) 분기와 그 문자열. 빨강 "기기 응답 없음"은 생존 신호라 남긴다. 남긴 것 - 펌웨어 버전 표시(설정)와 세션 JSON·CSV 의 firmware_version 기록 — 어떤 펌웨어로 잰 세션인지는 계속 추적된다. - ClinicalEvent.FIRMWARE_OUTDATED 카테고리는 스키마 호환을 위해 두되, 올리는 곳은 없다. 검증: assembleDemoDebug · testDemoDebugUnitTest 통과. 수신 CRC 가드(사용자 앱 a0a61773)는 별건으로 남아 있다. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
124 lines
5.3 KiB
Kotlin
124 lines
5.3 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 {
|
|
// 이 브랜치(demo-final)는 **동결 시연판**이다. 다른 저장소
|
|
// (vesiscan_pre_product/vesiscan_android_user)가 만드는 두 앱과 한 폰에
|
|
// 같이 깔려야 하므로 applicationId 부터 겹치지 않게 못 박는다:
|
|
// vesiscan-demo com.medithings.vesiscan.demo ← 여기
|
|
// vesiscan-user com.medithings.vesiscan
|
|
// vesiscan-caregiver com.medithings.vesiscan.caregiver
|
|
//
|
|
// 2026-09-02 이전에는 base 가 `com.medithings.vesiscan` 이고 demo 플레이버가
|
|
// `.demo` 를 붙이는 구조였다. demo 빌드의 id 는 지금과 같지만, **dev 플레이버가
|
|
// 접미 없이 `com.medithings.vesiscan`** 이라 새 저장소의 환자 앱을 그대로
|
|
// 덮어썼다. 여기서 base 를 옮겨 그 구멍을 막는다.
|
|
applicationId = "com.medithings.vesiscan.demo"
|
|
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"
|
|
// 접미 없음 — base 가 이미 `.demo` 다(위 defaultConfig 주석 참고).
|
|
// 이 플레이버가 만드는 것이 곧 vesiscan-demo 이고, 이 브랜치에서 빌드할
|
|
// 것은 이것뿐이다.
|
|
versionNameSuffix = "-demo"
|
|
buildConfigField("Boolean", "IS_DEMO", "true")
|
|
buildConfigField("String", "FLAVOR_LABEL", "\"demo\"")
|
|
// 시연/안정 검증용 — 방광 모형 테스트가 100% 통과하는 시점을 git tag로 동결.
|
|
// src/demo/* 하위에 동결 시점의 알고리즘/파라미터를 격리해 두면 main 변경에 영향받지 않음.
|
|
}
|
|
create("dev") {
|
|
dimension = "channel"
|
|
// 동결 브랜치에 개발 채널이 남아 있을 이유는 없지만, 실수로 빌드해도
|
|
// 다른 앱을 덮어쓰지 않도록 id 를 갈라 둔다.
|
|
applicationIdSuffix = ".dev"
|
|
versionNameSuffix = "-dev"
|
|
buildConfigField("Boolean", "IS_DEMO", "false")
|
|
buildConfigField("String", "FLAVOR_LABEL", "\"dev\"")
|
|
// 개발 진행 — 모든 신규 기능/실험/리팩토링은 dev에서만.
|
|
}
|
|
}
|
|
testOptions {
|
|
unitTests {
|
|
// android.util.Log 등 Android 스텁을 예외 대신 기본값으로 돌려준다.
|
|
// 알고리즘 대조 시험은 순수 계산인데 로그 한 줄 때문에 죽는 것을 막는다.
|
|
isReturnDefaultValues = true
|
|
}
|
|
}
|
|
|
|
|
|
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
|
|
|
|
testImplementation(libs.junit)
|
|
// org.json 은 안드로이드 단위테스트에서 **모든 메서드가 스텁**이라 호출하면 예외가
|
|
// 난다(isReturnDefaultValues 로도 안 된다 — 반환값이 아니라 동작이 없다).
|
|
// 매니페스트 판정처럼 JSON 을 실제로 파싱하는 로직을 시험하려면 진짜 구현이 필요하다.
|
|
testImplementation("org.json:json:20240303")
|
|
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)
|
|
} |