-
Notifications
You must be signed in to change notification settings - Fork 0
fix: release 빌드 문제 해결 #267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
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 해결
WalkthroughAndroidManifest의 서비스 선언에 lint 억제 속성이 추가되고, Datastore 관련 클래스들의 생성자 주석 대상이 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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.
🔗 관련 이슈
📙 작업 설명
문제 발생 원인
Lint는 AndroidManifest.xml을 검사할 때 로 등록된 클래스가 시스템에 의해 인스턴스화
가능한지 확인합니다. 기본적으로 Android 시스템은 Class.newInstance()(= no-arg constructor)로
컴포넌트를 생성하기 때문에, lint는 다음을 요구합니다.
그런데 ReedFirebaseMessagingService는 생성자에 UserRepository를 받습니다:
그래서 lint가 "기본 생성자가 없다"고 에러를 낸 것입니다.
실제로는 문제가 없는 이유
이 프로젝트는 MetroAppComponentFactory를 사용합니다. AndroidManifest.xml 15번 라인에
이 팩토리가 시스템 대신 DI로 서비스를 생성해주기 때문에, 기본 생성자가 없어도 런타임에 정상
동작합니다. Lint가 이 커스텀 팩토리의 존재를 인식하지 못해서 발생한 false positive입니다.
tools:ignore="Instantiatable"의 역할
의미입니다
왜 @SuppressLint는 안 됐나
처음에 Kotlin 클래스에 @SuppressLint("Instantiatable")를 붙였는데, lint가 검사하는 대상이 Kotlin
소스가 아니라 AndroidManifest.xml이었기 때문에 클래스의 어노테이션이 적용되지 않았습니다.
에러가 발생하는 곳(Manifest)에서 억제해야 하는 것이었습니다.
🧪 테스트 내역 (선택)
💬 추가 설명 or 리뷰 포인트 (선택)
reference)
[Android] Google Login release 빌드에서도 로그인이 되는데 PlayStore에서 설치하면 로그인이 안되는 건에 대하여...
Summary by CodeRabbit
릴리스 노트