https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
v

Vikas Singh

05/20/2022, 4:56 PM
Can we make a domain layer as an android library to get the benefit of some android components such as parcelable ?
o

oianmol

05/21/2022, 5:37 AM
Domain should not depend on the platform
⬆️ 2
👍 1
a

Adam Powell

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.
👍 1
14 Views