-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProject.swift
More file actions
104 lines (96 loc) · 3.18 KB
/
Project.swift
File metadata and controls
104 lines (96 loc) · 3.18 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
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
import ProjectDescription
let infoPlist: [String: Plist.Value] = [
"CFBundleShortVersionString": "1.0",
"CFBundleVersion": "1",
"UIBackgroundModes": "remote-notification",
"UILaunchStoryboardName": "LaunchScreen"
]
let baseSettings: SettingsDictionary = [
"ENABLE_PREVIEWS": "YES",
"DEVELOPMENT_TEAM": "29346794D4",
"ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon",
"CURRENT_PROJECT_VERSION": "1",
"GENERATE_INFOPLIST_FILE": "YES"
]
let baseProjectSettings: SettingsDictionary = [:]
func debugSettings() -> SettingsDictionary {
var settings = baseSettings
settings["ENABLE_TESTABILITY"] = "YES"
return settings
}
func releaseSettings() -> SettingsDictionary {
var settings = baseSettings
return settings
}
func debugProjectSettings() -> SettingsDictionary {
var settings = baseProjectSettings
settings["MTL_ENABLE_DEBUG_INFO"] = "INCLUDE_SOURCE"
settings["ONLY_ACTIVE_ARCH"] = "YES"
settings["SWIFT_OPTIMIZATION_LEVEL"] = "Onone"
return settings
}
func releaseProjectSettings() -> SettingsDictionary {
var settings = baseProjectSettings
settings["VALIDATE_PRODUCT"] = "YES"
settings["MTL_ENABLE_DEBUG_INFO"] = "NO"
settings["SWIFT_COMPILATION_MODE"] = "wholemodule"
return settings
}
let project = Project(
name: "StoreIt",
organizationName: "M O DE ARAUJO TECNOLOGIA DA INFORMACAO LTDA",
packages: [
.package(url: "https://github.com/Swinject/Swinject.git", from: "2.8.0")
],
settings: .settings(configurations: [
.debug(name: "Debug", settings: debugProjectSettings()),
.release(name: "Release", settings: releaseProjectSettings())
]),
targets: [
Target(
name: "StoreIt",
destinations: [.iPhone, .iPad],
product: .app,
bundleId: "com.turingitservices.store-it",
infoPlist: .extendingDefault(with: infoPlist),
sources: ["StoreIt/**"],
resources: [
"StoreIt/Resources/**",
],
entitlements: "StoreIt/StoreIt.entitlements",
dependencies: [
.package(product: "Swinject")
],
settings: .settings(configurations: [
.debug(name: "Debug", settings: debugSettings()),
.release(name: "Release", settings: releaseSettings())
])
),
Target(
name: "StoreItTests",
destinations: [.iPhone],
product: .unitTests,
bundleId: "com.turingitservices.store-it-tests",
infoPlist: .default,
sources: ["StoreItTests/**"],
dependencies: [
.target(name: "StoreIt")
]
),
],
schemes: [
Scheme(
name: "StoreIt-Debug",
shared: true,
buildAction: .buildAction(targets: ["StoreIt"]),
testAction: .targets(["StoreItTests"]),
runAction: .runAction(executable: "StoreIt")
),
Scheme(
name: "StoreIt-Release",
shared: true,
buildAction: .buildAction(targets: ["StoreIt"]),
runAction: .runAction(executable: "StoreIt")
)
]
)