Skip to content

feat: Firebase Crashlytics, GA 연동#105

Merged
easyhooon merged 3 commits intodevelopfrom
BOOK-202-feature/#89
Aug 5, 2025
Merged

feat: Firebase Crashlytics, GA 연동#105
easyhooon merged 3 commits intodevelopfrom
BOOK-202-feature/#89

Conversation

@easyhooon
Copy link
Copy Markdown
Contributor

@easyhooon easyhooon commented Aug 4, 2025

🔗 관련 이슈

📙 작업 설명

  • Firebase Crashlytics, GA 연동

🧪 테스트 내역 (선택)

  • 주요 기능 정상 동작 확인
  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

💬 추가 설명 or 리뷰 포인트 (선택)

  • google-services.json 은 api key, projectId, clientId 등이 포함되어있는 민감정보라 .gitignore에 추가해두었슴다. 노션에 올려둘게여

Summary by CodeRabbit

  • 신규 기능

    • Firebase Crashlytics가 앱에 통합되어, 앱 충돌 정보를 수집할 수 있습니다.
  • 작업(Chore)

    • 빌드 및 배포 자동화에 Firebase 관련 설정이 추가되었습니다.
    • Gradle 빌드 구성에 Firebase 및 Crashlytics 플러그인 및 라이브러리가 등록되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 4, 2025

Walkthrough

이 변경사항은 Android 프로젝트에 Firebase GA(Analytics)와 Crashlytics 연동을 추가합니다. Gradle 빌드 설정, 버전 카탈로그, Manifest, 초기화 코드, CI 워크플로우 등에서 Firebase 관련 플러그인, 라이브러리, 초기화 로직을 통합적으로 적용하였습니다.

Changes

Cohort / File(s) Change Summary
Android CI 워크플로우
.github/workflows/android-ci.yml
CI에서 base64로 인코딩된 google-services.json 파일을 복호화하여 생성하는 단계 추가
앱 모듈 Gradle 및 Manifest
app/build.gradle.kts, app/src/main/AndroidManifest.xml
Firebase 플러그인 적용, Crashlytics 초기화 메타데이터 추가
Firebase Crashlytics Initializer
app/src/main/kotlin/com/ninecraft/booket/initializer/FirebaseCrashlyticsInitializer.kt
Crashlytics 초기화를 위한 Initializer 클래스 신규 추가
빌드 로직: Gradle 플러그인 및 버전 카탈로그
build-logic/build.gradle.kts, build-logic/src/main/kotlin/AndroidFirebaseConventionPlugin.kt, build-logic/src/main/kotlin/com/ninecraft/booket/convention/Plugins.kt, gradle/libs.versions.toml, build.gradle.kts
Firebase 관련 Gradle 플러그인, 라이브러리, 버전, 의존성, 플러그인 등록 등 빌드 시스템 통합

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant AndroidX Startup
    participant FirebaseCrashlyticsInitializer
    participant Firebase Crashlytics

    App->>AndroidX Startup: 앱 시작 시 Initializer 실행
    AndroidX Startup->>FirebaseCrashlyticsInitializer: create(context) 호출
    FirebaseCrashlyticsInitializer->>Firebase Crashlytics: setCrashlyticsCollectionEnabled(빌드 타입에 따라)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Assessment against linked issues

Objective Addressed Explanation
Firebase GA, Crashlytics 연동 (#89)
팀 계정으로 Firebase 레포지토리 생성 (#89) 코드 변경에서는 레포지토리 생성 여부 확인 불가
기타 요구사항 (#89)

Assessment against linked issues: Out-of-scope changes

해당 변경사항 중 요구사항과 무관한 기능적 코드 변경은 발견되지 않았습니다.

Poem

Firebase 불꽃이 번쩍,
Crashlytics도 함께 척척!
CI도 준비 완료,
앱의 안정성은 만점이로군요.
토끼는 기뻐 뛰며 말해요—
"이제 로그도, 크래시도 걱정 없어요!" 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-202-feature/#89

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (2)
gradle/libs.versions.toml (1)

167-169: 플러그인 alias 이름 충돌 방지

google-service → 보통 google-services 복수형을 사용합니다. 오타는 아니지만 사내 다른 프로젝트와 naming rule이 달라질 수 있으니 통일 여부를 한번 더 점검해주세요.

.github/workflows/android-ci.yml (1)

42-44: google-services.json 생성 시 불필요한 개행 제거

echo 는 기본적으로 문자열 뒤에 개행을 삽입합니다. base64 디코딩은 영향 없지만 JSON 끝에 여분의 개행이 포함될 수 있습니다. printf를 사용하면 보다 깔끔합니다.

-echo '${{ secrets.GOOGLE_SERVICES }}' | base64 -d > ./app/google-services.json
+printf '%s' '${{ secrets.GOOGLE_SERVICES }}' | base64 -d > ./app/google-services.json
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between afa26ff and e289f24.

📒 Files selected for processing (9)
  • .github/workflows/android-ci.yml (1 hunks)
  • app/build.gradle.kts (1 hunks)
  • app/src/main/AndroidManifest.xml (1 hunks)
  • app/src/main/kotlin/com/ninecraft/booket/initializer/FirebaseCrashlyticsInitializer.kt (1 hunks)
  • build-logic/build.gradle.kts (1 hunks)
  • build-logic/src/main/kotlin/AndroidFirebaseConventionPlugin.kt (1 hunks)
  • build-logic/src/main/kotlin/com/ninecraft/booket/convention/Plugins.kt (1 hunks)
  • build.gradle.kts (1 hunks)
  • gradle/libs.versions.toml (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#61
File: feature/webview/build.gradle.kts:17-21
Timestamp: 2025-07-20T12:34:23.786Z
Learning: Reed-Android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 plugin은 Circuit, Compose, 그리고 core 모듈들의 의존성을 자동으로 포함하므로, 각 feature 모듈의 build.gradle.kts에서는 특별한 의존성(예: libs.logger, libs.kakao.auth)만 별도로 선언하면 된다.
📚 Learning: reed-android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 p...
Learnt from: easyhooon
PR: YAPP-Github/Reed-Android#61
File: feature/webview/build.gradle.kts:17-21
Timestamp: 2025-07-20T12:34:23.786Z
Learning: Reed-Android 프로젝트에서는 `booket.android.feature` convention plugin을 사용하여 feature 모듈들의 공통 의존성을 관리한다. 이 plugin은 Circuit, Compose, 그리고 core 모듈들의 의존성을 자동으로 포함하므로, 각 feature 모듈의 build.gradle.kts에서는 특별한 의존성(예: libs.logger, libs.kakao.auth)만 별도로 선언하면 된다.

Applied to files:

  • build.gradle.kts
  • app/build.gradle.kts
  • gradle/libs.versions.toml
  • build-logic/build.gradle.kts
  • build-logic/src/main/kotlin/AndroidFirebaseConventionPlugin.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci-build
🔇 Additional comments (10)
build.gradle.kts (1)

16-17: Firebase 플러그인 alias 추가 확인

apply false 옵션으로 루트 수준에만 선언해 하위 모듈에 전파되지 않는 형태가 맞습니다. 다만 AGP 8.9.3과의 호환성 측면에서 google-services(4.4.3)·crashlytics(3.0.4) 플러그인 버전이 충분히 최신인지 한 번 더 확인해 주세요.

gradle/libs.versions.toml (3)

70-74: Firebase 버전 정의—AGP 호환성 재확인 필요

AGP 8.9 계열에서 권장되는 google-services/crashlytics 플러그인 최소 버전이 계속 상향되고 있습니다. 4.4.3 / 3.0.4 조합이 빌드·런타임 모두에서 문제없는지 CI 외에 로컬에서도 검증해 주세요.


145-148: 라이브러리 항목 누락 가능성

Crashlytics 사용 시 firebase-analytics 의존성도 함께 가져오지만, 런타임에 Analytics API 호출이 있다면 firebase-analytics 라이브러리가 명시적으로 포함되어야 합니다. convention plugin 쪽에서 BOM 가져온 뒤 firebase-analytics-ktx를 implementation에 추가하는지 확인 부탁드립니다.


177-177: 새 convention 플러그인 공개 범위 확인

booket-android-firebase 플러그인이 build-logic에 정상적으로 등록돼 있는지, 또 외부 모듈(예: feature 모듈)에서 중복 적용되지 않는지 체크해 주세요.

app/src/main/AndroidManifest.xml (1)

39-41: Crashlytics Initializer 메타데이터 추가 확인 완료

androidx.startup Initializer 패턴에 맞춰 올바르게 등록되었습니다. 별도 이슈 없습니다.

app/build.gradle.kts (1)

9-9: Firebase convention 플러그인 적용 확인

플러그인 블록에 추가된 순서상 다른 convention 플러그인과 충돌 요소는 보이지 않습니다. booket.android.firebase에서 Google Services/Crashlytics 플러그인을 중복 적용하지 않도록만 주의해 주세요.

build-logic/build.gradle.kts (1)

22-22: Firebase 컨벤션 플러그인 등록이 올바르게 구현되었습니다.

기존 컨벤션 플러그인 패턴을 일관성 있게 따르고 있으며, "android.firebase" 플러그인이 올바르게 등록되었습니다.

build-logic/src/main/kotlin/com/ninecraft/booket/convention/Plugins.kt (1)

16-17: Firebase 플러그인 상수들이 올바르게 정의되었습니다.

Google Services와 Firebase Crashlytics 플러그인 상수들이 표준 플러그인 ID를 사용하여 일관성 있게 정의되었습니다.

build-logic/src/main/kotlin/AndroidFirebaseConventionPlugin.kt (1)

10-25: Firebase 컨벤션 플러그인이 올바르게 구현되었습니다.

플러그인이 필요한 Firebase 플러그인들을 적용하고, Firebase BOM을 사용한 의존성 관리가 적절히 구현되어 있습니다. 기존 컨벤션 플러그인 패턴을 일관성 있게 따르고 있습니다.

app/src/main/kotlin/com/ninecraft/booket/initializer/FirebaseCrashlyticsInitializer.kt (1)

8-16: Firebase Crashlytics 초기화 로직이 올바르게 구현되었습니다.

디버그 빌드에서 Crashlytics 데이터 수집을 비활성화하는 것이 적절하며, Androidx Startup 패턴을 올바르게 따르고 있습니다. 빈 의존성 목록도 이 초기화자의 요구사항에 맞습니다.

Copy link
Copy Markdown
Contributor

@seoyoon513 seoyoon513 left a comment

Choose a reason for hiding this comment

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

LGTM~

@easyhooon easyhooon merged commit e7e0e46 into develop Aug 5, 2025
5 checks passed
@easyhooon easyhooon deleted the BOOK-202-feature/#89 branch August 5, 2025 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-202/feat] Firebase 연동

2 participants