Skip to content

Commit eecad44

Browse files
authored
[#450] 레이어별 Modular Architecture를 적용한다 (#458)
* chore: SwiftLint를 제외한 앱 타깃의 외부 패키지 의존성 제거 * refactor: 레이어별 모듈 구조와 프로토콜 의존성 정리 * refactor: 모듈 간 사용을 위한 public 접근 제어 정리 모듈 분리에 따라 외부 타깃에서 참조되는 타입, 프로퍼티, initializer 공개 DataCommon에서 공유해야 하는 에러 타입 접근성 정리 * refactor: 레이어별 필요한 모듈 import 추가 모듈 분리에 따라 각 레이어 타깃에서 참조하는 내부 모듈 import 추가 DataMapper 파일의 import 위치 정리 * refactor: 레이어별 Xcode 프로젝트와 워크스페이스 구조 추가 * refactor: SwiftPM 모듈 의존성을 Xcode 프로젝트 의존성으로 교체 * refactor: 레이어 프로젝트의 소스 그룹 구조 복원 * chore: Application 디렉터리로 워크스페이스와 앱 소스 이동 * chore: 레이어별 외부 패키지 의존성 재연결 * chore: 위젯 모듈 디렉토리 구조 분리 * refactor: DevLogCore 모듈로 DI 역할 분리 * refactor: DevLogUI를 DevLogPresentation으로 편입 * refactor: App 타깃을 DevLogApp 프로젝트로 분리 * refactor: Widget 레이어의 Presentation 레이어 의존 제거 * refactor: Storage 레이어의 Presentation 레이어 의존 제거 * refactor: 위젯과 워크스페이스 위치 정리 * fix: 위젯 코어 프로젝트 참조 경로 수정 * refactor: Infra 의존성 정리 기반 작업 * chore: DataProtocol의 불필요한 Domain import 정리 * refactor: Data 레이어를 단일 모듈로 통합 * refactor: WidgetShared 모듈을 WidgetCore로 통합 * refactor: DomainAssembler를 Domain 레이어로 이동 * refactor: DataAssembler를 Data 레이어로 이동 * refactor: PersistenceAssembler를 Storage 레이어로 이동 * refactor: InfraAssembler를 Infra 레이어로 이동 * chore: xcproj에서 리드미, gitignore 제거 * refactor: Presentation 레이어의 Data 의존성 제거 * refactor: Logger를 Core 모듈로 이동 * refactor: 인증 에러를 Domain 레이어로 분리 * chore: DevLogData 프로젝트 파일의 미사용 참조 정리 * refactor: Presentation 레이어에서 FirebaseAuth 의존성 제거 * chore: Domain 부분 테스트 스킴 분리 * chore: Data 부분 테스트 스킴 분리 * chore: Infra 레이어 테스트 스킴 분리 * chore: Presentation 레이어 테스트 분리 * fix: 'public' modifier is redundant for instance method declared in a public extension 경고 해결 * chore: WidgetCore 테스트 스킴 분리 및 파일 위치 이동 * chore: Storage 레이어 테스트 타깃 분리 * chore: App 레이어 테스트 타깃, 파일 분리 * chore: 모듈러 구조에 맞게 CI 경로 수정 * chore: Storage -> Persistence * fix: 앱 실행 시 내부 프레임워크가 임베드되지 않는 문제 수정 * fix: Firebase 초기화 책임을 Infra 레이어로 이동 * chore: Swift Package lockfile 버전 변경 제거 * style: lint 경고 제거 * refactor: AuthService 프로토콜의 FirebaseAuth 에러 판별 제거
1 parent 1252e61 commit eecad44

429 files changed

Lines changed: 10049 additions & 1612 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/install-private-config/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ runs:
2929
trap 'rm -rf "$privateConfigCheckoutPath"' EXIT
3030
configSourcePath="$privateConfigCheckoutPath/resources/DevLog/Config.xcconfig"
3131
googleServiceInfoSourcePath="$privateConfigCheckoutPath/resources/DevLog/GoogleService-Info.plist"
32-
configDestinationPath="$GITHUB_WORKSPACE/DevLog/Resource/Config.xcconfig"
33-
googleServiceInfoDestinationPath="$GITHUB_WORKSPACE/DevLog/Resource/GoogleService-Info.plist"
32+
configDestinationPath="$GITHUB_WORKSPACE/Application/DevLogApp/Sources/Resource/Config.xcconfig"
33+
googleServiceInfoDestinationPath="$GITHUB_WORKSPACE/Application/DevLogApp/Sources/Resource/GoogleService-Info.plist"
3434
3535
rm -rf "$privateConfigCheckoutPath"
3636
mkdir -p "$privateConfigCheckoutPath"

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55

66
env:
7+
WORKSPACE: DevLog.xcworkspace
78
SCHEME: DevLog
89
XCODE_VERSION: latest
910
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
@@ -158,12 +159,14 @@ jobs:
158159
set +e
159160
echo "== Resolving Swift Package dependencies =="
160161
xcodebuild \
162+
-workspace "$WORKSPACE" \
161163
-scheme "$SCHEME" \
162164
-configuration Debug \
163165
-clonedSourcePackagesDirPath "$SPM_DIR" \
164166
-resolvePackageDependencies
165167
echo "== Starting xcodebuild build =="
166168
xcodebuild \
169+
-workspace "$WORKSPACE" \
167170
-scheme "$SCHEME" \
168171
-configuration Debug \
169172
-destination "platform=iOS Simulator,OS=${IOS_VER},name=${DEVICE_NAME}" \

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Read release version
2626
id: release_version
2727
run: |
28-
version=$(ruby -e 'project = File.read("DevLog.xcodeproj/project.pbxproj"); match = project.match(/MARKETING_VERSION = ([^;]+);/); abort("MARKETING_VERSION not found") if match.nil?; puts match[1]')
28+
version=$(ruby -e 'project = File.read("Application/DevLogApp/DevLogApp.xcodeproj/project.pbxproj"); match = project.match(/MARKETING_VERSION = ([^;]+);/); abort("MARKETING_VERSION not found") if match.nil?; puts match[1]')
2929
echo "version=$version" >> "$GITHUB_OUTPUT"
3030
echo "tag=v$version" >> "$GITHUB_OUTPUT"
3131

DevLog.xcodeproj/project.pbxproj renamed to Application/DevLogApp/DevLogApp.xcodeproj/project.pbxproj

Lines changed: 381 additions & 189 deletions
Large diffs are not rendered by default.

DevLog.xcodeproj/project.xcworkspace/contents.xcworkspacedata renamed to Application/DevLogApp/DevLogApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata

File renamed without changes.

DevLog.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved renamed to Application/DevLogApp/DevLogApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

File renamed without changes.

DevLog.xcodeproj/xcshareddata/xcschemes/DevLog.xcscheme renamed to Application/DevLogApp/DevLogApp.xcodeproj/xcshareddata/xcschemes/DevLog.xcscheme

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
1919
BuildableName = "DevLog.app"
2020
BlueprintName = "DevLog"
21-
ReferencedContainer = "container:DevLog.xcodeproj">
21+
ReferencedContainer = "container:DevLogApp.xcodeproj">
2222
</BuildableReference>
2323
</BuildActionEntry>
2424
</BuildActionEntries>
@@ -36,9 +36,9 @@
3636
<BuildableReference
3737
BuildableIdentifier = "primary"
3838
BlueprintIdentifier = "DF3416442E45F67C00F9312B"
39-
BuildableName = "DevLog_Unit.xctest"
40-
BlueprintName = "DevLog_Unit"
41-
ReferencedContainer = "container:DevLog.xcodeproj">
39+
BuildableName = "DevLogAppTests.xctest"
40+
BlueprintName = "DevLogAppTests"
41+
ReferencedContainer = "container:DevLogApp.xcodeproj">
4242
</BuildableReference>
4343
</TestableReference>
4444
</Testables>
@@ -60,7 +60,7 @@
6060
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
6161
BuildableName = "DevLog.app"
6262
BlueprintName = "DevLog"
63-
ReferencedContainer = "container:DevLog.xcodeproj">
63+
ReferencedContainer = "container:DevLogApp.xcodeproj">
6464
</BuildableReference>
6565
</BuildableProductRunnable>
6666
</LaunchAction>
@@ -77,7 +77,7 @@
7777
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
7878
BuildableName = "DevLog.app"
7979
BlueprintName = "DevLog"
80-
ReferencedContainer = "container:DevLog.xcodeproj">
80+
ReferencedContainer = "container:DevLogApp.xcodeproj">
8181
</BuildableReference>
8282
</BuildableProductRunnable>
8383
</ProfileAction>

DevLog.xcodeproj/xcshareddata/xcschemes/DevLog_Unit.xcscheme renamed to Application/DevLogApp/DevLogApp.xcodeproj/xcshareddata/xcschemes/DevLogAppTests.xcscheme

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
<BuildableReference
2121
BuildableIdentifier = "primary"
2222
BlueprintIdentifier = "DF3416442E45F67C00F9312B"
23-
BuildableName = "DevLog_Unit.xctest"
24-
BlueprintName = "DevLog_Unit"
25-
ReferencedContainer = "container:DevLog.xcodeproj">
23+
BuildableName = "DevLogAppTests.xctest"
24+
BlueprintName = "DevLogAppTests"
25+
ReferencedContainer = "container:DevLogApp.xcodeproj">
2626
</BuildableReference>
2727
</TestableReference>
2828
</Testables>
@@ -44,7 +44,7 @@
4444
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
4545
BuildableName = "DevLog.app"
4646
BlueprintName = "DevLog"
47-
ReferencedContainer = "container:DevLog.xcodeproj">
47+
ReferencedContainer = "container:DevLogApp.xcodeproj">
4848
</BuildableReference>
4949
</BuildableProductRunnable>
5050
</LaunchAction>
@@ -60,7 +60,7 @@
6060
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
6161
BuildableName = "DevLog.app"
6262
BlueprintName = "DevLog"
63-
ReferencedContainer = "container:DevLog.xcodeproj">
63+
ReferencedContainer = "container:DevLogApp.xcodeproj">
6464
</BuildableReference>
6565
</MacroExpansion>
6666
</ProfileAction>

DevLog.xcodeproj/xcshareddata/xcschemes/DevLogWidgetExtension.xcscheme renamed to Application/DevLogApp/DevLogApp.xcodeproj/xcshareddata/xcschemes/DevLogWidgetExtension.xcscheme

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
BlueprintIdentifier = "DFD3A96F2F8E89DD001DA7CD"
2020
BuildableName = "DevLogWidgetExtension.appex"
2121
BlueprintName = "DevLogWidgetExtension"
22-
ReferencedContainer = "container:DevLog.xcodeproj">
22+
ReferencedContainer = "container:DevLogApp.xcodeproj">
2323
</BuildableReference>
2424
</BuildActionEntry>
2525
<BuildActionEntry
@@ -33,7 +33,7 @@
3333
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
3434
BuildableName = "DevLog.app"
3535
BlueprintName = "DevLog"
36-
ReferencedContainer = "container:DevLog.xcodeproj">
36+
ReferencedContainer = "container:DevLogApp.xcodeproj">
3737
</BuildableReference>
3838
</BuildActionEntry>
3939
</BuildActionEntries>
@@ -66,7 +66,7 @@
6666
BlueprintIdentifier = "DFD3A96F2F8E89DD001DA7CD"
6767
BuildableName = "DevLogWidgetExtension.appex"
6868
BlueprintName = "DevLogWidgetExtension"
69-
ReferencedContainer = "container:DevLog.xcodeproj">
69+
ReferencedContainer = "container:DevLogApp.xcodeproj">
7070
</BuildableReference>
7171
</RemoteRunnable>
7272
<MacroExpansion>
@@ -75,7 +75,7 @@
7575
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
7676
BuildableName = "DevLog.app"
7777
BlueprintName = "DevLog"
78-
ReferencedContainer = "container:DevLog.xcodeproj">
78+
ReferencedContainer = "container:DevLogApp.xcodeproj">
7979
</BuildableReference>
8080
</MacroExpansion>
8181
<EnvironmentVariables>
@@ -111,7 +111,7 @@
111111
BlueprintIdentifier = "DFD48AFF2DC4D6E2005905C5"
112112
BuildableName = "DevLog.app"
113113
BlueprintName = "DevLog"
114-
ReferencedContainer = "container:DevLog.xcodeproj">
114+
ReferencedContainer = "container:DevLogApp.xcodeproj">
115115
</BuildableReference>
116116
</BuildableProductRunnable>
117117
</ProfileAction>

DevLog/App/Assembler/AppLayerAssembler.swift renamed to Application/DevLogApp/Sources/App/Assembler/AppLayerAssembler.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
// Created by opfic on 3/19/26.
66
//
77

8+
import DevLogCore
9+
import DevLogData
10+
import DevLogDomain
11+
import DevLogWidgetCore
12+
813
final class AppLayerAssembler: Assembler {
914
func assemble(_ container: any DIContainer) {
1015
container.register(WidgetSyncEventBus.self) {

0 commit comments

Comments
 (0)