Can we make a domain layer as an android library t...
# android-architecture
v
Can we make a domain layer as an android library to get the benefit of some android components such as parcelable ?
o
Domain should not depend on the platform
⬆️ 2
👍 1
a
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.
👍 1