Skip to content

Commit

Permalink
merge: crashlytics 환경 구축
Browse files Browse the repository at this point in the history
* feat: backend-main으로 보내는 PR이 있을 때 새로 빌드를 실행하는 스크립트 추가

* feat: 빌드 하기전 backend-main으로 체크아웃하는 기능 추가

* feat: 깃허브 백엔드 자동 테스트 스크립트 작성

* fix: 인식 안되는 특수문자 제거

* fix: github workflow jdk의 distribution 추가

* chore: fragment-ktx 의존성 추가

* chore: retrofit, okhttp, kotlin-serialization 의존성 추가

* feat: Firebase Crashlytics 환경 설정

Related to : #175

* refactor: 불필요한 import 제거

Related to : #175

---------

Co-authored-by: hong-sile <gurwns9325@naver.com>
  • Loading branch information
tmdgh1592 and hong-sile authored Aug 1, 2023
1 parent 2c28634 commit c2b4c00
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
30 changes: 30 additions & 0 deletions android/2023-emmsale/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension

plugins {
id("org.jetbrains.kotlin.android")
id("com.android.application") version "8.0.2"
id("com.google.gms.google-services")
kotlin("plugin.serialization") version "1.8.21"
id("kotlin-kapt")
id("com.google.firebase.crashlytics")
}

android {
Expand All @@ -31,12 +33,24 @@ android {
buildConfig = true
}
buildTypes {
getByName("debug") {
isMinifyEnabled = true
configure<CrashlyticsExtension> {
mappingFileUploadEnabled = false
}
}

getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
configure<CrashlyticsExtension> {
nativeSymbolUploadEnabled = true
strippedNativeLibsDir = "$buildDir/ndklibs/obj"
unstrippedNativeLibsDir = "$buildDir/ndklibs/libs"
}
}
}
compileOptions {
Expand All @@ -49,6 +63,21 @@ android {
dataBinding {
enable = true
}
flavorDimensions += "environment"
productFlavors {
create("staging") {
dimension = "environment"
configure<CrashlyticsExtension> {
mappingFileUploadEnabled = false
}
}
create("prod") {
dimension = "environment"
configure<CrashlyticsExtension> {
mappingFileUploadEnabled = true
}
}
}
}

fun getApiKey(propertyKey: String): String {
Expand Down Expand Up @@ -78,6 +107,7 @@ dependencies {
implementation(platform("com.google.firebase:firebase-bom:32.2.0"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-messaging-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")

implementation("com.github.bumptech.glide:glide:4.15.1")
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class ActivityTag : AppCompatCheckBox {
}

fun Fragment.activityChipOf(
block: ActivityTag.() -> Unit
block: ActivityTag.() -> Unit,
): ActivityTag = requireContext().activityChipOf(block)

fun Context.activityChipOf(
block: ActivityTag.() -> Unit
block: ActivityTag.() -> Unit,
): ActivityTag = ActivityTag(this).apply(block)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import android.view.Gravity
import androidx.appcompat.widget.AppCompatCheckBox
import androidx.core.content.ContextCompat
import androidx.core.view.updatePadding
import androidx.fragment.app.Fragment
import com.emmsale.R
import com.emmsale.presentation.utils.extension.px

Expand All @@ -31,5 +30,5 @@ class EventTag : AppCompatCheckBox {
}

fun Context.eventChipOf(
block: EventTag.() -> Unit
block: EventTag.() -> Unit,
): EventTag = EventTag(this).apply(block)
1 change: 1 addition & 0 deletions android/2023-emmsale/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("com.android.application") version "8.0.2" apply false
id("com.android.library") version agpVersion apply false
id("com.google.gms.google-services") version "4.3.15" apply false
id("com.google.firebase.crashlytics") version "2.9.7" apply false

val kotlinVersion = "1.8.20"
kotlin("android") version kotlinVersion apply false
Expand Down

0 comments on commit c2b4c00

Please sign in to comment.