Refactor: Move Hilt modules from core to data layer#537
Conversation
…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.
There was a problem hiding this comment.
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.
…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.*.
|
/gemini review |
There was a problem hiding this comment.
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.
Refactor Hilt modules to enforce modularization boundaries:
:data:commonand movedCommonModuleout of:core:common.:data:camera:low-lightand movedLowLightBoostModuleout of:core:camera:low-light.:data:camera:postprocessand movedPostProcessModuleout of:core:camera:postprocess.:core:camera:low-light-playservicesto:data:camera:low-light-playservices.:core:common,:core:settings,:core:camera:low-light, and:core:camera:postprocess.hilt.navigation.composedependency from:ui:components:captureand explicitly declaredandroidx.core:core-ktx.