forked from BendingSpoons/tempura-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCakefile
72 lines (60 loc) · 1.99 KB
/
Cakefile
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
project.name = "Tempura"
# Tempura Framework target
tempura = target do |target|
target.name = "Tempura"
target.platform = :ios
target.deployment_target = 9.0
target.language = :swift
target.type = :framework
target.include_files = [
"Tempura/**/*.swift",
]
target.all_configurations.each do |configuration|
configuration.settings["INFOPLIST_FILE"] = "Tempura/SupportingFiles/Info.plist"
configuration.settings["PRODUCT_NAME"] = "Tempura"
configuration.settings["SWIFT_VERSION"] = "4.0"
end
target.headers_build_phase do |phase|
phase.public << "Tempura/SupportingFiles/Tempura.h"
end
unit_tests_for target do |unit_test|
unit_test.linked_targets = [target]
unit_test.include_files = [
"TempuraTests/**/*.swift",
]
unit_test.all_configurations.each do |configuration|
configuration.settings["INFOPLIST_FILE"] = "TempuraTests/Info.plist"
configuration.settings["SWIFT_VERSION"] = "4.0"
end
end
target.scheme(target.name)
end
# Demo target
demo = target do |target|
target.name = "Demo"
target.platform = :ios
target.deployment_target = 10.0
target.language = :swift
target.type = :application
target.linked_targets = [tempura]
target.include_files = [
"Demo/**/*.swift",
"Demo/Resources/**/*.*"
]
target.all_configurations.each do |configuration|
configuration.product_bundle_identifier = "dk.bendingspoons.AppStation"
configuration.settings["INFOPLIST_FILE"] = "Demo/Info.plist"
configuration.settings["PRODUCT_NAME"] = "Demo"
configuration.settings["SWIFT_VERSION"] = "4.0"
end
target.scheme(target.name)
end
project.targets.each do |target|
target.shell_script_build_phase "Lint", <<-SCRIPT
if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
SCRIPT
end