Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to split resources to feature directories #8

Open
osipxd opened this issue Nov 4, 2020 · 0 comments
Open

Possibility to split resources to feature directories #8

osipxd opened this issue Nov 4, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@osipxd
Copy link
Collaborator

osipxd commented Nov 4, 2020

Disclaimer: This feature will be helpful only for "not multimodular" projects.

It would be great to have an isolated resource directory for each feature.
Hierarchy would be like:

main
├── kotlin
├── res                <-- Common resources
└── res-features       <-- Features resources
    ├── feature1
    │   ├── layout     <-- Layouts, values, drawables, etc. suitable only for "feature1"
    │   ├── values
    │   └── drawable
    ├── feature2
    └── feature3

Pros:

  • All feature resources are isolated and have their place
  • It is easy to navigate between resources in the scope of the feature
  • Feature's resource set contains a smaller number of files so you can better control what resources you have in the feature

Cons:

  • Feature resources should have prefix to avoid conflicts with an existing resource. For example layout, drawable, or string with the same name can be declared in multiple features resource sets. After resources merge it can cause unambiguous bugs. (Maybe this can be resolved with Android Lint)
  • You can't run an eye over all available resources and check if a similar resource already exists in a project. But to be honest you can't do it even if all resources are placed in one resource set.
@osipxd osipxd added the enhancement New feature or request label Nov 4, 2020
@osipxd osipxd self-assigned this Nov 4, 2020
@osipxd osipxd added this to the 0.7 milestone Dec 30, 2020
@osipxd osipxd modified the milestones: 0.7, 0.8, 0.9 Feb 23, 2021
@osipxd osipxd removed their assignment Mar 1, 2021
@osipxd osipxd removed this from the 0.9 milestone Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant