-
Notifications
You must be signed in to change notification settings - Fork 0
[feature] 빌드로직, 예외처리 개선, 멀티모듈 적용 #179
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
Open
miller198
wants to merge
68
commits into
develop
Choose a base branch
from
feature/#51-module
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
모듈 생성시 기본명인 example를 모두 squirtles로 수정
버전추가, 번들추가
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
close #51
📝작업 내용 및 코드
버전 카탈로그 정리
버전 카탈로그의 라이브러리와 버전을 종류별로 정리하고
bundles를 이용하여 동시에 쓰일만한 라이브러리들을 묶어놓았습니다.
또한 필요없거나 쓰이지 않는 라이브러리 일부를 삭제하였습니다.
빌드로직 적용
빌드로직을 적용하여 플러그인 방식으로 손쉽게 모듈별 의존성을 설정할 수 있습니다.
AndroidApplicationPlugin -> app 모듈에 적용될 플러그인,
AndroidLibraryPlugin -> 안드로이드 의존성을 가지는 모듈에 적용될 플러그인,
AndroidComposePlugin -> 컴포즈 모듈에 적용될 플러그인
Data/Feature -> Data와 Feature 모듈들에 적용될 플러그인
나머지는 대충 이름보면 이해하시겠죠? ㅎ
기존 app domain data 의 build.gradle에도 일부 적용하긴 했으나
모듈분리하면서 추가된 모듈들 위주로 빌드로직이 적용되어 있습니다 참고해주세요
자바 버전 업그레이드
기존 프로젝트에 적용된 버전은 각자 다르실것같은데 gradle 내에선 모두 8버전으로 되어있었고
빌드 로직 적용 중 에러가 발생해서 17버전으로 맞추었습니다.
프로젝트 gradle jdk를 17로 설정해주세요
코틀린 버전 업그레이드
이거 왜 했는지 기억이 안나네요 죄송합니다
어떤 라이브러리랑 버전 충돌나서 코틀린쪽을 업그레이드했던것같아요
아무튼 같은 1.9xx 버전이라 큰 문제는 없을거에요
Data/Domain 레이어 파일 분리
기존 FirebaseDatasource, LocalDatasource 등 파일 하나에 모든 기능을 다 담고 있던 파일을
기능별 모듈화를 위해 분리하였습니다.
분리된 모듈에서 꼭 필요한 기능에 대해서만 의존성을 갖게 하기 위함이었습니다
ex) create화면 -> domain:pick에만, domain:pick -> data:pick에만 의존, firebase 유저에 관한 처리 코드를 알 필요없음
BaseFirebaseDataSource를 두어서 Firebase와 상호작용하는 기본동작들은 여기에 모두 정의해두고
하위 클래스인 FirebaseUserDataSource, FirebasePickDataSource 등은 모두 BaseFirebaseDataSource의 함수를 호출하여 동작을 수행합니다.
예외처리 개선
모듈 분리 중 파이어베이스와 상호작용하는 Repository/Datasource 쪽 예외처리를 개선하고 코드를 정리할 수 있을것 같아 진행하였습니다.
모두 runCatching 이용해 예외처리 하는 방식을 개선했습니다.
FirebaseException이라는 이름으로 만든 커스텀 예외 클래스도 더 사용하고 있어요
모듈분리
feature를 제외한 모든 모듈은 분리가 완료되었습니다.
앱 구동은 새로 추가된 모듈들이 아니라 기존 develop과 똑같이 app - domain - data로만 구동되고
모든 모듈을 추가하면 그때 바꿀 예정이에요
ㅡㅡㅡ
4/23
드디어 모듈분리가 완료되었습니다.
다른 PR에 있는 것처럼 비주얼라이저 모듈이 최상단에 따로 있고
app 모듈에는 Application 파일만 있습니다.
feature 아래 화면별로 모듈이 있구요
domain과 data 아래에는 기능별로 모듈을 분리해두었습니다.
core에는 여러 feature 모듈에서 공동으로 사용하는 기능 또는 UI 모듈들이 있습니다.
기존 최상단에 따로 있던 mediaservice 모듈은 core 내부로 옮겼습니다.
💬리뷰 요구사항(선택)
빌드, 실행 한번씩 해봐주세요
모든 기능이 잘 동작 되는지도 한번 확인 부탁드립니다