-
Notifications
You must be signed in to change notification settings - Fork 459
/
Package.swift
98 lines (94 loc) · 3.04 KB
/
Package.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// swift-tools-version:5.8
// Package.swift
//
// Copyright (c) 2014 - 2018 Apple Inc. and the project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See LICENSE.txt for license information:
// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt
//
import PackageDescription
let package = Package(
name: "SwiftProtobuf",
products: [
.executable(
name: "protoc-gen-swift",
targets: ["protoc-gen-swift"]
),
.library(
name: "SwiftProtobuf",
targets: ["SwiftProtobuf"]
),
.library(
name: "SwiftProtobufPluginLibrary",
targets: ["SwiftProtobufPluginLibrary"]
),
.plugin(
name: "SwiftProtobufPlugin",
targets: ["SwiftProtobufPlugin"]
),
],
targets: [
.target(
name: "SwiftProtobuf",
exclude: ["CMakeLists.txt"],
resources: [.copy("PrivacyInfo.xcprivacy")],
swiftSettings: .packageSettings
),
.target(
name: "SwiftProtobufPluginLibrary",
dependencies: ["SwiftProtobuf"],
exclude: ["CMakeLists.txt"],
resources: [.copy("PrivacyInfo.xcprivacy")],
swiftSettings: .packageSettings
),
.target(
name: "SwiftProtobufTestHelpers",
dependencies: ["SwiftProtobuf"],
swiftSettings: .packageSettings
),
.executableTarget(
name: "protoc-gen-swift",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"],
exclude: ["CMakeLists.txt"],
swiftSettings: .packageSettings
),
.executableTarget(
name: "Conformance",
dependencies: ["SwiftProtobuf"],
exclude: ["failure_list_swift.txt", "text_format_failure_list_swift.txt"],
swiftSettings: .packageSettings
),
.plugin(
name: "SwiftProtobufPlugin",
capability: .buildTool(),
dependencies: ["protoc-gen-swift"]
),
.testTarget(
name: "SwiftProtobufTests",
dependencies: ["SwiftProtobuf"],
swiftSettings: .packageSettings
),
.testTarget(
name: "SwiftProtobufPluginLibraryTests",
dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobufTestHelpers"],
swiftSettings: .packageSettings
),
.testTarget(
name: "protoc-gen-swiftTests",
dependencies: ["protoc-gen-swift", "SwiftProtobufTestHelpers"],
swiftSettings: .packageSettings
),
],
swiftLanguageVersions: [.v5]
)
// Settings for every Swift target in this package, like project-level settings
// in an Xcode project.
extension Array where Element == PackageDescription.SwiftSetting {
static var packageSettings: Self {
[
.enableExperimentalFeature("StrictConcurrency=complete"),
.enableUpcomingFeature("ExistentialAny"),
]
}
}