[feat] Hilt 도입 + Repository 계층 분리 (Home/Entry)#13
Conversation
- CourseRepository/NaviPreferenceRepository/EntryRepository 인터페이스+구현체 설계 (core:data에 위치, domain 순수분리는 별도 기술부채로 보류) - HomeViewModel/EntryViewModel의 Hilt 전환 + Contract 단순화 계획 - Status: READY_FOR_IMPL, Branch: feat/hilt-di Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough이번 변경은 프로젝트 전반에 Hilt 의존성 주입을 도입합니다. 버전 카탈로그와 build-logic에 Hilt/KSP 설정을 추가하고, 새 컨벤션 플러그인을 등록했습니다. core:data에는 Course/Entry/NaviPreference 저장소 인터페이스와 구현체, 그리고 이를 바인딩하는 DataModule이 추가됐습니다. app 모듈은 Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
set -u 상태에서 빈 배열 "${SKIP_FLAG[@]}" 확장 시 죽는 문제 — skip_plan 값으로
분기 호출하도록 변경. 완료된 feat/hilt-di 큐 항목(PR #13)도 QUEUE.md에서 제거.
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
build-logic/src/main/kotlin/AndroidHiltConventionPlugin.kt (1)
4-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winHilt 공통 의존성도 컨벤션 플러그인에서 함께 관리하면 어떨까요?
지금은 플러그인 적용(
ksp,hilt.android)만 담당하고 있어서,app/core:data/feature:entry/feature:home네 곳의build.gradle.kts에implementation(libs.hilt.android)와ksp(libs.hilt.compiler)가 똑같이 반복 선언되고 있습니다. 컨벤션 플러그인의 목적이 이런 보일러플레이트를 줄이는 것이라, 여기서 버전 카탈로그 의존성까지 함께 추가해주면 각 모듈은 플러그인 id만 적용하면 되고, 추후 Hilt 버전 업그레이드도 한 곳에서만 관리할 수 있을 것 같습니다.♻️ 제안 리팩터링
+import org.gradle.kotlin.dsl.dependencies class AndroidHiltConventionPlugin : Plugin<Project> { override fun apply(target: Project) { with(target.pluginManager) { apply("com.google.devtools.ksp") apply("com.google.dagger.hilt.android") } + val libs = target.extensions.getByType<org.gradle.api.artifacts.VersionCatalogsExtension>() + .named("libs") + target.dependencies { + add("implementation", libs.findLibrary("hilt.android").get()) + add("ksp", libs.findLibrary("hilt.compiler").get()) + } } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build-logic/src/main/kotlin/AndroidHiltConventionPlugin.kt` around lines 4 - 11, The AndroidHiltConventionPlugin currently only applies the KSP and Hilt plugins, leaving repeated Hilt dependency declarations in multiple module build files. Update AndroidHiltConventionPlugin so it also adds the shared Hilt runtime and compiler dependencies via the version catalog, using the existing plugin setup in apply(target) and the AndroidHiltConventionPlugin class as the entry point. After this change, modules should only need to apply the convention plugin instead of declaring implementation(libs.hilt.android) and ksp(libs.hilt.compiler) repeatedly.core/data/src/main/java/com/dororong/rodi/core/data/CourseRepository.kt (1)
7-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftRepository 인터페이스가 Kakao SDK 타입에 직접 결합돼 있어요.
getRoute가KakaoDirectionsClient.RouteResult를 그대로 반환하고, 구현체도KakaoDirectionsClient라는 정적 객체를 직접 호출하고 있습니다. Repository 패턴을 도입한 취지가 데이터 소스를 추상화해서 UI/도메인 레이어를 특정 SDK로부터 분리하는 것인데, 지금 구조라면HomeViewModel을 테스트할 때도 Kakao SDK 타입에 계속 의존하게 되고, 나중에 다른 경로 탐색 SDK로 교체할 때도 인터페이스 시그니처까지 바꿔야 합니다.커밋 메시지에 "순수 도메인 분리는 기술 부채로 미룬다"고 명시돼 있어 지금 단계에서는 의도된 선택으로 보입니다만, 이후 우선순위에 올려두시면 좋을 것 같아 참고로 남겨둡니다. 예를 들어 도메인 레벨의
RouteResult모델을 정의하고,KakaoDirectionsClient를 인터페이스로 감싸 생성자 주입 받는 방식으로 개선할 수 있습니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@core/data/src/main/java/com/dororong/rodi/core/data/CourseRepository.kt` around lines 7 - 16, The CourseRepository API is still coupled to Kakao SDK types, so the fix is to move the repository contract away from Kakao-specific models. Update CourseRepository.getRoute and CourseRepositoryImpl so they expose a domain-level route model instead of KakaoDirectionsClient.RouteResult, and wrap KakaoDirectionsClient behind an injectable abstraction rather than calling its static getRoute directly. Keep the implementation details inside CourseRepositoryImpl and make HomeViewModel depend only on the repository’s domain return type.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/handoff/archive/20260702-0259-HANDOFF.md`:
- Around line 249-253: In the Verification section, the fenced code block is
missing a language tag and triggers markdownlint MD040. Update the markdown in
the handoff document so the existing commands under the Verification heading use
a bash-labeled fenced block, keeping the content the same while adding the
language identifier.
---
Nitpick comments:
In `@build-logic/src/main/kotlin/AndroidHiltConventionPlugin.kt`:
- Around line 4-11: The AndroidHiltConventionPlugin currently only applies the
KSP and Hilt plugins, leaving repeated Hilt dependency declarations in multiple
module build files. Update AndroidHiltConventionPlugin so it also adds the
shared Hilt runtime and compiler dependencies via the version catalog, using the
existing plugin setup in apply(target) and the AndroidHiltConventionPlugin class
as the entry point. After this change, modules should only need to apply the
convention plugin instead of declaring implementation(libs.hilt.android) and
ksp(libs.hilt.compiler) repeatedly.
In `@core/data/src/main/java/com/dororong/rodi/core/data/CourseRepository.kt`:
- Around line 7-16: The CourseRepository API is still coupled to Kakao SDK
types, so the fix is to move the repository contract away from Kakao-specific
models. Update CourseRepository.getRoute and CourseRepositoryImpl so they expose
a domain-level route model instead of KakaoDirectionsClient.RouteResult, and
wrap KakaoDirectionsClient behind an injectable abstraction rather than calling
its static getRoute directly. Keep the implementation details inside
CourseRepositoryImpl and make HomeViewModel depend only on the repository’s
domain return type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 48aa89f5-0f34-4cb5-bf25-b7aa0b205380
📒 Files selected for processing (22)
app/build.gradle.ktsapp/src/main/java/com/dororong/rodi/MainActivity.ktapp/src/main/java/com/dororong/rodi/RodiApplication.ktbuild-logic/build.gradle.ktsbuild-logic/src/main/kotlin/AndroidHiltConventionPlugin.ktbuild.gradle.ktscore/data/build.gradle.ktscore/data/src/main/java/com/dororong/rodi/core/data/CourseRepository.ktcore/data/src/main/java/com/dororong/rodi/core/data/EntryRepository.ktcore/data/src/main/java/com/dororong/rodi/core/data/di/DataModule.ktcore/data/src/main/java/com/dororong/rodi/core/data/navi/NaviPreferenceRepository.ktdocs/BACKLOG.mddocs/handoff/archive/20260702-0259-HANDOFF.mdfeature/entry/build.gradle.ktsfeature/entry/src/main/java/com/dororong/rodi/feature/entry/EntryFlow.ktfeature/entry/src/main/java/com/dororong/rodi/feature/entry/EntryViewModel.ktfeature/home/build.gradle.ktsfeature/home/src/main/java/com/dororong/rodi/feature/home/HomeContract.ktfeature/home/src/main/java/com/dororong/rodi/feature/home/HomeScreen.ktfeature/home/src/main/java/com/dororong/rodi/feature/home/HomeViewModel.ktgradle.propertiesgradle/libs.versions.toml
💤 Files with no reviewable changes (1)
- feature/home/src/main/java/com/dororong/rodi/feature/home/HomeContract.kt
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
CodeRabbit 리뷰 지적(MD040) 반영: 언어 미지정 fenced code block이 markdownlint 경고를 유발하고 있었음.
📋 작업 요약
Hilt 의존성 주입을 도입하고 Home/Entry 기능의 Repository 계층을 분리합니다.
✏️ 주요 변경사항
👀 리뷰 포인트
docs/handoff/archive/20260702-0259-HANDOFF.md✅ 체크리스트