v

    Vikas Singh

    4 months ago
    Can we make a domain layer as an android library to get the benefit of some android components such as parcelable ?
    oianmol

    oianmol

    4 months ago
    Domain should not depend on the platform
    Adam Powell

    Adam Powell

    4 months ago
    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.