Returning LiveData from repository

Viewed 1893

This sample Repository has a method public LiveData<Resource<List<Repo>>> loadRepos(String owner)

https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/RepoRepository.java

My question is why add Android APIs (i.e. android.arch.lifecycle.LiveData) into a data layer?

Isn't it anti-Clean Architecture to mix framework APIs with your data/entities?

Also wouldn't it now require using Robolectric to unit test RepoRepository?

1 Answers
Related