2801d2ae53
방광 모형 테스트가 100% 통과하는 시점을 demo flavor로 동결하고, 모든
신규 작업은 dev에서만 진행하기 위한 빌드 분기 셋업.
gradle (app/build.gradle.kts):
- flavorDimensions: "channel"
- demo: applicationIdSuffix=".demo", versionNameSuffix="-demo",
BuildConfig.IS_DEMO=true, FLAVOR_LABEL="demo"
- dev: BuildConfig.IS_DEMO=false, FLAVOR_LABEL="dev"
- 두 flavor 동시 설치 가능 (applicationId 분리)
source set:
- src/demo/res/values/strings.xml — app_name "VesiScan Demo"
- src/dev/res/values/strings.xml — app_name "VesiScan Dev"
- src/demo/java/.gitkeep + src/dev/java/.gitkeep — 격리본 둘 위치 안내
운영 가이드: docs/FLAVOR_DEMO_STABLE.md
- Level 1 (BuildConfig 분기) vs Level 2 (source set 격리) 두 동결 방식
- 새 안정판 동결 시 git tag + src/demo/ 복사 절차
- 어떤 코드를 동결 후보로 둘지 (알고리즘/파라미터 권장, BLE/UI는 공유)
- 트러블슈팅 + 첫 동결 시점 권장 절차
.gitignore: /docs/ 제거 — 팀/iOS 개발자가 접근 가능하도록
- docs/BLE_PROTOCOL_REFERENCE.md
- docs/iOS_PORTING_CLINICAL_MEASUREMENT.md
- docs/FLAVOR_DEMO_STABLE.md 모두 신규 commit
검증:
./gradlew assembleDemoDebug + assembleDevDebug 둘 다 BUILD SUCCESSFUL
→ app/build/outputs/apk/demo/debug/app-demo-debug.apk
→ app/build/outputs/apk/dev/debug/app-dev-debug.apk
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99 lines
3.7 KiB
Kotlin
99 lines
3.7 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.medilightv2android"
|
|
compileSdk {
|
|
version = release(36)
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.medilightv2android"
|
|
minSdk = 24
|
|
targetSdk = 36
|
|
versionCode = 25
|
|
versionName = "1.1.0-design"
|
|
|
|
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.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)
|
|
|
|
// 소변컵 측정 모듈
|
|
implementation("com.microsoft.onnxruntime:onnxruntime-android:1.17.0") // YOLO
|
|
implementation("com.google.mlkit:text-recognition:16.0.1") // OCR
|
|
implementation("androidx.camera:camera-core:1.3.4") // CameraX
|
|
implementation("androidx.camera:camera-camera2:1.3.4")
|
|
implementation("androidx.camera:camera-lifecycle:1.3.4")
|
|
implementation("androidx.camera:camera-view:1.3.4")
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0") // HF API
|
|
|
|
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)
|
|
} |