-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject.swift
131 lines (125 loc) · 4.83 KB
/
Project.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import ProjectDescription
private let bundleId = "com.goorung.Gitodo"
private let bundleShortVersionString = "1.0.0"
private let bundleVersion = "1"
private let deploymentTarget = "17.0"
private let appInfoPlist = InfoPlist.extendingDefault(with: [
"ITSAppUsesNonExemptEncryption": .boolean(false),
"CFBundleDisplayName": .string("Gitodo!"),
"CFBundleName": .string("Gitodo"),
"CFBundleShortVersionString": .string(bundleShortVersionString),
"CFBundleVersion": .string(bundleVersion),
"UILaunchStoryboardName": .string("LaunchScreen"),
"UIApplicationSceneManifest": .dictionary([
"UIApplicationSupportsMultipleScenes": .boolean(false),
"UISceneConfigurations": .dictionary([
"UIWindowSceneSessionRoleApplication": .array([
.dictionary([
"UISceneConfigurationName": "Default Configuration",
"UISceneDelegateClassName": "$(PRODUCT_MODULE_NAME).SceneDelegate"
])
])
])
]),
"UISupportedInterfaceOrientations":
[
"UIInterfaceOrientationPortrait",
],
"CFBundleURLTypes": [
[
"CFBundleTypeRole": "Editor",
"CFBundleURLSchemes": ["gitodo"]
]
],
"CLIENT_ID": "$(CLIENT_ID)",
"CLIENT_SECRET": "$(CLIENT_SECRET)"
])
private let widgetInfoPlist = InfoPlist.extendingDefault(with: [
"CFBundleDisplayName": .string("Gitodo!"),
"CFBundleIdentifier": .string("$(PRODUCT_BUNDLE_IDENTIFIER)"),
"CFBundleInfoDictionaryVersion": .string("6.0"),
"CFBundlePackageType": .string("XPC!"),
"CFBundleShortVersionString": .string(bundleShortVersionString),
"CFBundleVersion": .string(bundleVersion),
"NSExtension": .dictionary([
"NSExtensionPointIdentifier": .string("com.apple.widgetkit-extension")
])
])
private let appDependencies: [TargetDependency] = [
.external(name: "SnapKit", condition: .none),
.external(name: "Kingfisher", condition: .none),
.external(name: "RxCocoa", condition: .none),
.external(name: "RxSwift", condition: .none),
.external(name: "RxGesture", condition: .none),
.external(name: "SwiftyToaster", condition: .none),
.external(name: "MarkdownView", condition: .none),
.external(name: "SkeletonView", condition: .none),
.target(name: "GitodoShared", condition: .none),
.target(name: "GitodoRepoListWidget", condition: .none),
.target(name: "GitodoRepoTodoWidget", condition: .none),
]
private let widgetDependencies: [TargetDependency] = [
.target(name: "GitodoShared", condition: .none),
]
let project = Project(
name: "Gitodo!",
targets: [
// Shared Framework target
.target(
name: "GitodoShared",
destinations: [.iPhone],
product: .framework,
bundleId: "\(bundleId).Shared",
deploymentTargets: .iOS(deploymentTarget),
infoPlist: .default,
sources: ["GitodoShared/Sources/**"],
resources: ["GitodoShared/Resources/**"],
dependencies: [.external(name: "RealmSwift", condition: .none)]
),
// App target
.target(
name: "Gitodo",
destinations: [.iPhone],
product: .app,
bundleId: bundleId,
deploymentTargets: .iOS(deploymentTarget),
infoPlist: appInfoPlist,
sources: ["Gitodo/Sources/**"],
resources: ["Gitodo/Resources/**"],
entitlements: "Gitodo.entitlements",
dependencies: appDependencies,
settings: .settings(
configurations: [
.debug(name: "Debug", xcconfig: "Configurations/secrets.xcconfig"),
.release(name: "Release", xcconfig: "Configurations/secrets.xcconfig")
]
)
),
// Small Static Widget target
.target(
name: "GitodoRepoListWidget",
destinations: [.iPhone],
product: .appExtension,
bundleId: "\(bundleId).RepoList",
deploymentTargets: .iOS(deploymentTarget),
infoPlist: widgetInfoPlist,
sources: ["Widgets/RepoList/Sources**"],
resources: ["Widgets/RepoList/Resources/**"],
entitlements: "Gitodo.entitlements",
dependencies: widgetDependencies
),
// Medium Intent Widget target
.target(
name: "GitodoRepoTodoWidget",
destinations: [.iPhone],
product: .appExtension,
bundleId: "\(bundleId).RepoTodo",
deploymentTargets: .iOS(deploymentTarget),
infoPlist: widgetInfoPlist,
sources: ["Widgets/RepoTodo/Sources**"],
resources: ["Widgets/RepoTodo/Resources/**"],
entitlements: "Gitodo.entitlements",
dependencies: widgetDependencies
),
]
)