-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(ENG)[#252] feature 모듈 내 main 과 다른 모듈에 대해 수평 구조화
- Loading branch information
1 parent
133b6dd
commit e4d3144
Showing
68 changed files
with
837 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
build-logic/src/main/kotlin/droidknights.android.library-no-hilt.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import com.droidknights.app2023.configureCoroutineAndroid | ||
import com.droidknights.app2023.configureKotest | ||
import com.droidknights.app2023.configureKotlinAndroid | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("droidknights.verify.detekt") | ||
} | ||
|
||
configureKotlinAndroid() | ||
configureKotest() | ||
configureCoroutineAndroid() |
15 changes: 7 additions & 8 deletions
15
core/domain/src/main/java/com/droidknights/app2023/core/domain/di/DomainBindModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id("droidknights.android.library-no-hilt") | ||
id("droidknights.android.compose") | ||
} | ||
|
||
android { | ||
namespace = "com.droidknights.app2023.feature.bookmark.api" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.feature.mainNavGraph) | ||
implementation(libs.androidx.compose.navigation) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
10 changes: 10 additions & 0 deletions
10
...-api/src/main/java/com/droidknights/app2023/feature/bookmark/api/BookmarkNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.droidknights.app2023.feature.bookmark.api | ||
|
||
import androidx.navigation.NavOptions | ||
import com.droidknights.app2023.feature.nav.DroidKnightsNavController | ||
|
||
interface BookmarkNavController : DroidKnightsNavController<BookmarkNavControllerInfo> | ||
|
||
data class BookmarkNavControllerInfo( | ||
val navOptions: NavOptions, | ||
) |
9 changes: 9 additions & 0 deletions
9
...kmark-api/src/main/java/com/droidknights/app2023/feature/bookmark/api/BookmarkNavGraph.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.droidknights.app2023.feature.bookmark.api | ||
|
||
import com.droidknights.app2023.feature.nav.DroidKnightsNavGraph | ||
|
||
interface BookmarkNavGraph : DroidKnightsNavGraph<BookmarkNavGraphInfo> | ||
|
||
data class BookmarkNavGraphInfo( | ||
val onShowErrorSnackBar: (throwable: Throwable?) -> Unit, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...bookmark/src/main/java/com/droidknights/app2023/feature/bookmark/di/BookmarkBindModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.droidknights.app2023.feature.bookmark.di | ||
|
||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavController | ||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavGraph | ||
import com.droidknights.app2023.feature.bookmark.navigation.BookmarkNavControllerImpl | ||
import com.droidknights.app2023.feature.bookmark.navigation.BookmarkNavGraphImpl | ||
import com.droidknights.app2023.feature.bookmark.navigation.BookmarkTab | ||
import com.droidknights.app2023.feature.nav.DroidKnightsTab | ||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.ActivityComponent | ||
import dagger.multibindings.IntoSet | ||
|
||
@Module | ||
@InstallIn(ActivityComponent::class) | ||
internal abstract class BookmarkBindModule { | ||
@Binds | ||
abstract fun bookmarkNavControllerImpl( | ||
dataSource: BookmarkNavControllerImpl, | ||
): BookmarkNavController | ||
|
||
@Binds | ||
abstract fun bookmarkNavGraphImpl( | ||
dataSource: BookmarkNavGraphImpl, | ||
): BookmarkNavGraph | ||
|
||
@Binds | ||
@IntoSet | ||
abstract fun bookmarkTab( | ||
dataSource: BookmarkTab, | ||
): DroidKnightsTab | ||
} |
14 changes: 14 additions & 0 deletions
14
...in/java/com/droidknights/app2023/feature/bookmark/navigation/BookmarkNavControllerImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.droidknights.app2023.feature.bookmark.navigation | ||
|
||
import androidx.navigation.NavController | ||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavController | ||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavControllerInfo | ||
import javax.inject.Inject | ||
|
||
internal class BookmarkNavControllerImpl @Inject constructor() : BookmarkNavController { | ||
override fun route(): String = BookmarkRoute.route | ||
|
||
override fun navigate(navController: NavController, navInfo: BookmarkNavControllerInfo) { | ||
navController.navigateBookmark(navInfo.navOptions) | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...rc/main/java/com/droidknights/app2023/feature/bookmark/navigation/BookmarkNavGraphImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.droidknights.app2023.feature.bookmark.navigation | ||
|
||
import androidx.navigation.NavGraphBuilder | ||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavGraph | ||
import com.droidknights.app2023.feature.bookmark.api.BookmarkNavGraphInfo | ||
import javax.inject.Inject | ||
|
||
internal class BookmarkNavGraphImpl @Inject constructor() : BookmarkNavGraph { | ||
override fun buildNavGraph(navGraphBuilder: NavGraphBuilder, navInfo: BookmarkNavGraphInfo) { | ||
navGraphBuilder.bookmarkNavGraph(navInfo.onShowErrorSnackBar) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...ookmark/src/main/java/com/droidknights/app2023/feature/bookmark/navigation/BookmarkTab.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.droidknights.app2023.feature.bookmark.navigation | ||
|
||
import com.droidknights.app2023.feature.bookmark.R | ||
import com.droidknights.app2023.feature.nav.DroidKnightsTab | ||
import javax.inject.Inject | ||
|
||
internal class BookmarkTab @Inject constructor() : DroidKnightsTab { | ||
override val iconResId: Int = R.drawable.ic_bookmark | ||
override val contentDescription: String = "북마크" | ||
override val route: String = BookmarkRoute.route | ||
override val order: Int = 2 | ||
override val isStartDestination: Boolean = false | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id("droidknights.android.library-no-hilt") | ||
id("droidknights.android.compose") | ||
} | ||
|
||
android { | ||
namespace = "com.droidknights.app2023.feature.contributor.api" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.feature.mainNavGraph) | ||
implementation(libs.androidx.compose.navigation) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
5 changes: 5 additions & 0 deletions
5
...rc/main/java/com/droidknights/app2023/feature/contributor/api/ContributorNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.droidknights.app2023.feature.contributor.api | ||
|
||
import com.droidknights.app2023.feature.nav.DroidKnightsNavController | ||
|
||
interface ContributorNavController : DroidKnightsNavController<Unit> |
10 changes: 10 additions & 0 deletions
10
...api/src/main/java/com/droidknights/app2023/feature/contributor/api/ContributorNavGraph.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.droidknights.app2023.feature.contributor.api | ||
|
||
import com.droidknights.app2023.feature.nav.DroidKnightsNavGraph | ||
|
||
interface ContributorNavGraph : DroidKnightsNavGraph<ContributorNavGraphInfo> | ||
|
||
data class ContributorNavGraphInfo( | ||
val onBackClick: () -> Unit, | ||
val onShowErrorSnackBar: (throwable: Throwable?) -> Unit, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...or/src/main/java/com/droidknights/app2023/feature/contributor/di/ContributorBindModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.droidknights.app2023.feature.contributor.di | ||
|
||
import com.droidknights.app2023.feature.contributor.api.ContributorNavController | ||
import com.droidknights.app2023.feature.contributor.api.ContributorNavGraph | ||
import com.droidknights.app2023.feature.contributor.navigation.ContributorNavControllerImpl | ||
import com.droidknights.app2023.feature.contributor.navigation.ContributorNavGraphImpl | ||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.ActivityComponent | ||
|
||
@Module | ||
@InstallIn(ActivityComponent::class) | ||
internal abstract class ContributorBindModule { | ||
@Binds | ||
abstract fun contributorNavControllerImpl( | ||
dataSource: ContributorNavControllerImpl, | ||
): ContributorNavController | ||
|
||
@Binds | ||
abstract fun contributorNavGraphImpl( | ||
dataSource: ContributorNavGraphImpl, | ||
): ContributorNavGraph | ||
} |
11 changes: 11 additions & 0 deletions
11
...a/com/droidknights/app2023/feature/contributor/navigation/ContributorNavControllerImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.droidknights.app2023.feature.contributor.navigation | ||
|
||
import androidx.navigation.NavController | ||
import com.droidknights.app2023.feature.contributor.api.ContributorNavController | ||
import javax.inject.Inject | ||
|
||
internal class ContributorNavControllerImpl @Inject constructor() : ContributorNavController { | ||
override fun navigate(navController: NavController, navInfo: Unit) { | ||
navController.navigateContributor() | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...n/java/com/droidknights/app2023/feature/contributor/navigation/ContributorNavGraphImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.droidknights.app2023.feature.contributor.navigation | ||
|
||
import androidx.navigation.NavGraphBuilder | ||
import com.droidknights.app2023.feature.contributor.api.ContributorNavGraph | ||
import com.droidknights.app2023.feature.contributor.api.ContributorNavGraphInfo | ||
import javax.inject.Inject | ||
|
||
internal class ContributorNavGraphImpl @Inject constructor() : ContributorNavGraph { | ||
override fun buildNavGraph(navGraphBuilder: NavGraphBuilder, navInfo: ContributorNavGraphInfo) { | ||
navGraphBuilder.contributorNavGraph( | ||
navInfo.onBackClick, | ||
navInfo.onShowErrorSnackBar | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
plugins { | ||
id("droidknights.android.library-no-hilt") | ||
id("droidknights.android.compose") | ||
} | ||
|
||
android { | ||
namespace = "com.droidknights.app2023.feature.home.api" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.feature.mainNavGraph) | ||
implementation(libs.androidx.compose.navigation) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
12 changes: 12 additions & 0 deletions
12
...ure/home-api/src/main/java/com/droidknights/app2023/feature/home/api/HomeNavController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.droidknights.app2023.feature.home.api | ||
|
||
import androidx.navigation.NavOptions | ||
import com.droidknights.app2023.feature.nav.DroidKnightsNavController | ||
|
||
interface HomeNavController : DroidKnightsNavController<HomeNavControllerInfo> { | ||
fun isHomeRoute(currentRoute: String?): Boolean | ||
} | ||
|
||
data class HomeNavControllerInfo( | ||
val navOptions: NavOptions, | ||
) |
13 changes: 13 additions & 0 deletions
13
feature/home-api/src/main/java/com/droidknights/app2023/feature/home/api/HomeNavGraph.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.droidknights.app2023.feature.home.api | ||
|
||
import androidx.compose.foundation.layout.PaddingValues | ||
import com.droidknights.app2023.feature.nav.DroidKnightsNavGraph | ||
|
||
interface HomeNavGraph : DroidKnightsNavGraph<HomeNavGraphInfo> | ||
|
||
data class HomeNavGraphInfo( | ||
val padding: PaddingValues, | ||
val onSessionClick: () -> Unit, | ||
val onContributorClick: () -> Unit, | ||
val onShowErrorSnackBar: (throwable: Throwable?) -> Unit, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.