android / android/nowinandroid
[FR]: Re assess the dependencies in the multi module setup
- Dominant language
- Kotlin
- Stars
- 21.8k
- Forks
- 4.6k
- Avg merge
- 19h 20m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the problem
Look at the picture above. I am able to access stuff from the network module right in the feature module . This in my opinion is a breach of engineering practices where in the scope of a component should only be limited to what it needs .
Perhaps we should address the dependencies mentioned as "apis" in core:data build file , and look into making them "implementation" ?
This decision of making use of apis in core:data has been done intentionally though , but can you please present an argument against what i have suggested ?
### Describe the solution
```
dependencies {
implementation(projects.core.common)
implementation(projects.core.database)
implementation(projects.core.datastore)
implementation(projects.core.network)
implementation(projects.core.analytics)
implementation(projects.core.notifications)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.kotlinx.serialization.json)
testImplementation(projects.core.datastoreTest)
testImplementation(projects.core.testing)
}
```
In my opinion this is how the core:data should look like
### Additional context
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start with the core:data build file and review the dependencies currently declared as api, along with how the feature module accesses network types. Compare that dependency visibility with the proposed implementation declarations; done means reaching and documenting a decision about the intended module boundaries and updating the declarations if that decision is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100