Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ render.experimental.xml
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json
google-services.json

# Freeline
freeline.zip
Expand Down Expand Up @@ -82,3 +82,6 @@ lint/tmp/

# macOS
.DS_Store

# Cursor IDE
.cursorrules
6 changes: 6 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
alias(libs.plugins.twix.android.application)
alias(libs.plugins.twix.koin)
alias(libs.plugins.google.firebase.crashlytics)
alias(libs.plugins.google.services)
}

android {
Expand Down Expand Up @@ -32,4 +34,8 @@ dependencies {
implementation(projects.data)
implementation(projects.domain)
implementation(projects.feature.login)

// Firebase
implementation(platform(libs.google.firebase.bom))
implementation(libs.google.firebase.crashlytics)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class FeatureConventionPlugin : BuildLogicConventionPlugin({
apply<AndroidComposeConventionPlugin>()

dependencies {
implementation(project(":core:analytics"))
implementation(project(":core:design-system"))
implementation(project(":core:navigation"))
implementation(project(":core:ui"))
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ plugins {
alias(libs.plugins.serialization) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.google.firebase.crashlytics) apply false
}

allprojects {
Expand Down
13 changes: 13 additions & 0 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
plugins {
alias(libs.plugins.twix.android.library)
alias(libs.plugins.twix.koin)
}

android {
namespace = "com.twix.analytics"
}

dependencies {
implementation(platform(libs.google.firebase.bom))
api(libs.google.firebase.analytics)
Copy link
Member

Choose a reason for hiding this comment

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

혹시 이 부분만 따로 api로 뺀 이유가 있을까요?? api로 노출시키면 :feature에서 sdk에 접근이 가능해지는데 특별한 이유가 있는 건지 궁금합니다

모듈을 나눈 만큼, 관련된 책임은 이 모듈에서 담당하고 외부 모듈에서 sdk에 직접 접근하는 건 막는 게 좋을 거 같아요. :core:analytics에 로깅 클래스를 구현하고 외부에는 인터페이스를 통해 접근하는 것으로 구현하면 어떨까요? 그럼 api는 사실상 불필요해지고 implementation으로 바꿔도 될 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

헉 맞아 feature 모듈에서 애널리틱스 의존성이 필요할거라고 예상했었는데
생각해보니 현수말대로 인터페이스로 접근하면 해당 모듈 내부에선 어떤 라이브러리를 쓰는지 몰라도 되겠넹 !

리뷰 반영 커밋 : 738b438

}
4 changes: 4 additions & 0 deletions core/analytics/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Empty file.
9 changes: 9 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ androidx-lifecycle-runtime-ktx = "2.10.0"

# Google
material = "1.13.0"
google-services = "4.4.4"
google-firebase-bom = "34.7.0"
google-firebase-crashlytics = "3.0.6"

# Compose
activity-compose = "1.12.0"
Expand Down Expand Up @@ -64,6 +67,10 @@ android-junit5-gradle-plugin = { group = "de.mannodermaus.gradle.plugins", name

# Google
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
google-firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "google-firebase-bom" }
google-firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
google-firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
google-firebase-messaging = { module = "com.google.firebase:firebase-messaging" }

# Kotlin
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
Expand Down Expand Up @@ -168,6 +175,8 @@ ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "jetbrains-kotlin-jvm" }
android-library = { id = "com.android.library", version.ref = "agp" }
google-services = { id = "com.google.gms.google-services", version.ref = "google-services" }
google-firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "google-firebase-crashlytics" }

# Convention Plugins
twix-android-application = { id = "twix.android.application", version = "unspecified" }
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ include(":core:ui")
include(":core:navigation")
include(":core:design-system")
include(":core:network")
include(":core:analytics")