@@ -15,36 +15,83 @@ let features: [TargetDependency] = Feature.allCases.map { feature in
1515 . project( target: " Feature \( feature. rawValue) " , path: . relativeToRoot( " Projects/Feature " ) )
1616}
1717
18+ let shareExtensionTarget : Target = . target(
19+ name: " ShareExtension " ,
20+ destinations: . appDestinations,
21+ product: . appExtension,
22+ bundleId: " com.pokitmons.pokit.ShareExtension " ,
23+ deploymentTargets: . appMinimunTarget,
24+ infoPlist: . file( path: . relativeToRoot( " Projects/App/ShareExtension/Info.plist " ) ) ,
25+ sources: [ " ShareExtension/Sources/** " ] ,
26+ resources: [ " ShareExtension/Resources/** " ] ,
27+ entitlements: . file( path: . relativeToRoot( " Projects/App/ShareExtension/ShareExtension.entitlements " ) ) ,
28+ dependencies: [
29+ . project( target: " FeatureLogin " , path: . relativeToRoot( " Projects/Feature " ) ) ,
30+ . project( target: " FeatureContentSetting " , path: . relativeToRoot( " Projects/Feature " ) ) ,
31+ . project( target: " FeatureCategorySetting " , path: . relativeToRoot( " Projects/Feature " ) )
32+ ] ,
33+ settings: . settings(
34+ base: [
35+ " OTHER_LDFLAGS " : " $(inherited) -ObjC " ,
36+ " CODE_SIGN_STYLE " : " Manual "
37+ ] ,
38+ configurations: [
39+ . debug( name: " Debug " , xcconfig: . relativeToRoot( " xcconfig/Debug-Share.xcconfig " ) ) ,
40+ . release(
41+ name: " Release " ,
42+ settings: [ " CODE_SIGN_IDENTITY " : " Apple Distribution " ] ,
43+ xcconfig: . relativeToRoot( " xcconfig/Release-Share.xcconfig " )
44+ )
45+ ]
46+ )
47+ )
48+
49+ let projectTarget : Target = . target(
50+ name: " App " ,
51+ destinations: . appDestinations,
52+ product: . app,
53+ bundleId: " com.pokitmons.pokit " ,
54+ deploymentTargets: . appMinimunTarget,
55+ infoPlist: . file( path: . relativeToRoot( " Projects/App/Resources/Pokit-info.plist " ) ) ,
56+ sources: [ " Sources/** " ] ,
57+ resources: [ " Resources/** " ] ,
58+ entitlements: . file( path: . relativeToRoot( " Projects/App/Resources/Pokit-iOS.entitlements " ) ) ,
59+ dependencies: features + [
60+ // TODO: 의존성 추가
61+ . external( name: " FirebaseMessaging " ) ,
62+ . target( shareExtensionTarget)
63+ ] ,
64+ settings: . settings(
65+ . release(
66+ name: " Release " ,
67+ settings: [
68+ " CODE_SIGN_IDENTITY " : " Apple Distribution "
69+ ] ,
70+ xcconfig: . relativeToRoot( " xcconfig/Release.xcconfig " )
71+ )
72+ )
73+ )
74+
75+ let appTestTarget : Target = . makeTarget(
76+ name: " AppTests " ,
77+ product: . unitTests,
78+ bundleName: " AppTests " ,
79+ infoPlist: . dictionary( [ " ENABLE_TESTING_SEARCH_PATHS " : " YES " ] ) ,
80+ resources: [ " AppTests/Resources/** " ] ,
81+ dependencies: [
82+ . target( projectTarget)
83+ ]
84+ )
85+
1886let project = Project (
1987 name: " App " ,
2088 options: . options(
2189 defaultKnownRegions: [ " en " , " ko " ] ,
2290 developmentRegion: " ko "
2391 ) ,
2492 targets: [
25- . target(
26- name: " App " ,
27- destinations: . appDestinations,
28- product: . app,
29- bundleId: " com.pokitmons.pokit " ,
30- deploymentTargets: . appMinimunTarget,
31- infoPlist: . file( path: . relativeToRoot( " Projects/App/Resources/Pokit-info.plist " ) ) ,
32- sources: [ " Sources/** " ] ,
33- resources: [ " Resources/** " ] ,
34- entitlements: . file( path: . relativeToRoot( " Projects/App/Resources/Pokit-iOS.entitlements " ) ) ,
35- dependencies: features + [
36- // TODO: 의존성 추가
37- . external( name: " FirebaseMessaging " )
38- ] ,
39- settings: . settings(
40- . release(
41- name: " Release " ,
42- settings: [
43- " CODE_SIGN_IDENTITY " : " Apple Distribution "
44- ] ,
45- xcconfig: . relativeToRoot( " xcconfig/Release.xcconfig " )
46- )
47- )
48- )
93+ projectTarget,
94+ appTestTarget,
95+ shareExtensionTarget
4996 ]
5097)
0 commit comments