From 5f40896bee0dec1723225c5d3518f7b860b18c76 Mon Sep 17 00:00:00 2001 From: jjangddu Date: Wed, 2 Sep 2026 10:31:01 +0900 Subject: [PATCH] =?UTF-8?q?build:=20=EC=95=B1=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=EC=9D=84=20vesiscan-demo=20=EB=A1=9C=20=C2=B7=20applicationId?= =?UTF-8?q?=20=EC=B6=A9=EB=8F=8C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이 브랜치는 동결 시연판이다. 이제 앱이 셋으로 늘어 한 폰에 같이 깔리므로, 이름과 applicationId 를 1:1 로 못 박아 무엇이 무엇인지 헷갈리지 않게 한다. vesiscan-demo com.medithings.vesiscan.demo ← 이 브랜치 vesiscan-user com.medithings.vesiscan ← vesiscan_pre_product vesiscan-caregiver com.medithings.vesiscan.caregiver ← vesiscan_pre_product ## 이름 "VesiScan-Basic Demo"(demo) · "VesiScan Dev"(dev) 를 각각 vesiscan-demo · vesiscan-demo-dev 로. 예전 이름은 **무슨 앱인지가 아니라 어떤 빌드인지**만 알려 줘서, 폰에 여러 개가 깔리면 구별할 수 없었다. ## applicationId — 이게 진짜 문제였다 base 가 `com.medithings.vesiscan` 이고 demo 플레이버가 `.demo` 를 붙이는 구조라, **dev 플레이버는 접미가 없어 `com.medithings.vesiscan`** 이었다. 그 id 는 새 저장소의 환자 앱과 정확히 같다 — 이 브랜치에서 devDebug 를 한 번 빌드해 깔면 환자 앱이 말없이 덮어써진다. 이름을 아무리 잘 붙여도 막을 수 없는 종류의 사고다. base 를 `com.medithings.vesiscan.demo` 로 옮기고(=demo 빌드의 id 는 그대로), demo 는 접미 없음, dev 는 `.dev` 를 붙인다. 이제 어떤 플레이버를 빌드해도 다른 앱을 건드리지 않는다. 검증: aapt2 dump badging — package `com.medithings.vesiscan.demo` · label `vesiscan-demo` · versionName `2.0.0-demo`. assembleDemoDebug PASS. Co-Authored-By: Claude Opus 5 --- app/build.gradle.kts | 21 +++++++++++++++++++-- app/src/demo/res/values-ko/strings.xml | 14 ++++++++++++-- app/src/demo/res/values/strings.xml | 15 ++++++++++----- app/src/dev/res/values/strings.xml | 14 +++++++++++++- app/src/main/res/values-ko/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 6 files changed, 56 insertions(+), 12 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8b4cc7d..528a773 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -11,7 +11,18 @@ android { } defaultConfig { - applicationId = "com.medithings.vesiscan" + // 이 브랜치(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 @@ -36,7 +47,9 @@ android { productFlavors { create("demo") { dimension = "channel" - applicationIdSuffix = ".demo" + // 접미 없음 — base 가 이미 `.demo` 다(위 defaultConfig 주석 참고). + // 이 플레이버가 만드는 것이 곧 vesiscan-demo 이고, 이 브랜치에서 빌드할 + // 것은 이것뿐이다. versionNameSuffix = "-demo" buildConfigField("Boolean", "IS_DEMO", "true") buildConfigField("String", "FLAVOR_LABEL", "\"demo\"") @@ -45,6 +58,10 @@ android { } create("dev") { dimension = "channel" + // 동결 브랜치에 개발 채널이 남아 있을 이유는 없지만, 실수로 빌드해도 + // 다른 앱을 덮어쓰지 않도록 id 를 갈라 둔다. + applicationIdSuffix = ".dev" + versionNameSuffix = "-dev" buildConfigField("Boolean", "IS_DEMO", "false") buildConfigField("String", "FLAVOR_LABEL", "\"dev\"") // 개발 진행 — 모든 신규 기능/실험/리팩토링은 dev에서만. diff --git a/app/src/demo/res/values-ko/strings.xml b/app/src/demo/res/values-ko/strings.xml index d4954ec..b22f38b 100644 --- a/app/src/demo/res/values-ko/strings.xml +++ b/app/src/demo/res/values-ko/strings.xml @@ -1,5 +1,15 @@ - + - VesiScan-Basic Demo + vesiscan-demo diff --git a/app/src/demo/res/values/strings.xml b/app/src/demo/res/values/strings.xml index 7277c5c..b22f38b 100644 --- a/app/src/demo/res/values/strings.xml +++ b/app/src/demo/res/values/strings.xml @@ -1,10 +1,15 @@ - VesiScan-Basic Demo + vesiscan-demo diff --git a/app/src/dev/res/values/strings.xml b/app/src/dev/res/values/strings.xml index 3c2c7d5..da02beb 100644 --- a/app/src/dev/res/values/strings.xml +++ b/app/src/dev/res/values/strings.xml @@ -1,3 +1,15 @@ + + - VesiScan Dev + vesiscan-demo-dev diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 1b3cc01..567b73c 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -1,5 +1,5 @@ - VesiScan-Basic + vesiscan-demo 확인 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 017a4a0..3a1e3ef 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - VesiScan-Basic + vesiscan-demo OK