This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathProject.swift
76 lines (66 loc) · 1.53 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
70
71
72
73
74
75
76
//
// Project.swift
// Katana
//
// Copyright © 2021 Bending Spoons.
// Distributed under the MIT License.
// See the LICENSE file for more information.
import ProjectDescription
let iOSTargetVersion = "11.0"
// MARK: - Actions
let actions: [TargetAction] = [
.pre(
tool: "swiftlint",
arguments: ["--lenient"],
name: "SwiftLint"
),
.pre(
tool: "swiftformat",
arguments: ["."],
name: "SwiftFormat"
),
]
// MARK: - Main Target
let mainTarget = Target(
name: "Katana",
platform: .iOS,
product: .framework,
bundleId: "com.bendingspoonsapps.Katana",
deploymentTarget: .iOS(targetVersion: iOSTargetVersion, devices: [.iphone, .ipad, .mac]),
infoPlist: .default,
sources: ["Sources/**"],
actions: actions,
dependencies: [
.cocoapods(path: "."),
]
)
// MARK: - Tests Target
let testsTarget = Target(
name: "KatanaTests",
platform: .iOS,
product: .unitTests,
bundleId: "com.bendingspoonsapps.KatanaTests",
deploymentTarget: .iOS(targetVersion: iOSTargetVersion, devices: [.iphone, .ipad, .mac]),
infoPlist: .default,
sources: ["Tests/**"],
actions: actions,
dependencies: [
.target(name: mainTarget.name),
]
)
// MARK: - Project Definition
let project = Project(
name: "Katana",
organizationName: "BendingSpoons",
targets: [
mainTarget,
testsTarget,
],
schemes: [
.init(
name: "Katana",
buildAction: .init(targets: [.init(stringLiteral: mainTarget.name)]),
testAction: .init(targets: [.init(stringLiteral: testsTarget.name)])
),
]
)