-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
マルチモジュール対応 #56
マルチモジュール対応 #56
Conversation
@@ -105,7 +105,7 @@ private fun DetailScreenStateless( | |||
@PreviewDevices | |||
@Composable | |||
private fun Prev_DetailScreen() { | |||
val data = RepositoryDetail( | |||
val data = com.leoleo.androidgithubsearch.domain.model.RepositoryDetail( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositoryDetailに直す
@@ -5,7 +5,7 @@ import com.leoleo.androidgithubsearch.domain.model.RepositoryDetail | |||
sealed interface UiState { | |||
object Initial : UiState | |||
object Loading : UiState | |||
data class Data(val repositoryDetail: RepositoryDetail) : UiState | |||
data class Data(val repositoryDetail: com.leoleo.androidgithubsearch.domain.model.RepositoryDetail) : UiState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositoryDetail
@@ -62,7 +67,7 @@ fun SearchScreen( | |||
@Composable | |||
private fun SearchScreenStateless( | |||
modifier: Modifier, | |||
githubRepositories: LazyPagingItems<RepositorySummary>, | |||
githubRepositories: LazyPagingItems<com.leoleo.androidgithubsearch.domain.model.RepositorySummary>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositorySummary
@@ -168,7 +173,7 @@ private fun LazyListScope.errorContent( | |||
@Composable | |||
private fun Prev_Initial_SearchScreen() { | |||
val githubRepositories = | |||
flowOf<PagingData<RepositorySummary>>(PagingData.empty()).collectAsLazyPagingItems() | |||
flowOf<PagingData<com.leoleo.androidgithubsearch.domain.model.RepositorySummary>>(PagingData.empty()).collectAsLazyPagingItems() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositorySummary
private val query: String, | ||
private val api: GithubApi, | ||
private val ktorHandler: KtorHandler, | ||
) : PagingSource<Int, RepositorySummary>() { | ||
) : PagingSource<Int, com.leoleo.androidgithubsearch.domain.model.RepositorySummary>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositorySummary
private val api: GithubApi, | ||
private val ktorHandler: KtorHandler, | ||
) : GithubRepoRepository { | ||
) : com.leoleo.androidgithubsearch.domain.repository.GithubRepoRepository { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GithubRepoRepository
ktorHandler.dataOrThrow { api.fetchRepositoryDetail(ownerName, repositoryName) } | ||
|
||
override fun searchRepositories(query: String): Flow<PagingData<RepositorySummary>> { | ||
override fun searchRepositories(query: String): Flow<PagingData<com.leoleo.androidgithubsearch.domain.model.RepositorySummary>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositorySummary
@@ -12,4 +14,5 @@ plugins { | |||
id 'com.android.library' version '7.3.1' apply false | |||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false | |||
id 'org.jetbrains.kotlin.plugin.serialization' version '1.7.20' apply false | |||
id 'org.jetbrains.kotlin.jvm' version '1.7.20' apply false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain module追加時に自動的に追加された。
close #55
internal
をつけてモジュールスコープにしているdata module作成時のテンプレートはAndroid Libraryを使用
domain module作成時のテンプレートはJava or Kotlin Libraryを使用
設計図