Skip to content

Commit dbf32b8

Browse files
committed
[PC-192] Build: Utility 하위 파일에 Extension 모듈 생성
1 parent 9bc3132 commit dbf32b8

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

Tuist/ProjectDescriptionHelpers/Modules.swift

+17
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import ProjectDescription
1010
public enum Modules {
1111
case data
1212
case domain
13+
case utility
1314
case presentation
1415
}
1516

@@ -51,6 +52,22 @@ public extension Modules {
5152
}
5253
}
5354

55+
// MARK: - Extension
56+
57+
public extension Modules {
58+
enum Utility: String {
59+
case Extension
60+
61+
var path: String {
62+
"Utility/\(self.rawValue)"
63+
}
64+
65+
var targetName: String {
66+
"\(self.rawValue)"
67+
}
68+
}
69+
}
70+
5471
// MARK: - Presentation
5572

5673
public extension Modules {

Tuist/ProjectDescriptionHelpers/Target/TargetDependency+project.swift

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ public extension TargetDependency {
2222
)
2323
}
2424

25+
static func utility(target: Modules.Utility) -> TargetDependency {
26+
.project(
27+
target: target.targetName,
28+
path: .relativeToRoot(target.path)
29+
)
30+
}
31+
2532
static func presentation(target: Modules.Presentation) -> TargetDependency {
2633
.project(
2734
target: target.targetName,

Utility/Extension/Project.swift

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// Project.swift
3+
// ProjectDescriptionHelpers
4+
//
5+
// Created by eunseou on 1/7/25.
6+
//
7+
8+
import ProjectDescription
9+
import ProjectDescriptionHelpers
10+
11+
let project = Project.dynamicResourceFramework(
12+
name: Modules.Utility.Extension.rawValue
13+
)

Workspace.swift

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ let workspace = Workspace(
1414
"Data/**",
1515
"Domain/**",
1616
"Presentation/**",
17+
"Utility/**",
1718
],
1819
generationOptions: .options(
1920
autogeneratedWorkspaceSchemes: .disabled

0 commit comments

Comments
 (0)