-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.swift
More file actions
64 lines (60 loc) · 1.82 KB
/
Project.swift
File metadata and controls
64 lines (60 loc) · 1.82 KB
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
import ProjectDescription
// MARK: Constants
let projectName = "CobyHappiness"
let organizationName = "Coby"
let bundleID = "com.coby.CobyHappiness"
let targetVersion = "17.0"
let version = "1.0.2"
let bundleVersion = "1"
// MARK: Struct
let project = Project(
name: projectName,
organizationName: organizationName,
settings: .settings(
configurations: [
.debug(name: .debug),
.release(name: .release)
]
),
targets: [
.target(
name: projectName,
destinations: [.iPhone],
product: .app,
bundleId: bundleID,
deploymentTargets: .iOS(targetVersion),
infoPlist: createInfoPlist(),
sources: ["\(projectName)/Sources/**"],
resources: ["\(projectName)/Resources/**"],
entitlements: "\(projectName)/\(projectName).entitlements",
dependencies: defaultDependencies()
)
],
schemes: [
.scheme(
name: "\(projectName) Debug",
buildAction: .buildAction(targets: ["\(projectName)"]),
runAction: .runAction(configuration: .debug)
),
.scheme(
name: "\(projectName) Release",
buildAction: .buildAction(targets: ["\(projectName)"]),
runAction: .runAction(configuration: .release)
)
]
)
private func createInfoPlist() -> InfoPlist {
let plist: [String: Plist.Value] = [
"CFBundleShortVersionString": "\(version)",
"CFBundleVersion": "\(bundleVersion)",
"UIMainStoryboardFile": "",
"UILaunchStoryboardName": "LaunchScreen"
]
return .extendingDefault(with: plist)
}
private func defaultDependencies() -> [TargetDependency] {
[
.external(name: "CobyDS"),
.external(name: "ComposableArchitecture")
]
}