Skip to content

Commit 6710078

Browse files
committed
Merge branch 'develop' of https://github.com/OurMenu/OurMenu-Android-V2 into api/home
2 parents 170d762 + de472cb commit 6710078

6 files changed

Lines changed: 146 additions & 1 deletion

File tree

.github/workflows/android-ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Android CI
2+
3+
on:
4+
push: # 코드 푸시 이벤트에 대한 설정
5+
branches: [ "develop" ] # "develop" 브랜치에 푸시될 때만 트리거된다.
6+
pull_request: # 풀 리퀘스트 이벤트에 대한 설정
7+
branches: [ "develop" ] # "develop" 브랜치로의 풀 리퀘스트가 생성될 때만 트리거된다.
8+
9+
jobs: # CI에서 수행할 작업을 정의한다.
10+
ci-build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '17'
20+
distribution: 'temurin'
21+
cache: gradle
22+
23+
- name: Cache Gradle packages
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.gradle/caches
28+
~/.gradle/wrapper
29+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
30+
restore-keys: |
31+
${{ runner.os }}-gradle-
32+
33+
- name: Generate local.properties
34+
run: |
35+
echo '${{ secrets.LOCAL_PROPERTIES }}' >> ./local.properties
36+
37+
- name: Generate google-services.json
38+
run: |
39+
echo '${{ secrets.GOOGLE_SERVICES }}' >> ./app/google-services.json
40+
41+
# - name: Code style checks
42+
# run: |
43+
# ./gradlew detekt
44+
45+
- name: Run build
46+
run: ./gradlew assembleDebug --stacktrace
47+
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build & upload to Firebase App Distribution
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
cd-build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: set up JDK 17
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '17'
19+
distribution: 'temurin'
20+
21+
- name: Cache Gradle packages
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
~/.gradle/caches
26+
~/.gradle/wrapper
27+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
30+
31+
- name: Grant execute permission for gradlew
32+
run: chmod +x gradlew
33+
34+
- name: Prepare keystore dir
35+
run: mkdir -p keystore
36+
37+
- name: Decode And Save Keystore Base64
38+
run: |
39+
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > keystore/keystore.jks
40+
41+
- name: Decode And Save Debug Keystore Base64
42+
run: |
43+
echo "${{ secrets.DEBUG_KEYSTORE_BASE64 }}" | base64 -d > debug.keystore
44+
45+
- name: Generate local.properties
46+
run: |
47+
echo '${{ secrets.LOCAL_PROPERTIES }}' >> ./local.properties
48+
49+
- name: Generate google-services.json
50+
run: |
51+
echo '${{ secrets.GOOGLE_SERVICES }}' >> ./app/google-services.json
52+
53+
- name: Build debug APK
54+
run: ./gradlew assembleDebug
55+
56+
- name: Upload artifact to Firebase App Distribution
57+
uses: wzieba/Firebase-Distribution-Github-Action@v1
58+
with:
59+
appId: ${{ secrets.FIREBASE_APP_ID }}
60+
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
61+
groups: testers
62+
file: app/build/outputs/apk/debug/app-debug.apk
63+
# releaseNotes: ${{ steps.firebase_release_note.outputs.notes }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,5 @@ fabric.properties
169169
### AndroidStudio Patch ###
170170

171171
!/gradle/wrapper/gradle-wrapper.jar
172+
/app/debug/output-metadata.json
173+
/app/build/outputs/**/output-metadata.json

app/build.gradle.kts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55
alias(libs.plugins.kotlin.android)
66
alias(libs.plugins.kotlin.compose)
77
alias(libs.plugins.kotlin.serialization)
8+
alias(libs.plugins.firebase.crashlytics)
89
id("com.google.dagger.hilt.android") // Hilt 플러그인 추가
910
kotlin("kapt") // Hilt를 위한 kapt 추가
1011
}
@@ -32,6 +33,24 @@ android {
3233

3334
}
3435

36+
signingConfigs {
37+
val debugKeystore = rootProject.file("debug.keystore")
38+
if (debugKeystore.exists()) {
39+
getByName("debug") {
40+
storeFile = debugKeystore
41+
storePassword = "android"
42+
keyAlias = "androiddebugkey"
43+
keyPassword = "android"
44+
}
45+
}
46+
getByName("debug") {
47+
storeFile = file("$rootDir/debug.keystore")
48+
storePassword = "android"
49+
keyAlias = "androiddebugkey"
50+
keyPassword = "android"
51+
}
52+
}
53+
3554
buildTypes {
3655
release {
3756
isMinifyEnabled = false
@@ -98,12 +117,17 @@ dependencies {
98117
// Kakao SDK
99118
implementation("com.kakao.sdk:v2-all:2.20.6")
100119
implementation("com.kakao.sdk:v2-user:2.20.6") // 카카오 로그인 API 모듈
101-
implementation ("com.kakao.maps.open:android:2.12.8") // 카카오 맵 API
120+
implementation("com.kakao.maps.open:android:2.12.8") // 카카오 맵 API
102121

103122
// coil
104123
implementation(libs.coil.compose)
105124
implementation(libs.coil.network.okhttp)
106125
implementation(libs.coil.svg)
126+
127+
// Firebase
128+
implementation(platform(libs.firebase.bom))
129+
implementation(libs.firebase.crashlytics.ndk)
130+
implementation(libs.firebase.analytics)
107131
}
108132

109133
// Hilt를 사용할 때 필요한 Annotation Processor

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ plugins {
44
alias(libs.plugins.kotlin.android) apply false
55
alias(libs.plugins.kotlin.compose) apply false
66
alias(libs.plugins.dagger.hilt) apply false
7+
alias(libs.plugins.firebase.crashlytics) apply false
78
}

gradle/libs.versions.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
agp = "8.7.3"
33
coilCompose = "3.1.0"
44
converterGson = "2.11.0"
5+
firebaseBom = "34.1.0"
56
hiltAndroid = "2.52"
67
hiltNavigationCompose = "1.2.0"
78
kotlin = "2.0.0"
@@ -23,6 +24,8 @@ okhttp = "4.11.0"
2324
retrofitKotlinSerializationConverter = "1.0.0"
2425
datastorePreferences = "1.1.3"
2526
playServicesLocation = "21.3.0"
27+
firebaseCrashlytics = "3.0.6"
28+
googleServices = "4.4.3"
2629

2730
[libraries]
2831
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -31,6 +34,9 @@ coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coilCo
3134
coil-svg = { module = "io.coil-kt.coil3:coil-svg", version.ref = "coilCompose" }
3235
coil-network-okhttp = { module = "io.coil-kt.coil3:coil-network-okhttp", version.ref = "coilCompose" }
3336
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
37+
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
38+
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
39+
firebase-crashlytics-ndk = { module = "com.google.firebase:firebase-crashlytics-ndk" }
3440
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
3541
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hiltAndroid" }
3642
junit = { group = "junit", name = "junit", version.ref = "junit" }
@@ -66,3 +72,5 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
6672
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
6773
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
6874
dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "hiltAndroid" }
75+
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }
76+
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }

0 commit comments

Comments
 (0)