Skip to content

Conversation

@chanho0908
Copy link
Member

@chanho0908 chanho0908 commented Dec 29, 2025

이슈 번호

#15

리뷰/머지 희망 기한 (선택)

2025.12.31

작업내용

  • 크래시틱스/애널리틱스/FCM Gradle 의존성만 간단하게 추가했슴니다 :)

결과물

리뷰어에게 추가로 요구하는 사항 (선택)

  • 애널리틱스 설정을 core:util에 넣을까 고민하다 애널리틱스 설정 및 로깅 관련 코드는 모듈로 분리해서 관리하면
    깔끔할 것 같아서 모듈로 분리했는데 어떻게 생각해 ?

chanho0908 and others added 6 commits December 29, 2025 00:21
Firebase 프로젝트를 연동하고 Crashlytics, Analytics, Cloud Messaging 서비스를 설정합니다. google-services.json 파일은 .gitignore에 추가하여 버전 관리에서 제외합니다.

🤖 Generated with [Firebender](https://firebender.com)

Co-Authored-By: Firebender <help@firebender.com>
Firebase Analytics를 위한 core:analytics 모듈을 생성하고, 모든 Feature 모듈에서 자동으로 사용할 수 있도록 FeatureConventionPlugin에 통합했습니다.

🤖 Generated with [Firebender](https://firebender.com)

Co-Authored-By: Firebender <help@firebender.com>
Firebase Analytics를 위한 core:analytics 모듈을 생성하고, 모든 Feature 모듈에서 자동으로 사용할 수 있도록 FeatureConventionPlugin에 통합했습니다.

🤖 Generated with [Firebender](https://firebender.com)

Co-Authored-By: Firebender <help@firebender.com>
개발 환경별 설정 파일인 .cursorrules를 .gitignore에 추가하여 버전 관리에서 제외합니다.

🤖 Generated with [Firebender](https://firebender.com)

Co-Authored-By: Firebender <help@firebender.com>
@chanho0908 chanho0908 requested a review from dogmania December 29, 2025 04:13
@chanho0908 chanho0908 self-assigned this Dec 29, 2025
@chanho0908 chanho0908 added the Feature Extra attention is needed label Dec 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'work_guidelines', 'reviewer_principles'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

이 풀 리퀘스트는 Firebase 서비스 통합을 구현합니다. 새로운 core:analytics 모듈을 생성하고, Firebase BOM, Crashlytics, Analytics 라이브러리를 추가하며, 관련 Gradle 플러그인(Google Services, Firebase Crashlytics)을 등록합니다. 또한 .gitignore를 업데이트하여 Google Services 설정 파일과 Cursor IDE 규칙 파일을 관리합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25분


교육적 리뷰 & 개선 안내

✨ 잘 구성된 부분

모듈화 설계의 좋은 예시입니다! 분석 기능을 별도 모듈(core:analytics)로 분리한 것이 정말 깔끔합니다. 이렇게 하면 비즈니스 로직에서 분석 로직을 느슨하게 결합할 수 있고, 나중에 다른 분석 도구로 교체하기도 쉬워집니다. 👏

버전 관리 중앙화gradle/libs.versions.toml에 모든 Firebase 버전을 명시한 것이 좋습니다. BOM(Bill of Materials) 패턴을 사용하면 여러 Firebase 라이브러리 간 버전 호환성도 자동으로 관리되니 일석이조네요!

🔍 검토할 부분

1. FeatureConventionPlugin에 analytics 의존성 추가 확인

implementation(project(":core:analytics"))

현재 코드를 보니 모든 feature 모듈이 자동으로 analytics에 의존하도록 설정되었습니다. 이 결정이 의도적인지 확인해주세요:

  • 적합한 경우: 모든 화면에서 사용자 행동을 추적해야 한다면 좋은 선택입니다
  • ⚠️ 검토 필요: 특정 feature 모듈만 analytics가 필요하다면, 개별 모듈의 build.gradle.kts에 명시적으로 추가하는 것이 낫습니다

추천: feature 모듈들이 정말로 모두 analytics가 필요한지 문서화하거나, 주석을 추가하면 좋을 것 같습니다.

2. core/analytics 모듈의 실제 구현 확인

현재 AndroidManifest.xml만 있고, 실제 analytics 래퍼 코드가 없는 것 같습니다:

  • Firebase Analytics SDK를 어떻게 노출할 것인지 (객체, 확장 함수, 인터페이스?)
  • Koin을 통한 의존성 주입 설정이 필요한지 확인해주세요
// 예시: analytics 모듈에서 제공하는 인터페이스
interface AnalyticsTracker {
    fun logEvent(name: String, params: Map<String, Any>?)
}

📚 참고 자료


마지막 팁: 혹시 google-services.json 파일을 실제로 커밋하고 있진 않으신가요? 민감한 정보가 담겨 있으니, .gitignore에 추가한 것은 매우 잘하신 결정입니다! 🔒

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목 'firebase 프로젝트 연동'은 변경사항의 핵심을 정확히 반영합니다. Firebase 통합(Crashlytics, Analytics, FCM)과 관련 의존성 추가, core:analytics 모듈 생성 등 전반적인 작업을 포괄적으로 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat#15/firebase-프로젝트-연동

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.gitignore (1)

55-87: 더 나아가기: Firebase 관련 추가 파일 검토 제안 📋

Firebase를 본격적으로 도입하면서, 향후 추가로 고려할 만한 파일들이 있습니다:

  • google-services-debug.json: 디버그 빌드용 Firebase 설정 (있다면 무시 권장)
  • firebase.json: Firebase 프로젝트 설정 파일 (존재 시 포함 검토)

현재 설정은 완벽하지만, 프로젝트 진행 과정에서 이런 파일들이 생길 수 있으니 필요시 추가하시면 됩니다.

build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt (1)

12-18: 모든 Feature 모듈에 Analytics를 자동 포함하는 설계에 대한 고민이 필요합니다.

현재 FeatureConventionPlugin에 core:analytics를 추가하면, 이 플러그인을 적용하는 모든 Feature 모듈이 자동으로 analytics 의존성을 갖게 됩니다.

장점:

  • 일관된 의존성 관리
  • 보일러플레이트 감소

고려사항:

  • 정말 모든 Feature가 Analytics를 필요로 할까요?
  • 향후 추가될 Feature 중 Analytics가 불필요한 경우도 있을 수 있습니다
  • 예: 순수 UI 컴포넌트 Feature, 인증이 필요 없는 공개 Feature 등

대안:

  1. 현재 방식 유지 (모든 Feature에 포함) - Feature 수가 적고 대부분 Analytics가 필요하다면 합리적
  2. 선택적 적용 - Analytics가 필요한 Feature만 개별적으로 의존성 추가
  3. 별도 Convention Plugin - FeatureWithAnalyticsConventionPlugin 같은 별도 플러그인 생성

현재 feature:login만 있는 상황에서는 큰 문제가 없지만, 프로젝트가 성장하면서 Feature가 늘어날 때를 대비한 설계 방향에 대해 팀 논의가 필요해 보입니다.

core/analytics/build.gradle.kts (1)

10-13: api vs implementation 스코프에 대한 설계 결정이 필요합니다.

현재 Firebase Analytics를 api 스코프로 선언하셨는데, 이는 이 모듈을 의존하는 모든 모듈(모든 Feature 모듈 포함)에서 Firebase Analytics API에 직접 접근 가능하다는 의미입니다.

현재 방식 (api 사용):

// Feature 모듈에서 직접 Firebase API 호출 가능
Firebase.analytics.logEvent("event_name", bundleOf(...))

장점: Feature에서 직접 Firebase API 사용 가능, 간단한 사용법
단점: Firebase 구현이 프로젝트 전체에 노출, 향후 Analytics 라이브러리 교체 시 모든 Feature 수정 필요

대안 (implementation 사용 + Wrapper):

// core:analytics 모듈에서 제공
interface AnalyticsLogger {
    fun logEvent(name: String, params: Map<String, Any>)
}

// Feature에서 추상화된 인터페이스 사용
analyticsLogger.logEvent("button_clicked", mapOf("screen" to "login"))

장점: 구현 세부사항 은닉, 라이브러리 교체 용이, 테스트 가능성 향상
단점: 초기 Wrapper 구현 필요

추천 방향:
PR 목표가 "Analytics 설정 및 로깅 관련 코드를 별도 모듈로 분리"라고 하셨는데, 현재는 모듈만 분리하고 Firebase API가 그대로 노출되어 있습니다.

완전한 모듈화를 위해서는:

  1. implementation으로 변경
  2. Analytics 추상화 인터페이스 제공
  3. Koin을 통한 의존성 주입

이렇게 하면 진정한 의미의 "분리"가 완성됩니다.

다만, 프로젝트 초기 단계이고 빠른 개발이 필요하다면 현재 방식(api)도 실용적인 선택일 수 있습니다. 팀 내에서 논의가 필요해 보입니다!

참고 자료:

📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 362a309 and 19712b2.

📒 Files selected for processing (9)
  • .gitignore
  • app/build.gradle.kts
  • build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt
  • build.gradle.kts
  • core/analytics/build.gradle.kts
  • core/analytics/src/main/AndroidManifest.xml
  • core/analytics/src/main/kotlin/com/twix/analytics/di/.gitKeep
  • gradle/libs.versions.toml
  • settings.gradle.kts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.gradle.kts

⚙️ CodeRabbit configuration file

**/*.gradle.kts: Gradle 빌드 파일 리뷰 가이드라인

  1. Convention Plugin 활용

    • 중복 설정이 Convention Plugin으로 추출되었는가?
    • 모듈별로 적절한 Convention Plugin이 적용되었는가?
  2. 의존성 관리

    • Version Catalog (libs.versions.toml) 사용
    • 불필요한 의존성 제거
    • 의존성 범위가 적절한가? (implementation/api/compileOnly)
  3. 모듈 구조

    • 순환 의존성이 없는가?
    • 의존성 방향이 올바른가? (domain ← data, feature → domain)

Files:

  • settings.gradle.kts
  • build.gradle.kts
  • app/build.gradle.kts
  • core/analytics/build.gradle.kts
build-logic/**

⚙️ CodeRabbit configuration file

build-logic/**: Convention Plugin 리뷰 가이드라인

  1. 플러그인 설계

    • 각 Convention Plugin이 명확한 책임을 가지는가?
    • 중복 설정이 제거되었는가?
    • 버전 카탈로그(libs.versions.toml) 활용이 적절한가?
  2. 빌드 성능

    • 불필요한 의존성이 포함되지 않았는가?
    • Configuration Cache 호환성
    • Build Cache 최적화
  3. 유지보수성

    • 확장 함수가 가독성을 높이는가?
    • DSL이 직관적인가?

Files:

  • build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt
🧬 Code graph analysis (3)
app/build.gradle.kts (1)
build-logic/convention/src/main/kotlin/com/twix/convention/extension/DependencyHandlerScopeExtension.kt (2)
  • implementation (7-9)
  • implementation (11-13)
core/analytics/build.gradle.kts (1)
build-logic/convention/src/main/kotlin/com/twix/convention/KoinConventionPlugin.kt (1)
  • dependencies (6-11)
build-logic/convention/src/main/kotlin/com/twix/convention/FeatureConventionPlugin.kt (1)
build-logic/convention/src/main/kotlin/com/twix/convention/extension/DependencyHandlerScopeExtension.kt (2)
  • implementation (7-9)
  • implementation (11-13)
🔇 Additional comments (10)
.gitignore (2)

56-56: Firebase 보안 설정 완벽하게 활성화됨! 🔐

google-services.json의 주석 처리를 제거하고 실제 무시 규칙으로 전환한 것은 보안상 아주 현명한 결정입니다. 이 파일에는 Firebase API 키, 프로젝트 ID 등 민감한 정보가 포함되어 있으므로 깃에 커밋되면 안 됩니다. 마치 집 열쇠를 공개 저장소에 올리는 것과 같죠.


86-87: IDE 설정 파일 분리, 깔끔합니다! ✨

.cursorrules를 무시 목록에 추가하여 개발자별 IDE 설정을 공유하지 않도록 한 점이 좋습니다. 이렇게 하면 각 팀원이 자신의 개발 환경을 자유롭게 커스터마이징할 수 있고, 불필요한 설정 충돌을 피할 수 있습니다.

settings.gradle.kts (1)

37-37: 새 analytics 모듈 추가 - 깔끔합니다!

멀티 모듈 구조에 analytics 모듈을 추가하는 표준적인 방식입니다. TYPESAFE_PROJECT_ACCESSORS가 활성화되어 있어 projects.core.analytics로 타입 안전하게 참조할 수 있네요. 👍

core/analytics/src/main/AndroidManifest.xml (1)

1-4: 라이브러리 모듈의 표준 매니페스트입니다.

Android 라이브러리 모듈에 필요한 최소한의 매니페스트 구조입니다. 권한이나 컴포넌트 선언이 필요 없는 유틸리티 성격의 모듈에 적합한 형태네요.

app/build.gradle.kts (2)

4-5: Firebase 플러그인 적용이 올바른 위치에 있습니다!

Google Services와 Crashlytics 플러그인을 app 모듈에만 적용한 것은 정확한 접근입니다. 이 플러그인들은 애플리케이션 수준에서만 필요하므로 라이브러리 모듈에는 적용하지 않는 것이 맞습니다.

참고:

  • google-services: google-services.json 처리 및 Firebase 설정
  • firebase-crashlytics: 크래시 리포트 매핑 파일 생성

37-40: Firebase BOM을 활용한 버전 관리 - 모범 사례입니다!

Firebase BOM(Bill of Materials)을 platform으로 선언하여 Firebase 라이브러리들의 버전을 일관되게 관리하는 방식은 Firebase 공식 권장 사항입니다. 이를 통해:

  • 라이브러리 간 호환성 보장
  • 개별 버전 명시 불필요
  • 버전 충돌 방지

Crashlytics 의존성도 implementation 스코프로 적절하게 선언되었습니다.

build.gradle.kts (1)

10-11: 플러그인 등록 방식이 정확합니다!

루트 build.gradle.kts에서 apply false로 플러그인을 등록하는 것은 멀티 모듈 프로젝트의 표준 패턴입니다. 이를 통해:

  • 플러그인 버전을 중앙에서 관리
  • 필요한 모듈에서만 선택적으로 적용 가능
  • Gradle 플러그인 클래스패스 최적화

Version Catalog와 함께 사용하여 더욱 깔끔한 의존성 관리가 되었네요! 👍

core/analytics/build.gradle.kts (1)

1-4: Convention Plugin 활용이 훌륭합니다!

twix.android.librarytwix.koin Convention Plugin을 활용하여 반복적인 설정을 제거한 점이 좋습니다. 이를 통해 모듈 간 일관된 설정을 유지할 수 있네요.

gradle/libs.versions.toml (2)

21-23: Version Catalog를 활용한 중앙 집중식 버전 관리 - 모범 사례입니다!

Firebase 관련 버전들을 Version Catalog에 선언하여:

  • 버전을 한 곳에서 관리
  • 타이핑 실수 방지 (IDE 자동완성)
  • 버전 일관성 보장

특히 google-firebase-bom으로 Firebase 라이브러리 간 호환성을 보장하는 전략이 훌륭합니다.


178-179: 플러그인 버전 선언이 깔끔합니다!

Firebase 플러그인들을 Version Catalog에 등록하여 타입 안전하게 참조할 수 있도록 한 점이 좋습니다.

  • google-services: 4.4.4 (최신 안정 버전)
  • firebase-crashlytics: 3.0.6 (최신 버전)

Version Catalog의 alias를 통해 alias(libs.plugins.google.services) 형태로 가독성 높게 사용할 수 있네요!

Copy link
Member

@dogmania dogmania left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! api 부분만 궁금해서 한번 확인 부탁드려용


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으로 바꿔도 될 것 같습니다!

@dogmania
Copy link
Member

아 그리고 모듈 나누는 건 좋아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants