Clean package structure
Hi Android devs!
My biggest concern right now about code structure of my app is the package tree: it is really a mess! Right now I follow this structure:
- root
- feature 1
- ui
- data
- domain
- di
- Feature1HiltModule
- feature 2
- feature 3
- library
- ui (reusable composable that aren't bound with any feature)
- data (app database)
- di (global module for global usecases)
- domain (utilites usecases)
But slowly it is becoming a mess: recently I added a force update feature, which have its own package, for that I added a Firebase library in its own package. Two packages for one simple feature, two di modules.
Even tho I have few features, it is becoming awkward and I need extra time to search for the package I want.
How do you organize your packages? Let me know down in the comments!