-
Notifications
You must be signed in to change notification settings - Fork 0
[#1] 모듈간 기본 네비게이션 구현 #2
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
Conversation
This is for #1 |
feature/stoplist/build.gradle
Outdated
@@ -34,6 +34,8 @@ android { | |||
} | |||
|
|||
dependencies { | |||
implementation "androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion" |
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.
rootProject buildscript 에 버젼을 선언하는 방식을 예전에 많이 썼었는데요.(저희 회사도 아직 이렇게 씁니다)
요즘엔 version catalog라고 해서 libs.versions.toml에 선언하는 방식을 권장하더라구요. 사용은 아래 libs.androidx.core.ktx 처럼 하구요.
minSdk, compileSdk도 비슷하게 쓸 수 있습니다.
이 프로젝트에선 version catalog 방식으로 통일해보시면 어때요?
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.
네! 해당방식 적용해보겠습니다
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.
version catalog 방식으로 통일해서 추가 커밋하였습니다
} | ||
|
||
private fun navigateToStopDetail(data: String) { | ||
val uri = "android-app://com.chaeny.busoda/fragment_stop_detail?data=$data".toUri() |
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.
문서에 맞춰서 딥링크를 잘 구현해주셨네요.
이 방식에도 장단점이 있는데요.(뭘까요?)
일단 멀티모듈 기본구조는 완성하셨으니, 이대로 가시죠.
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.
해당 방식의 장점으로는 모듈 간 의존성이 필요 없고, 앱 외부에서도 URI를 통해 접근할 수 있습니다
단점으로는
전달 가능한 데이터가 단순 문자열로 제한되고, 데이터가 노출될 수 있어 보안에 취약합니다
그리고 오타로 인한 런타임 오류가 발생할 수 있고 유지보수가 용이하지 않습니다
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.
오. 보안취약까지는 생각못했네요~
|
모듈간 기본 네비게이션 구현하였습니다
feature module간 이동이 불가해서 feature 모듈별로 nav graph를 생성하였고,
개별 모듈의 그래프를 최상위 네비게이션 그래프에 추가하였고, 딥링크를 사용하였습니다