Skip to content

Commit e301099

Browse files
authored
Merge pull request #304 from Team-Clody/feat/#303-test-app
[Feat/#303] 디버그앱 분리를 진행합니다.
2 parents e665301 + 84e1ad0 commit e301099

26 files changed

+116
-5
lines changed

.github/workflows/android_ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ jobs:
6363
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }} # base64로 암호화된 json 사용
6464
run: echo $FIREBASE_SECRET | base64 --decode > app/google-services.json
6565

66+
# Firebase dubug google-services.json 복호화 및 설정
67+
- name: Decode debug google-services.json
68+
env:
69+
FIREBASE_DEBUG_SECRET: ${{ secrets.FIREBASE_DEBUG_SECRET }}
70+
run: |
71+
mkdir -p app/src/debug
72+
echo "$FIREBASE_DEBUG_SECRET" | base64 --decode > app/src/debug/google-services.json
73+
6674
# keystore 복호화
6775
- name: Decode keystore file
6876
env:

app/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ android {
5454

5555
buildTypes {
5656
debug {
57+
applicationIdSuffix = ".dev"
58+
5759
isMinifyEnabled = false
5860
buildConfigField("String", "CLODY_BASE_URL", properties["clody.test.url"].toString())
61+
62+
manifestPlaceholders["appLabel"] = "@string/app_name_dev"
63+
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher_dev"
5964
}
6065

6166
release {
@@ -67,6 +72,9 @@ android {
6772
"proguard-rules.pro",
6873
)
6974
signingConfig = signingConfigs.getByName("release")
75+
76+
manifestPlaceholders["appLabel"] = "@string/app_name"
77+
manifestPlaceholders["appIcon"] = "@mipmap/ic_launcher"
7078
}
7179
}
7280
compileOptions {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name_dev">돈키</string>
4+
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name_dev">Donkey</string>
4+
</resources>

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
android:dataExtractionRules="@xml/data_extraction_rules"
1414
android:fullBackupContent="@xml/backup_rules"
1515
android:hardwareAccelerated="true"
16-
android:icon="@mipmap/ic_launcher"
17-
android:label="@string/app_name"
16+
android:icon="${appIcon}"
17+
android:label="${appLabel}"
1818
android:roundIcon="@mipmap/ic_launcher_round"
1919
android:supportsRtl="true"
2020
android:theme="@style/Theme.CLODY"
2121
android:usesCleartextTraffic="true"
22+
tools:replace="icon, label"
2223
tools:targetApi="31">
2324

2425
<meta-data
@@ -37,7 +38,6 @@
3738
<activity
3839
android:name=".presentation.ui.main.MainActivity"
3940
android:exported="true"
40-
android:label="@string/app_name"
4141
android:theme="@style/Theme.CLODY"
4242
android:windowSoftInputMode="adjustResize">
4343
<intent-filter>
18.7 KB
Loading

app/src/main/java/com/sopt/clody/ClodyApplication.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ class ClodyApplication : Application() {
1616
initKakaoSdk()
1717
FirebaseApp.initializeApp(this)
1818
Mavericks.initialize(this)
19-
initAmplitude(applicationContext)
19+
20+
if (!BuildConfig.DEBUG) {
21+
initAmplitude(applicationContext)
22+
}
2023
}
2124

2225
private fun initKakaoSdk() {

app/src/main/java/com/sopt/clody/presentation/ui/splash/SplashViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SplashViewModel @AssistedInject constructor(
5757
if (intent.startIntent.hasExtra("google.message_id")) {
5858
AmplitudeUtils.trackEvent(AmplitudeConstraints.ALARM)
5959
}
60-
if (checkInspectionAndHandle()) return
60+
if (!BuildConfig.DEBUG && checkInspectionAndHandle()) return
6161
checkVersionAndNavigate()
6262
attemptAutoLogin()
6363
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
android:height="108dp"
4+
android:width="108dp"
5+
android:viewportHeight="108"
6+
android:viewportWidth="108"
7+
xmlns:android="http://schemas.android.com/apk/res/android">
8+
<path android:fillColor="#3DDC84"
9+
android:pathData="M0,0h108v108h-108z"/>
10+
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
11+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
12+
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
13+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
14+
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
15+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
16+
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
17+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
18+
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
19+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
20+
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
21+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
22+
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
23+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
24+
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
25+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
26+
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
27+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
28+
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
29+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
30+
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
31+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
32+
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
33+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
34+
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
35+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
36+
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
37+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
38+
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
39+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
40+
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
41+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
42+
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
43+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
44+
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
45+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
46+
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
47+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
48+
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
49+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
50+
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
51+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
52+
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
53+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
54+
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
55+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
56+
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
57+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
58+
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
59+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
60+
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
61+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
62+
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
63+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
64+
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
65+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
66+
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
67+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
68+
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
69+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
70+
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
71+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
72+
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
73+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
74+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_dev_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_dev_foreground"/>
5+
</adaptive-icon>

0 commit comments

Comments
 (0)