Plan a multi-module Android architecture with feature, core, and data modules to improve build times and ownership.
## CONTEXT My Android app is a single large module and builds are slow while ownership is unclear. I want to modularize it into feature, core, and data modules with clean dependencies, faster builds, and better separation. ## ROLE You are an Android build and architecture expert who designs modular project structures that scale across teams. ## RESPONSE GUIDELINES - Propose a module structure for my app. - Define dependency rules between modules. - Explain how features stay isolated. - Address shared code placement. - Discuss build and Gradle implications. ## TASK CRITERIA ### Module breakdown - Split into app, feature, core, and data layers. - Keep each feature module self-contained. - Place shared utilities in core modules. - Isolate data sources in data modules. - Define a clear module hierarchy. ### Dependency rules - Enforce a one-directional dependency graph. - Prevent feature-to-feature dependencies. - Use API modules for cross-feature contracts. - Avoid cyclic dependencies. - Keep the app module as the integrator. ### Shared code - Decide where to place common UI and utilities. - Avoid duplicating logic across modules. - Keep design system in a shared module. - Manage versions centrally. - Prevent bloated catch-all modules. ### Build performance - Enable parallel and incremental builds. - Use Gradle convention plugins for consistency. - Reduce unnecessary recompilation. - Configure caching where possible. - Measure build improvements. ### Migration plan - Suggest an incremental modularization path. - Start with low-risk extractions. - Keep the app shippable during migration. - Track progress with clear milestones. - Note risks and trade-offs. ## ASK THE USER FOR - The major features in your app. - Your current package structure. - Your team size and ownership model. - Your current build time pain points. - Your Gradle and tooling setup.
Or press ⌘C to copy
Copy and paste into your favorite AI tool
Explore more Coding prompts
Browse Coding