Can we make a domain layer as an android library to get the benefit of some android components such as parcelable ?
05/21/2022, 5:37 AM
Domain should not depend on the platform
05/21/2022, 4:17 PM
Can you? Yes. Should you? It depends. Sufficiently justifying your dependencies is a good idea whether those dependencies are a target platform or a utility library.
Parcelable (and really, any serializable type) is a lot more complex in terms of semantics you have to consider than people often consider at first; if that's your reasoning for wanting to introduce such a dependency I would look very closely at whether or not that's appropriate.