-
Notifications
You must be signed in to change notification settings - Fork 0
/
Project.swift
69 lines (64 loc) · 1.82 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
import ProjectDescription
public var scripts: [TargetScript] {
var scripts = [TargetScript]()
let swiftLintScriptString = "SwiftLint/swiftlint --fix && SwiftLint/swiftlint"
let swiftLintScript = TargetScript.post(script: swiftLintScriptString, name: "SwiftLint", basedOnDependencyAnalysis: false)
scripts.append(swiftLintScript)
return scripts
}
let baseSettings: [String: SettingValue] = [
"MARKETING_VERSION": "1.0", // Version
"CURRENT_PROJECT_VERSION": "1", // Build
"ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS": "YES" // App Icons Source
]
let target = Target(
name: "Sandbox",
platform: .iOS,
product: .app,
productName: "Sandbox",
bundleId: "Disavle.Sandbox",
deploymentTarget: .iOS(targetVersion: "14.0", devices: .iphone),
infoPlist: "Sandbox/Configs/Info.plist",
sources: ["Sandbox/Sources/**"],
resources: ["Sandbox/Resources/**"],
scripts: scripts,
dependencies: [
.external(name: "SnapshotTesting")
],
settings: .settings(
base: baseSettings,
configurations: [.debug(name: .debug), .release(name: .release)]
)
)
let testTarget = Target(
name: "SandboxTests",
platform: .iOS,
product: .unitTests,
bundleId: "Disavle.SandboxTests",
deploymentTarget: .iOS(targetVersion: "14.0", devices: .iphone),
sources: "SandboxTests/Sources/**",
dependencies: [
.target(name: "Sandbox"),
]
)
let project = Project(
name: "Sandbox",
organizationName: "Disavle",
targets: [target, testTarget],
schemes: [
Scheme(
name: "Sandbox",
shared: true,
buildAction: .buildAction(targets: ["Sandbox"]),
testAction: .targets(["SandboxTests"]),
runAction: .runAction(executable: "Sandbox")
),
Scheme(
name: "SandboxTests",
shared: true,
buildAction: .buildAction(targets: ["SandboxTests"]),
testAction: .targets(["SandboxTests"]),
runAction: .runAction(executable: "SandboxTests")
),
]
)