Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ android {
buildConfigField("String", "KAKAO_NATIVE_APP_KEY", "\"$kakaoKey\"")
manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = kakaoKey

isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")

var shrinkResources = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var 필요 없지 않나요??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var shrinkResources요? 없으면 에러나던디

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

허허 그렇네요 왜징

Copy link
Member

@kangyuri1114 kangyuri1114 Jun 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var shrinkResources = false
이렇게 하면 그냥 안쓰는 변수를 코틀린으로 선언한거고
image

사진처럼 해야 하는 것 같아요
https://developer.android.com/build/migrate-to-kotlin-dsl

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다!

var minifyEnabled = false
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
buildConfigField("Boolean", "ENABLE_CRASHLYTICS", "true")
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The flag name ENABLE_CRASHLYTICS is used for both Crashlytics and Analytics. For clarity, consider defining separate flags (e.g., ENABLE_ANALYTICS) or renaming to something more general like ENABLE_FIREBASE_COLLECTION.

Suggested change
buildConfigField("Boolean", "ENABLE_CRASHLYTICS", "true")
buildConfigField("Boolean", "ENABLE_CRASHLYTICS", "true")
buildConfigField("Boolean", "ENABLE_ANALYTICS", "true")

Copilot uses AI. Check for mistakes.
}

debug {
Expand All @@ -67,6 +69,9 @@ android {
val kakaoKey: String = p.getProperty("KAKAO_NATIVE_APP_KEY")
buildConfigField("String", "KAKAO_NATIVE_APP_KEY", "\"$kakaoKey\"")
manifestPlaceholders["KAKAO_NATIVE_APP_KEY"] = kakaoKey

isMinifyEnabled = false
buildConfigField("Boolean", "ENABLE_CRASHLYTICS", "false")
}
}

Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/com/eatssu/android/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import com.eatssu.android.domain.model.TokenState
import com.eatssu.android.domain.model.TokenStateManager
import com.eatssu.android.presentation.base.TokenEventBus
import com.google.firebase.FirebaseApp
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.ktx.Firebase
import com.kakao.sdk.common.KakaoSdk
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -35,6 +38,11 @@ class App: Application() {

if (BuildConfig.DEBUG) {
Timber.plant(Timber.DebugTree())
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
Firebase.analytics.setAnalyticsCollectionEnabled(false)
} else {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)
Firebase.analytics.setAnalyticsCollectionEnabled(true)
}

collectTokenState()
Expand Down