Skip to content

Conversation

@easyhooon
Copy link
Contributor

@easyhooon easyhooon commented Feb 9, 2026

🔗 관련 이슈

📙 작업 설명

  • FirebaseMessagingServcie 관련 release build 문제 해결
  • 누락된 @params: 어노테이션 추가
  • 구글 로그인을 위한 release sha1 기반 Android 클라이언트 GCP에 등록

문제 발생 원인

Lint는 AndroidManifest.xml을 검사할 때 로 등록된 클래스가 시스템에 의해 인스턴스화
가능한지 확인합니다. 기본적으로 Android 시스템은 Class.newInstance()(= no-arg constructor)로
컴포넌트를 생성하기 때문에, lint는 다음을 요구합니다.

  • public 클래스일 것
  • 인자 없는 기본 생성자가 있을 것

그런데 ReedFirebaseMessagingService는 생성자에 UserRepository를 받습니다:

class ReedFirebaseMessagingService(                                                             
    private val userRepository: UserRepository,                                                 
) : FirebaseMessagingService()

그래서 lint가 "기본 생성자가 없다"고 에러를 낸 것입니다.

실제로는 문제가 없는 이유

이 프로젝트는 MetroAppComponentFactory를 사용합니다. AndroidManifest.xml 15번 라인에

android:appComponentFactory="com.ninecraft.booket.di.MetroAppComponentFactory"                  

이 팩토리가 시스템 대신 DI로 서비스를 생성해주기 때문에, 기본 생성자가 없어도 런타임에 정상
동작합니다. Lint가 이 커스텀 팩토리의 존재를 인식하지 못해서 발생한 false positive입니다.

tools:ignore="Instantiatable"의 역할

<service
    android:name=".ReedFirebaseMessagingService"
    android:exported="false"
    tools:ignore="Instantiatable">
  • tools: 네임스페이스는 빌드 도구에게만 전달되는 속성입니다 (실제 APK에는 포함되지 않음)
  • tools:ignore="Instantiatable"는 이 XML 요소에서 Instantiatable lint 검사를 건너뛰라는
    의미입니다
  • lint 에러가 Manifest XML에서 발생했기 때문에, 억제도 해당 XML 요소에서 해야 적용됩니다

왜 @SuppressLint는 안 됐나

처음에 Kotlin 클래스에 @SuppressLint("Instantiatable")를 붙였는데, lint가 검사하는 대상이 Kotlin
소스가 아니라 AndroidManifest.xml이었기 때문에 클래스의 어노테이션이 적용되지 않았습니다.
에러가 발생하는 곳(Manifest)에서 억제해야 하는 것이었습니다.

🧪 테스트 내역 (선택)

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

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

  • play console 앱 서명 키 인증서 sha1 기반 Android 클라이언트는 이미 있더군요 그래서 따로 추가는 안했습니다.
  • release 빌드시 Server BaseUrl만 개발서버 바라보게 변경하여 apk 추출하여 QA전달 드리면 구글 로그인 쪽 문제는 없을 것 같습니다.

reference)
[Android] Google Login release 빌드에서도 로그인이 되는데 PlayStore에서 설치하면 로그인이 안되는 건에 대하여...

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 빌드 구성 및 의존성 선언 형식 개선
    • 매니페스트의 린트 경고를 억제하도록 메타데이터 업데이트
  • Refactor
    • 의존성 주입 관련 어노테이션 적용 방식 정리로 컴파일·빌드 일관성 개선
  • Style
    • 코드 서식 및 불필요 공백 제거로 가독성 향상

This annotation is currently applied to the value parameter only, but in the future it will also be applied to property.
- To opt in to applying to both value parameter and property, add '-Xannotation-default-target=param-property' to your compiler arguments.
- To keep applying to the value parameter only, use the '@param:' annotation target.

See https://youtrack.jetbrains.com/issue/KT-73255 for more details

warning 해결
@github-actions github-actions bot added the 🐞 fix Something isn't working label Feb 9, 2026
@github-actions github-actions bot requested a review from seoyoon513 February 9, 2026 04:51
@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Walkthrough

AndroidManifest의 서비스 선언에 lint 억제 속성이 추가되고, Datastore 관련 클래스들의 생성자 주석 대상이 @param:으로 변경되며, 빌드-플러그인 파일에 import/포맷 정리가 적용되었습니다. (50단어 이내)

Changes

Cohort / File(s) Summary
AndroidManifest 린트 억제
app/src/main/AndroidManifest.xml
<service> 요소에 tools:ignore="Instantiatable" 속성 추가 (android:exported="false" 유지).
Datastore DI 주석 대상 변경
core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.kt, core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultTokenDataSource.kt
생성자 파라미터 애노테이션 대상이 @LoginMethodDataStore / @TokenDataStore@param:LoginMethodDataStore / @param:TokenDataStore로 변경(메타데이터 대상 지정, 로직 변경 없음).
빌드 플러그인 형식·참조 정리
build-logic/src/main/kotlin/AndroidFeatureConventionPlugin.kt, build-logic/src/main/kotlin/AndroidFirebaseConventionPlugin.kt
파일 상단 빈 줄 제거 및 AndroidFirebaseConventionPlugin.ktcom.ninecraft.booket.convention.libs import 추가, deps 참조를 libs로 표기(형식/정리).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 조그만 발로 폴짝, 코드 숲을 건너
주석 한 줄 달고 속성 하나 더해
릴리즈 길에 바람이 살랑이네
토끼는 깡충, 빌드는 쾌적하길 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 PR의 주요 변경 사항인 release 빌드 문제 해결을 명확하게 설명하고 있습니다.
Linked Issues check ✅ Passed PR은 연결된 이슈 #266의 모든 주요 목표를 충족합니다: ReedFirebaseMessagingService Instantiatable 경고 해결, 누락된 @param 어노테이션 추가, 구글 로그인 설정 확인.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 release 빌드 문제 해결과 직접 관련이 있으며, 범위를 벗어난 변경은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 BOOK-505-fix/#266

No actionable comments were generated in the recent review. 🎉


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

🤖 Fix all issues with AI agents
In
`@core/datastore/impl/src/main/kotlin/com/ninecraft/booket/core/datastore/impl/datasource/DefaultLoginMethodDataSource.kt`:
- Line 20: DefaultTokenDataSource is missing the use-site target on its
constructor injection: add the `@param`: use-site target before the
`@TokenDataStore` annotation on the dataStore constructor parameter (i.e., change
the annotation on the DataStore<Preferences> parameter in DefaultTokenDataSource
so it reads with `@param`:TokenDataStore) to match other data source classes like
DefaultLoginMethodDataSource and ensure consistent constructor annotation usage.

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

Labels

🐞 fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-505/fix] release 빌드시 발생하는 문제 해결

1 participant