-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject.Struct.swift
77 lines (49 loc) · 1.9 KB
/
Project.Struct.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
import XCEProjectGenerator
//===
let params =
(
repoName: "ModelDependable",
deploymentTarget: "8.0",
companyIdentifier: "io.XCEssentials",
companyPrefix: "XCE"
)
let bundleId =
(
fwk: "\(params.companyIdentifier).\(params.repoName)",
tst: "\(params.companyIdentifier).\(params.repoName).Tst"
)
//===
let specFormat = Spec.Format.v2_1_0
let project = Project("Main") { project in
project.configurations.all.override(
"IPHONEOS_DEPLOYMENT_TARGET" <<< params.deploymentTarget, // bug wokraround
"SWIFT_VERSION" <<< "3.0",
"VERSIONING_SYSTEM" <<< "apple-generic",
"CURRENT_PROJECT_VERSION" <<< "0", // just a default non-empty value
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" <<< "" // no need to code sign fwk
)
project.configurations.debug.override(
"SWIFT_OPTIMIZATION_LEVEL" <<< "-Onone"
)
//---
project.target("Fwk", .iOS, .framework) { fwk in
fwk.include("Sources")
//---
fwk.configurations.all.override(
"PRODUCT_NAME" <<< "\(params.companyPrefix)\(params.repoName)",
"IPHONEOS_DEPLOYMENT_TARGET" <<< params.deploymentTarget, // bug wokraround
"PRODUCT_BUNDLE_IDENTIFIER" <<< bundleId.fwk,
"INFOPLIST_FILE" <<< "Info/Fwk.plist",
"ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES" <<< "$(inherited)",
//--- iOS related:
"SDKROOT" <<< "iphoneos",
"TARGETED_DEVICE_FAMILY" <<< DeviceFamily.iOS.universal,
//--- Framework related:
"DEFINES_MODULE" <<< "NO",
"SKIP_INSTALL" <<< "YES"
)
fwk.configurations.debug.override(
"MTL_ENABLE_DEBUG_INFO" <<< true
)
}
}