Skip to content

Conversation

@s9hn
Copy link
Member

@s9hn s9hn commented May 19, 2025

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • Room 모듈을 추가합니다.
  • 서재 관련 DB를 세팅합니다.

Summary by CodeRabbit

  • 신규 기능

    • Room 기반의 로컬 데이터베이스 모듈이 추가되어 소설 정보를 저장 및 관리할 수 있습니다.
    • 소설 데이터를 위한 엔티티, DAO, 데이터 소스, DI 모듈이 도입되었습니다.
  • 환경 설정

    • Room 라이브러리와 관련 의존성이 프로젝트에 추가되었습니다.
    • 새 데이터베이스 모듈이 프로젝트 빌드 및 설정에 포함되었습니다.
  • 리팩터링

    • 기존 데이터 소스 인터페이스의 메서드명이 일관성 있게 변경되었습니다.
    • 계정 및 토큰 관리 관련 메서드명이 보다 명확한 표현으로 변경되었습니다.
    • 로그인 및 인증 관련 호출 메서드명이 변경되어 흐름이 개선되었습니다.

@s9hn s9hn self-assigned this May 19, 2025
@s9hn s9hn added 🍯 [FEAT] 새로운 기능을 개발합니다. ⚖️ 재상 세훈 전지적 세훈 시점 🚧 [BUILD] 빌드 업무 수정, 패키지 매니저 수정합니다. labels May 19, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 19, 2025

"""

Walkthrough

이번 변경에서는 Room 기반의 데이터베이스 모듈(core/database)이 신규로 도입되었습니다. Room 엔티티, DAO, 데이터베이스 클래스, DI 모듈, 빌드 및 ProGuard 설정, 그리고 관련 의존성 추가 및 프로젝트 등록이 포함됩니다. 기존 데이터 소스 인터페이스의 메서드 이름도 일관성 있게 수정되었습니다.

Changes

파일/경로 그룹 변경 요약
core/database/.gitignore, core/database/build.gradle.kts, core/database/proguard-rules.pro, core/database/src/main/AndroidManifest.xml 데이터베이스 모듈 신규 생성: .gitignore, Gradle 빌드 스크립트, ProGuard 설정, 빈 AndroidManifest.xml 추가
core/database/src/main/java/com/into/websoso/core/database/WebsosoDatabase.kt Room 데이터베이스 클래스(WebsosoDatabase) 추가
core/database/src/main/java/com/into/websoso/core/database/entity/NovelEntity.kt Room 엔티티(NovelEntity) 추가
core/database/src/main/java/com/into/websoso/core/database/datasource/library/NovelDao.kt Room DAO(NovelDao) 및 DI 모듈(NovelDaoModule) 추가
core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryDataSource.kt 데이터 소스 구현(DefaultLibraryDataSource) 및 DI 모듈(LibraryDataSourceModule) 추가
core/database/src/main/java/com/into/websoso/core/database/di/DatabaseModule.kt Room Database DI 모듈(DatabaseModule) 추가
data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryLocalDataSource.kt 인터페이스 메서드명 getFullLibrary() → selectAllNovels()로 변경
gradle/libs.versions.toml Room 라이브러리 의존성 및 버전 추가
settings.gradle.kts core:database 모듈 프로젝트에 포함
data/account/src/main/java/com/into/websoso/data/account/datasource/AccountLocalDataSource.kt, core/datastore/src/main/java/com/into/websoso/core/datastore/datasource/account/DefaultAccountDataSource.kt, data/account/src/main/java/com/into/websoso/data/account/AccountRepository.kt, core/network/src/main/java/com/into/websoso/core/network/authenticator/AuthorizationAuthenticator.kt, app/src/main/java/com/into/websoso/ui/splash/SplashViewModel.kt, feature/signin/src/main/java/com/into/websoso/feature/signin/SignInViewModel.kt 토큰 관련 메서드명 및 호출 메서드 변경: accessToken/refreshToken → selectAccessToken/selectRefreshToken, saveTokens → createAccount, renewTokens → createTokens 등 메서드명 변경 및 호출 변경

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant LibraryLocalDataSource
    participant DefaultLibraryDataSource
    participant NovelDao
    participant WebsosoDatabase

    App->>LibraryLocalDataSource: selectAllNovels()
    LibraryLocalDataSource->>DefaultLibraryDataSource: selectAllNovels()
    DefaultLibraryDataSource->>NovelDao: selectAllNovels()
    NovelDao-->>DefaultLibraryDataSource: Flow<List<NovelEntity>>
    DefaultLibraryDataSource-->>LibraryLocalDataSource: 결과 반환
    LibraryLocalDataSource-->>App: 결과 반환
Loading

Assessment against linked issues

Objective Addressed Explanation
Room 모듈 구현 (#696)

Suggested reviewers

  • junseo511
  • yeonjeen
  • m6z1

Poem

🐰
새로 만든 데이터방,
Room으로 꽉꽉 채웠단다!
엔티티, DAO, DI 모듈까지
토끼는 신나서 깡총깡총,
서재는 이제 든든해—
데이터 저장, 걱정 끝!
📚✨
"""

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5e85040 and 8ccbf52.

📒 Files selected for processing (7)
  • app/src/main/java/com/into/websoso/ui/splash/SplashViewModel.kt (1 hunks)
  • core/database/build.gradle.kts (1 hunks)
  • core/datastore/src/main/java/com/into/websoso/core/datastore/datasource/account/DefaultAccountDataSource.kt (1 hunks)
  • core/network/src/main/java/com/into/websoso/core/network/authenticator/AuthorizationAuthenticator.kt (1 hunks)
  • data/account/src/main/java/com/into/websoso/data/account/AccountRepository.kt (2 hunks)
  • data/account/src/main/java/com/into/websoso/data/account/datasource/AccountLocalDataSource.kt (1 hunks)
  • feature/signin/src/main/java/com/into/websoso/feature/signin/SignInViewModel.kt (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • data/account/src/main/java/com/into/websoso/data/account/datasource/AccountLocalDataSource.kt
🚧 Files skipped from review as they are similar to previous changes (1)
  • core/database/build.gradle.kts
🔇 Additional comments (13)
core/network/src/main/java/com/into/websoso/core/network/authenticator/AuthorizationAuthenticator.kt (1)

70-77: 메소드 이름 변경이 일관성 있게 적용되었습니다.

renewToken() 함수 내에서 accountRepository.get().renewTokens()accountRepository.get().createTokens()로 변경되었습니다. 이는 계정 관련 데이터 액세스 메소드의 전체적인 이름 재정의 패턴에 맞게 일관성 있게 변경되었습니다.

app/src/main/java/com/into/websoso/ui/splash/SplashViewModel.kt (1)

59-61: 메소드 이름 변경이 일관성 있게 적용되었습니다.

accountRepository.renewTokens()에서 accountRepository.createTokens()로 변경되었습니다. 이는 계정 관련 리포지토리 메소드의 이름 재정의 패턴에 맞게 일관성 있게 변경되었습니다.

feature/signin/src/main/java/com/into/websoso/feature/signin/SignInViewModel.kt (1)

57-61: 메소드 이름 변경이 일관성 있게 적용되었습니다.

accountRepository.saveAccount()에서 accountRepository.createAccount()로 변경되었습니다. 이는 계정 관련 리포지토리 메소드의 이름 재정의 패턴에 맞게 일관성 있게 변경되었습니다.

core/datastore/src/main/java/com/into/websoso/core/datastore/datasource/account/DefaultAccountDataSource.kt (5)

23-28: 메소드 이름 변경이 데이터 작업을 더 명확하게 표현합니다.

accessToken()에서 selectAccessToken()으로 이름이 변경되어 데이터베이스 작업과 유사한 명명 규칙을 따르도록 개선되었습니다. 데이터를 조회한다는 의미가 더 명확해졌습니다.


29-33: 메소드 이름 변경이 데이터 작업을 더 명확하게 표현합니다.

refreshToken()에서 selectRefreshToken()으로 이름이 변경되어 데이터베이스 작업과 유사한 명명 규칙을 따르도록 개선되었습니다. 데이터를 조회한다는 의미가 더 명확해졌습니다.


35-39: 메소드 이름 변경이 데이터 작업을 더 명확하게 표현합니다.

saveAccessToken()에서 updateAccessToken()으로 이름이 변경되어 데이터베이스 작업과 유사한 명명 규칙을 따르도록 개선되었습니다. 데이터를 업데이트한다는 의미가 더 명확해졌습니다.


41-45: 메소드 이름 변경이 데이터 작업을 더 명확하게 표현합니다.

saveRefreshToken()에서 updateRefreshToken()으로 이름이 변경되어 데이터베이스 작업과 유사한 명명 규칙을 따르도록 개선되었습니다. 데이터를 업데이트한다는 의미가 더 명확해졌습니다.


47-52: 메소드 이름 변경이 데이터 작업을 더 명확하게 표현합니다.

clearTokens()에서 deleteTokens()로 이름이 변경되어 데이터베이스 작업과 유사한 명명 규칙을 따르도록 개선되었습니다. 데이터를 삭제한다는 의미가 더 명확해졌습니다.

data/account/src/main/java/com/into/websoso/data/account/AccountRepository.kt (5)

21-23: 메소드 네이밍 개선이 잘 되었습니다.

메소드 네이밍이 selectAccessToken()selectRefreshToken()으로 변경되어 Room 데이터베이스의 표준 작업 명명 규칙(CRUD)과 일치하도록 개선되었습니다. 이는 코드의 일관성을 높이고 코드 이해도를 향상시킵니다.


25-38: 계정 생성 메소드 이름 변경이 더 명확해졌습니다.

기존의 saveTokens에서 createAccount로 메소드 이름이 변경되어 메소드의 실제 동작을 더 명확하게 표현합니다. 또한 내부에서 호출하는 로컬 데이터 소스의 메소드도 updateAccessTokenupdateRefreshToken으로 일관되게 변경되었습니다. 이러한 네이밍 변경은 Room 데이터베이스 패턴에 맞게 잘 조정되었습니다.


43-43: 토큰 삭제 메소드 네이밍 변경이 적절합니다.

계정 삭제 시 호출하는 메소드가 clearTokens()에서 deleteTokens()로 변경되었습니다. 이는 CRUD 작업 표준에 더 적합한 이름으로, 데이터 조작 메소드의 일관성을 유지합니다.


46-52: 토큰 생성 메소드 네이밍 개선이 적절합니다.

renewTokens()에서 createTokens()로 메소드 이름이 변경되어 더 명확하고 일관된 네이밍 규칙을 따르고 있습니다. 내부에서 호출하는 메소드도 updateAccessTokenupdateRefreshToken으로 일관성 있게 변경되었습니다.


54-63: 토큰 삭제 메소드 위치 이동 및 네이밍 변경이 적절합니다.

deleteTokens(deviceIdentifier: String) 메소드가 새 위치로 이동하고, 내부 호출도 deleteTokens()로 변경되었습니다. 이는 Room 데이터베이스 패턴에 맞는 일관된 네이밍 방식을 따르고 있으며, 코드 가독성과 유지보수성이 향상되었습니다.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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.
    • @coderabbitai modularize this function.
  • 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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

@s9hn s9hn changed the title Feat/696 feat: 서재 UI/UX 개편 (3) - Room 모듈 구현 May 19, 2025
@github-actions github-actions bot requested review from junseo511, m6z1 and yeonjeen May 19, 2025 08:50
@@ -0,0 +1,20 @@
import com.into.websoso.buildConfigs

Choose a reason for hiding this comment

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

🚫 [ktlint] standard:no-unused-imports reported by reviewdog 🐶
Unused import

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: 2

🧹 Nitpick comments (4)
data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryLocalDataSource.kt (1)

4-4: 메서드 이름 개선

getFullLibrary()에서 selectAllNovels()로 메서드 이름이 변경되었습니다. 이 변경은 SQL 명명 규칙(SELECT)과 일치하도록 표준화되었으며, Room 데이터베이스 도입에 맞추어 더 명확한 의미를 제공합니다.

다만, 반환 타입이 명시되어 있지 않습니다. Room 데이터베이스를 사용할 때는 반환 타입을 명확히 지정하는 것이 좋습니다.

- suspend fun selectAllNovels()
+ suspend fun selectAllNovels(): List<Novel>
core/database/src/main/java/com/into/websoso/core/database/WebsosoDatabase.kt (1)

8-12: exportSchema 설정 검토 권장
현재 exportSchema = false로 되어 있는데, 데이터베이스 스키마 변경 이력을 버전 관리하려면 true로 설정하고 schemaLocation을 지정하는 것이 좋습니다.

core/database/src/main/java/com/into/websoso/core/database/di/DatabaseModule.kt (1)

16-26: 마이그레이션 전략 추가 검토
버전 1에서 향후 스키마 업데이트 시 마이그레이션 로직이 없으면 앱이 충돌할 수 있습니다. fallbackToDestructiveMigration() 또는 명시적 addMigrations() 설정을 추가하는 방안을 고려해주세요.

core/database/src/main/java/com/into/websoso/core/database/datasource/library/NovelDao.kt (1)

16-44: DAO 인터페이스 구현이 잘 되어 있습니다

Room DAO 인터페이스가 명확하게 정의되었고 필요한 데이터베이스 작업들(삽입, 조회, 삭제)이 잘 구현되어 있습니다. 특히 selectAllNovels()에서 Flow를 반환하는 것은 데이터베이스 변경사항을 관찰하기 위한 좋은 접근법입니다.

다만, userNovelId를 기준으로 정렬할 때 인덱스 활용을 고려해 볼 수 있습니다.

다음과 같이 NovelEntity 클래스에 인덱스를 추가하는 것을 고려해보세요:

@Entity(
    tableName = "novels",
    indices = [Index("userNovelId")]
)
data class NovelEntity(
    // existing fields
)
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fabb54f and 5e85040.

📒 Files selected for processing (12)
  • core/database/.gitignore (1 hunks)
  • core/database/build.gradle.kts (1 hunks)
  • core/database/proguard-rules.pro (1 hunks)
  • core/database/src/main/AndroidManifest.xml (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/WebsosoDatabase.kt (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryDataSource.kt (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/datasource/library/NovelDao.kt (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/di/DatabaseModule.kt (1 hunks)
  • core/database/src/main/java/com/into/websoso/core/database/entity/NovelEntity.kt (1 hunks)
  • data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryLocalDataSource.kt (1 hunks)
  • gradle/libs.versions.toml (2 hunks)
  • settings.gradle.kts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
core/database/build.gradle.kts (2)
build-logic/src/main/kotlin/com/into/websoso/ProjectExtensions.kt (1)
  • setNamespace (9-13)
build-logic/src/main/kotlin/com/into/websoso/WebsosoDependenciesExtensions.kt (1)
  • implementation (70-76)
🔇 Additional comments (13)
gradle/libs.versions.toml (2)

34-34: Room 의존성 버전 추가 확인

Room 데이터베이스를 위한 버전이 추가되었습니다. 2.7.1 버전은 최신 버전으로 적절해 보입니다. Room은 SQLite 데이터베이스에 대한 추상화 계층을 제공하여 데이터 지속성을 쉽게 구현할 수 있게 해줍니다.


98-100: Room 라이브러리 의존성 추가 확인

Room 관련 세 가지 핵심 라이브러리(runtime, ktx, compiler)가 적절하게 추가되었습니다. 이는 Room 데이터베이스 구현에 필요한 모든 기본 구성 요소를 포함하고 있습니다:

  • room-runtime: 기본 Room 라이브러리
  • room-ktx: Kotlin 확장 기능
  • room-compiler: 어노테이션 프로세서

빌드 시스템에 필요한 모든 Room 컴포넌트가 포함되어 있어 적절합니다.

core/database/.gitignore (1)

1-1: 적절한 .gitignore 파일 생성

새로운 데이터베이스 모듈에 대한 기본적인 .gitignore 파일이 생성되었습니다. 빌드 디렉토리를 무시하는 것은 표준 관행입니다. 이는 불필요한 빌드 아티팩트가 Git 저장소에 포함되는 것을 방지합니다.

core/database/src/main/AndroidManifest.xml (1)

1-4: 라이브러리 모듈용 기본 매니페스트 파일 확인

데이터베이스 모듈을 위한 기본 매니페스트 파일이 적절히 생성되었습니다. 라이브러리 모듈은 일반적으로 액티비티나 권한 등을 선언할 필요가 없으므로 최소한의 매니페스트만 필요합니다. 현재 구성은 라이브러리 모듈에 적합합니다.

settings.gradle.kts (1)

31-31: database 모듈 포함 확인

새로운 database 모듈(:core:database)이 프로젝트 설정에 적절히 추가되었습니다. 이는 PR의 주요 목표인 "Room 모듈 추가 및 도서관 또는 책장 기능과 관련된 데이터베이스 설정"에 부합합니다.

core/database/proguard-rules.pro (1)

1-21: 프로가드 파일 템플릿 적절합니다
아직 구체적인 룰이 필요하지 않다면 현재 상태로도 문제 없습니다. 향후 Room 혹은 Hilt 관련 최적화/난독화 규칙이 필요해지면 해당 섹션을 활성화해주세요.

core/database/src/main/java/com/into/websoso/core/database/WebsosoDatabase.kt (1)

13-15: 데이터베이스 클래스 정의가 적절합니다
WebsosoDatabase의 추상 메서드와 접근 제한자가 올바르게 적용되어 있으며, DAO 제공 구조도 적절합니다.

core/database/src/main/java/com/into/websoso/core/database/entity/NovelEntity.kt (1)

6-15: PrimaryKey 자동 생성 여부 확인 필요
@PrimaryKeyautoGenerate 속성이 없으므로, userNovelId를 외부에서 직접 관리해야 합니다. 의도대로 로컬 키를 자동 생성하려면 @PrimaryKey(autoGenerate = true)를 검토해주세요.

core/database/src/main/java/com/into/websoso/core/database/di/DatabaseModule.kt (1)

13-15: Hilt 모듈 선언 적절합니다
@Module, @InstallIn(SingletonComponent::class) 설정으로 애플리케이션 스코프의 싱글턴을 제공하고 있어 적절합니다.

core/database/src/main/java/com/into/websoso/core/database/datasource/library/NovelDao.kt (2)

1-15: 적절한 import 선언 확인됨

필요한 모든 Room, Dagger Hilt, Kotlin Flow 라이브러리들이 적절하게 임포트되어 있습니다.


46-52: Hilt 모듈 설정이 잘 되어 있습니다

NovelDao를 제공하기 위한 Dagger Hilt 모듈이 적절하게 구성되어 있습니다. SingletonComponent를 사용하여 앱 전체에서 단일 인스턴스를 보장하고 있습니다.

core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryDataSource.kt (2)

1-10: 필요한 임포트 모두 포함됨

Dagger Hilt 및 의존성 주입에 필요한 모든 임포트가 포함되어 있습니다.


21-27: Hilt 바인딩 모듈 구성이 적절함

LibraryDataSourceModule이 DefaultLibraryDataSource를 LibraryLocalDataSource 인터페이스에 적절하게 바인딩하고 있습니다. 싱글톤으로 제공되어 앱 전체에서 일관된 인스턴스를 사용할 수 있습니다.

Comment on lines 17 to 19
implementation(libs.room.ktx)
implementation(libs.room.runtime)
implementation(libs.room.compiler)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Room 컴파일러 의존성은 KAPT로 설정하세요
현재 libs.room.compilerimplementation으로 추가하셨는데, Room 어노테이션 프로세서가 실행되지 않아 빌드 오류가 발생할 수 있습니다. kapt로 변경하고 kotlin-kapt 플러그인을 적용해주세요.

 plugins {
     id("websoso.android.library")
+    id("kotlin-kapt")
 }
 dependencies {
     implementation(projects.data.library)
     // 데이터베이스 관련 라이브러리
     implementation(libs.room.ktx)
     implementation(libs.room.runtime)
-    implementation(libs.room.compiler)
+    kapt(libs.room.compiler)
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
implementation(libs.room.ktx)
implementation(libs.room.runtime)
implementation(libs.room.compiler)
// File: core/database/build.gradle.kts
plugins {
id("websoso.android.library")
id("kotlin-kapt")
}
dependencies {
implementation(projects.data.library)
// 데이터베이스 관련 라이브러리
implementation(libs.room.ktx)
implementation(libs.room.runtime)
kapt(libs.room.compiler)
}
🤖 Prompt for AI Agents
In core/database/build.gradle.kts around lines 17 to 19, the Room compiler
dependency is incorrectly added using implementation, which prevents the
annotation processor from running and causes build errors. Change the dependency
from implementation(libs.room.compiler) to kapt(libs.room.compiler) and ensure
the kotlin-kapt plugin is applied at the top of the build script to enable
annotation processing.

Comment on lines +11 to +19
internal class DefaultLibraryDataSource
@Inject
constructor(
private val novelDao: NovelDao,
) : LibraryLocalDataSource {
override suspend fun selectAllNovels() {
TODO("Not yet implemented")
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

미구현된 메서드 구현 필요

selectAllNovels() 메서드가 TODO로 남아있어 기능이 구현되지 않았습니다. novelDao를 활용하여 이 메서드를 완전히 구현해야 합니다.

다음과 같이 메서드를 구현하는 것을 권장합니다:

- override suspend fun selectAllNovels() {
-     TODO("Not yet implemented")
- }
+ override suspend fun selectAllNovels() = novelDao.selectAllNovels()

또한, LibraryLocalDataSource의 반환 타입에 따라 적절한 모델 변환이 필요할 수 있습니다. 만약 LibraryLocalDataSource 인터페이스의 메서드가 특정 반환 타입을 가지고 있다면 그에 맞게 수정해주세요.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
internal class DefaultLibraryDataSource
@Inject
constructor(
private val novelDao: NovelDao,
) : LibraryLocalDataSource {
override suspend fun selectAllNovels() {
TODO("Not yet implemented")
}
}
internal class DefaultLibraryDataSource
@Inject
constructor(
private val novelDao: NovelDao,
) : LibraryLocalDataSource {
override suspend fun selectAllNovels() = novelDao.selectAllNovels()
}
🤖 Prompt for AI Agents
In
core/database/src/main/java/com/into/websoso/core/database/datasource/library/DefaultLibraryDataSource.kt
around lines 11 to 19, the selectAllNovels() method is currently unimplemented
with a TODO. Implement this method by using novelDao to fetch all novels from
the database. Ensure the return type matches the LibraryLocalDataSource
interface's definition, and if necessary, convert the data from novelDao into
the appropriate model before returning it.

Copy link
Member

@yeonjeen yeonjeen left a comment

Choose a reason for hiding this comment

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

수고하셨숨당~

@s9hn s9hn changed the base branch from develop to feat/704 May 22, 2025 07:54
@s9hn s9hn merged commit 347145e into feat/704 May 22, 2025
1 of 2 checks passed
@m6z1 m6z1 deleted the feat/696 branch August 11, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚖️ 재상 세훈 전지적 세훈 시점 🚧 [BUILD] 빌드 업무 수정, 패키지 매니저 수정합니다. 🍯 [FEAT] 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 서재 UI/UX 개편 (3) - Room 모듈 구현

4 participants