-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
77 lines (67 loc) · 2.03 KB
/
Package.swift
File metadata and controls
77 lines (67 loc) · 2.03 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
// swift-tools-version:5.10
import Foundation
import PackageDescription
let environment = ProcessInfo.processInfo.environment
let treatWarningsAsErrors = environment["CI"] == "true"
let enableSwiftLintBuildToolPlugin = environment["CODEQL_DIST"] == nil
let package = Package(
name: "Nodes-Tree-Visualizer",
platforms: [
.iOS(.v13),
.macOS(.v12),
],
products: [
.library(
name: "NodesSocketIO",
targets: ["NodesSocketIO"]),
],
dependencies: [
.package(
url: "https://github.com/Tinder/Nodes.git",
"0.0.0"..<"2.0.0"),
.package(
url: "https://github.com/socketio/socket.io-client-swift.git",
exact: "16.1.1"),
.package(
url: "https://github.com/realm/SwiftLint.git",
exact: "0.59.1"),
.package(
url: "https://github.com/Quick/Nimble.git",
exact: "14.0.0"),
],
targets: [
.target(
name: "NodesSocketIO",
dependencies: [
"Nodes",
.product(name: "SocketIO", package: "socket.io-client-swift"),
]),
.testTarget(
name: "NodesSocketIOTests",
dependencies: [
"NodesSocketIO",
"Nimble",
]),
]
)
package.targets.forEach { target in
let types: [Target.TargetType] = [
.regular,
.test,
.executable,
]
guard types.contains(target.type)
else { return }
target.swiftSettings = (target.swiftSettings ?? []) + [.enableExperimentalFeature("StrictConcurrency")]
// if treatWarningsAsErrors {
// target.swiftSettings = (target.swiftSettings ?? []) + [
// .treatAllWarnings(as: .error),
// .treatWarning("DeprecatedDeclaration", as: .warning),
// ]
// }
if enableSwiftLintBuildToolPlugin {
target.plugins = (target.plugins ?? []) + [
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"),
]
}
}