Skip to content

Refactor: Move Hilt modules from core to data layer#537

Open
davidjiagoogle wants to merge 3 commits into
mainfrom
david/hiltRemoval
Open

Refactor: Move Hilt modules from core to data layer#537
davidjiagoogle wants to merge 3 commits into
mainfrom
david/hiltRemoval

Conversation

@davidjiagoogle

Copy link
Copy Markdown
Collaborator

Refactor Hilt modules to enforce modularization boundaries:

  • Created :data:common and moved CommonModule out of :core:common.
  • Created :data:camera:low-light and moved LowLightBoostModule out of :core:camera:low-light.
  • Created :data:camera:postprocess and moved PostProcessModule out of :core:camera:postprocess.
  • Moved :core:camera:low-light-playservices to :data:camera:low-light-playservices.
  • Removed unused Hilt/kapt plugins and dependencies from :core:common, :core:settings, :core:camera:low-light, and :core:camera:postprocess.
  • Removed unused hilt.navigation.compose dependency from :ui:components:capture and explicitly declared androidx.core:core-ktx.
  • Updated all consumer module dependencies and import statements across app, feature, data, and core modules.

…dependencies

- Created :data:common and moved CommonModule out of :core:common.
- Created :data📷low-light and moved LowLightBoostModule out of :core📷low-light.
- Created :data📷postprocess and moved PostProcessModule out of :core📷postprocess.
- Moved :core📷low-light-playservices to :data📷low-light-playservices.
- Removed unused Hilt/kapt plugins and dependencies from :core:common, :core:settings, :core📷low-light, and :core📷postprocess.
- Removed unused hilt.navigation.compose dependency from :ui:components:capture and explicitly declared androidx.core:core-ktx.
- Updated all consumer module dependencies and import statements across app, feature, data, and core modules.
@davidjiagoogle davidjiagoogle requested a review from temcguir July 7, 2026 23:24

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the project structure by introducing a new :data:common module and splitting low-light and postprocess modules into data-specific modules. Feedback highlights an architectural issue where a :core module depends on a :data module, violating clean architecture boundaries; it is recommended to keep qualifier annotations in :core:common and only Hilt modules in :data:common. Additionally, a style guide violation was noted regarding the removal of KDoc documentation for the DefaultCaptureModeOverride annotation.

Comment thread core/camera/build.gradle.kts Outdated
Comment thread data/common/src/main/java/com/google/jetpackcamera/data/common/CommonModule.kt Outdated
davidjiagoogle and others added 2 commits July 7, 2026 23:27
…layering

- Created CommonQualifiers.kt in :core:common with KDoc for all qualifier annotations.
- Added javax.inject to :core:common and removed :data:common dependency from :core:camera.
- Kept only Hilt @module in :data:common/CommonModule.kt.
- Updated import statements across consumer modules to com.google.jetpackcamera.core.common.*.
@davidjiagoogle davidjiagoogle requested a review from Kimblebee July 8, 2026 00:54
@temcguir

temcguir commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request restructures the project's modular architecture by moving Hilt dependency injection modules from core modules into newly created data modules (such as :data:common, :data:camera:low-light, and :data:camera:postprocess). As a result, core modules no longer depend on Hilt or Kapt, which simplifies their dependencies. Additionally, qualifiers have been moved to :core:common using standard javax.inject annotations. I have no feedback to provide as there are no review comments to evaluate.

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.

2 participants