Skip to content

[feat] Hilt 도입 + Repository 계층 분리 (Home/Entry)#13

Merged
UiHyeon-Kim merged 5 commits into
developfrom
feat/hilt-di
Jul 2, 2026
Merged

[feat] Hilt 도입 + Repository 계층 분리 (Home/Entry)#13
UiHyeon-Kim merged 5 commits into
developfrom
feat/hilt-di

Conversation

@UiHyeon-Kim

@UiHyeon-Kim UiHyeon-Kim commented Jul 1, 2026

Copy link
Copy Markdown
Member

📋 작업 요약

Hilt 의존성 주입을 도입하고 Home/Entry 기능의 Repository 계층을 분리합니다.

✏️ 주요 변경사항

  • Hilt 도입 + Repository 계층 분리 (Home/Entry)

👀 리뷰 포인트

  • Claude 검토 완료 (Verdict: APPROVE)
  • HANDOFF 아카이브: docs/handoff/archive/20260702-0259-HANDOFF.md

✅ 체크리스트

  • 코드 셀프 리뷰 완료
  • UI 변경 시 Light/Dark 모드 확인
  • 새 라이브러리 추가 시 라이선스 확인

UiHyeon-Kim and others added 4 commits July 2, 2026 02:38
- 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>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 747879e1-8ca9-4269-bd6c-3eaf72352242

📥 Commits

Reviewing files that changed from the base of the PR and between 302e64d and a254c16.

📒 Files selected for processing (1)
  • docs/handoff/archive/20260702-0259-HANDOFF.md

📝 Walkthrough

Walkthrough

이번 변경은 프로젝트 전반에 Hilt 의존성 주입을 도입합니다. 버전 카탈로그와 build-logic에 Hilt/KSP 설정을 추가하고, 새 컨벤션 플러그인을 등록했습니다. core:data에는 Course/Entry/NaviPreference 저장소 인터페이스와 구현체, 그리고 이를 바인딩하는 DataModule이 추가됐습니다. app 모듈은 @HiltAndroidApp/@AndroidEntryPoint를 적용했고, feature:home과 feature:entry는 ViewModel과 화면 연결을 Hilt 기반으로 전환했습니다. 문서와 백로그도 함께 갱신됐습니다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Poem
Hilt가 들어오고
Repository가 길을 나누고
화면은 주입받아
조용히 제 역할을 합니다

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Hilt 도입과 Home/Entry 중심의 Repository 계층 분리라는 실제 변경 사항을 잘 요약하고 있습니다.
Description check ✅ Passed Hilt 도입과 Repository 계층 분리 내용을 설명하고 있어 변경 내용과 잘 맞습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/hilt-di

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.

UiHyeon-Kim added a commit that referenced this pull request Jul 1, 2026
set -u 상태에서 빈 배열 "${SKIP_FLAG[@]}" 확장 시 죽는 문제 — skip_plan 값으로
분기 호출하도록 변경. 완료된 feat/hilt-di 큐 항목(PR #13)도 QUEUE.md에서 제거.
@UiHyeon-Kim

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Central-MakeUs Central-MakeUs deleted a comment from coderabbitai Bot Jul 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (2)
build-logic/src/main/kotlin/AndroidHiltConventionPlugin.kt (1)

4-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hilt 공통 의존성도 컨벤션 플러그인에서 함께 관리하면 어떨까요?

지금은 플러그인 적용(ksp, hilt.android)만 담당하고 있어서, app/core:data/feature:entry/feature:home 네 곳의 build.gradle.ktsimplementation(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 lift

Repository 인터페이스가 Kakao SDK 타입에 직접 결합돼 있어요.

getRouteKakaoDirectionsClient.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

📥 Commits

Reviewing files that changed from the base of the PR and between 6c9c20c and 302e64d.

📒 Files selected for processing (22)
  • app/build.gradle.kts
  • app/src/main/java/com/dororong/rodi/MainActivity.kt
  • app/src/main/java/com/dororong/rodi/RodiApplication.kt
  • build-logic/build.gradle.kts
  • build-logic/src/main/kotlin/AndroidHiltConventionPlugin.kt
  • build.gradle.kts
  • core/data/build.gradle.kts
  • core/data/src/main/java/com/dororong/rodi/core/data/CourseRepository.kt
  • core/data/src/main/java/com/dororong/rodi/core/data/EntryRepository.kt
  • core/data/src/main/java/com/dororong/rodi/core/data/di/DataModule.kt
  • core/data/src/main/java/com/dororong/rodi/core/data/navi/NaviPreferenceRepository.kt
  • docs/BACKLOG.md
  • docs/handoff/archive/20260702-0259-HANDOFF.md
  • feature/entry/build.gradle.kts
  • feature/entry/src/main/java/com/dororong/rodi/feature/entry/EntryFlow.kt
  • feature/entry/src/main/java/com/dororong/rodi/feature/entry/EntryViewModel.kt
  • feature/home/build.gradle.kts
  • feature/home/src/main/java/com/dororong/rodi/feature/home/HomeContract.kt
  • feature/home/src/main/java/com/dororong/rodi/feature/home/HomeScreen.kt
  • feature/home/src/main/java/com/dororong/rodi/feature/home/HomeViewModel.kt
  • gradle.properties
  • gradle/libs.versions.toml
💤 Files with no reviewable changes (1)
  • feature/home/src/main/java/com/dororong/rodi/feature/home/HomeContract.kt

Comment thread docs/handoff/archive/20260702-0259-HANDOFF.md
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":404,"request":{"method":"PATCH","url":"https://api.github.com/repos/Central-MakeUs/Rodi-Android/issues/comments/4861036093","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated reply by CodeRabbit -->\n<!-- CodeRabbit review command invocation: 4524327b-4b92-45cb-bc46-557503a891ca -->\n<details>\n<summary>✅ Action performed</summary>\n\nReview finished.\n\n> Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.\n\n</details>"},"request":{"retryCount":1,"signal":{}}},"response":{"url":"https://api.github.com/repos/Central-MakeUs/Rodi-Android/issues/comments/4861036093","status":404,"headers":{"access-control-allow-origin":"*","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning","content-encoding":"gzip","content-security-policy":"default-src 'none'","content-type":"application/json; charset=utf-8","date":"Thu, 02 Jul 2026 00:18:13 GMT","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","server":"github.com","strict-transport-security":"max-age=31536000; includeSubdomains; preload","transfer-encoding":"chunked","vary":"Accept-Encoding, Accept, X-Requested-With","x-accepted-github-permissions":"issues=write; pull_requests=write","x-content-type-options":"nosniff","x-frame-options":"deny","x-github-api-version-selected":"2022-11-28","x-github-media-type":"github.v3; format=json","x-github-request-id":"3022:1E8F55:128640:416205:6A45AE44","x-ratelimit-limit":"12500","x-ratelimit-remaining":"12469","x-ratelimit-reset":"1782954491","x-ratelimit-resource":"core","x-ratelimit-used":"31","x-xss-protection":"0"},"data":{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#update-an-issue-comment","status":"404"}}}

CodeRabbit 리뷰 지적(MD040) 반영: 언어 미지정 fenced code block이
markdownlint 경고를 유발하고 있었음.
@UiHyeon-Kim UiHyeon-Kim merged commit a588d10 into develop Jul 2, 2026
1 of 2 checks passed
UiHyeon-Kim added a commit that referenced this pull request Jul 2, 2026
@UiHyeon-Kim UiHyeon-Kim changed the title Hilt 도입 + Repository 계층 분리 (Home/Entry) [feat] Hilt 도입 + Repository 계층 분리 (Home/Entry) Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant